diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index 05b3a98fe8..ea320d40e9 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, detailed-timers, threaded-timers, mpi-sync-timer" @@ -565,7 +564,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 +673,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' }} \ @@ -806,7 +804,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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29c2aa3e74..07cba6a9e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,11 +23,6 @@ repos: - id: black language_version: python3 - - repo: https://github.com/koalaman/shellcheck-precommit - rev: v0.9.0 - hooks: - - id: shellcheck - - repo: https://github.com/pre-commit/mirrors-clang-format rev: v17.0.4 hooks: diff --git a/.pylintrc b/.pylintrc index 9569543737..fe47c2ee73 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 137a952507..b10b9cef4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,11 @@ cmake_minimum_required( VERSION 3.19 ) list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ) 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" ) include( ColorMessages ) @@ -50,7 +55,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." ) @@ -58,7 +63,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." ) @@ -130,7 +134,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() @@ -140,7 +143,6 @@ nest_process_static_libraries() 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() @@ -222,13 +224,9 @@ add_custom_target( installcheck 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 ) @@ -275,10 +273,7 @@ endforeach () # libraries required to link extension modules set( MODULE_LINK_LIBS - "-lnest" - "-lsli" "${LTDL_LIBRARIES}" - "${READLINE_LIBRARIES}" "${GSL_LIBRARIES}" "${LIBNEUROSIM_LIBRARIES}" "${MUSIC_LIBRARIES}" @@ -302,7 +297,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}" @@ -357,6 +351,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/build_support/check_copyright_headers.py b/build_support/check_copyright_headers.py index b7c2147963..a2f98fc161 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"] = "." 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 diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake index 08c1d530da..60b19c36d3 100644 --- a/cmake/ConfigureSummary.cmake +++ b/cmake/ConfigureSummary.cmake @@ -91,11 +91,6 @@ function( NEST_PRINT_CONFIG_SUMMARY ) message( "" ) if ( BUILD_DOCS ) message( "Documentation : Yes" ) - if ( BUILD_SLI_DOCS) - message( " SLI doc build : Yes" ) - else() - message( " SLI doc build : No" ) - endif() if ( BUILD_SPHINX_DOCS ) message( " Sphinx doc build : Yes (${SPHINX_EXECUTABLE})" ) else() @@ -121,15 +116,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 . - -# - 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/ProcessOptions.cmake b/cmake/ProcessOptions.cmake index 9f278d264a..c79479ad48 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" ) @@ -143,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 ) @@ -261,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 ) @@ -667,7 +635,6 @@ function( NEST_PROCESS_USERDOC ) message( STATUS "Configuring user documentation" ) find_package( Sphinx REQUIRED) find_package( Pandoc REQUIRED) - set( BUILD_SLI_DOCS ON PARENT_SCOPE ) set( BUILD_SPHINX_DOCS ON PARENT_SCOPE ) set( BUILD_DOCS ON PARENT_SCOPE ) endif () diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 14429eba67..3346b6c456 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -24,41 +24,6 @@ if( BUILD_DOCS ) add_custom_target( docs ALL ) endif() -if( BUILD_SLI_DOCS STREQUAL ON AND NOT CMAKE_CROSSCOMPILING ) - # This is a legacy code block marked for imminent removal together with SLI. (11/2022) - # It does not follow the restructured `docs`-`subdocs` dependencies, and - # configures SLI doc building to occur on `install` using `execute_process` calls. - message( STATUS "Configuring SLI documentation") - install( DIRECTORY slihelp_generator - DESTINATION ${CMAKE_INSTALL_DATADIR} - ) - # 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 () - # Determine in or out of tree building if ( "${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}" ) set( OUT_OF_TREE_BUILD "False" ) @@ -77,6 +42,7 @@ if ( BUILD_SPHINX_DOCS ) COMMAND ${SPHINX_EXECUTABLE} -b html . ${_SPHINX_BUILD_DIR} COMMAND ${Python_EXECUTABLE} resolve_includes.py ${SPHINX_BUILD_DIR}/models ) + add_dependencies( docs sphinxdocs ) install( DIRECTORY ${_SPHINX_BUILD_DIR} @@ -84,14 +50,14 @@ if ( BUILD_SPHINX_DOCS ) OPTIONAL ) install( DIRECTORY logos - DESTINATION ${CMAKE_INSTALL_DOCDIR} - ) + DESTINATION ${CMAKE_INSTALL_DOCDIR} + ) endif () if ( BUILD_DOXYGEN_DOCS ) add_custom_target( doxygendocs - COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/fulldoc.conf" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - ) + COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/fulldoc.conf" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + ) add_dependencies( docs doxygendocs ) endif () 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: -*/ 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 f0b8125e4f..ff83355c3d 100644 --- a/doc/htmldoc/developer_space/index.rst +++ b/doc/htmldoc/developer_space/index.rst @@ -88,27 +88,18 @@ Developer guides * Here you can find details on our :ref:`CI workflow ` -.. 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 ` - * :ref:`vim_sli` + .. grid-item-card:: C++ documentation + + * see :ref:`devdoc_workflow` + .. toctree:: :maxdepth: 1 @@ -119,7 +110,5 @@ Developer guides workflows/documentation_workflow/index guidelines/* guidelines/styleguide/styleguide - guidelines/styleguide/vim_support_sli templates/* - sli_docs/index cppcomments 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 - -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 ` for advanced configuration options. - -SLI user manual ---------------- - -This manual gives a brief overview of the SLI programming language. - -1. :ref:`First Steps ` -2. :ref:`Objects and data types ` -3. :ref:`Programming in SLI ` -4. :ref:`Using files and keyboard input ` -5. :ref:`Neural simulations ` 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 8159326fe5..0000000000 --- a/doc/htmldoc/developer_space/sli_docs/neural-simulations.rst +++ /dev/null @@ -1,516 +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:`neuron models -page `. - -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 - 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 -^^^^^^^^^ - -.. code-block:: text - - 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 - -.. code-block:: text - - 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 -^^^^^^^^^ - -.. code-block:: text - - 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 bac350b2b2..0000000000 --- a/doc/htmldoc/developer_space/sli_docs/objects-and-data-types.rst +++ /dev/null @@ -1,248 +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/developer_space/workflows/development_workflow.rst b/doc/htmldoc/developer_space/workflows/development_workflow.rst index d0d6a1ad8d..87520dfe90 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++ 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 ` 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 d62d9b54a2..08e9e38726 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 `_. - -#. 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:: /NEST/build/libnestutil/config.h - /NEST/build/libnestutil/sliconfig.h 3. On the left panel select the newly created project ``NEST-fork``, then select the created target. diff --git a/doc/htmldoc/installation/cmake_options.rst b/doc/htmldoc/installation/cmake_options.rst index 323d3c6127..d7b5e4055c 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= \ -Dwith-python=OFF \ -Dwith-gsl=OFF \ - -Dwith-readline=OFF \ -Dwith-ltdl=OFF \ -Dwith-openmp=OFF \ @@ -177,8 +176,6 @@ External libraries +-------------------------------------------------------+------------------------------------------------------------------------------------------------+ | ``-Dwith-boost=[OFF|ON|]`` | Build with Boost [default=ON]. To set a specific Boost installation, give the install path. | +-------------------------------------------------------+------------------------------------------------------------------------------------------------+ -| ``-Dwith-readline=[OFF|ON|]`` | Build with GNU Readline library [default=ON]. To set a specific library, give the install path.| -+-------------------------------------------------------+------------------------------------------------------------------------------------------------+ | ``-Dwith-ltdl=[OFF|ON|]`` | 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/configuration.rst b/doc/htmldoc/installation/configuration.rst deleted file mode 100644 index 9a2cdc29fa..0000000000 --- a/doc/htmldoc/installation/configuration.rst +++ /dev/null @@ -1,81 +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 - -If you are a Vim user and require support for SLI files, please refer to -our :ref:`vim_sli`. - -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. diff --git a/doc/htmldoc/installation/developer.rst b/doc/htmldoc/installation/developer.rst index 27d7c590eb..47ec40cff3 100644 --- a/doc/htmldoc/installation/developer.rst +++ b/doc/htmldoc/installation/developer.rst @@ -52,8 +52,6 @@ By default, everything will be installed to the subdirectories ``/bin`` - Dynamic libraries ``/lib/`` -- SLI libraries ``/share/nest/sli`` -- SLI documentation ``/share/doc/nest`` - Examples ``/share/doc/nest/examples`` - PyNEST ``/lib/pythonX.Y/site-packages/nest`` - PyNEST examples ``/share/doc/nest/examples/pynest`` diff --git a/doc/htmldoc/installation/noenv_install.rst b/doc/htmldoc/installation/noenv_install.rst index fd71beca58..42fcf666e8 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 \ diff --git a/doc/htmldoc/interface_nest/using_nest_with_music.rst b/doc/htmldoc/interface_nest/using_nest_with_music.rst index cc89b298cb..3e84dffa99 100644 --- a/doc/htmldoc/interface_nest/using_nest_with_music.rst +++ b/doc/htmldoc/interface_nest/using_nest_with_music.rst @@ -71,13 +71,11 @@ 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("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 @@ -125,13 +123,11 @@ 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("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/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/doc/htmldoc/networks/spatially_structured_networks.rst b/doc/htmldoc/networks/spatially_structured_networks.rst index c982239e53..0885dae90e 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 @@ -1525,12 +1519,12 @@ The ``Mask`` class has a few methods that must be overridden: class EllipticMask : public nest::Mask< 2 > { public: - EllipticMask( const DictionaryDatum& d ) + EllipticMask( const dictionary& d ) : rx_( 1.0 ) , ry_( 1.0 ) { - updateValue< double >( d, "r_x", rx_ ); - updateValue< double >( d, "r_y", ry_ ); + d.update_value( "r_x", rx_ ); + d.update_value( "r_y", ry_ ); } using Mask< 2 >::inside; diff --git a/doc/htmldoc/tutorials/index.rst b/doc/htmldoc/tutorials/index.rst index 93bf132910..a4d58491a3 100644 --- a/doc/htmldoc/tutorials/index.rst +++ b/doc/htmldoc/tutorials/index.rst @@ -15,7 +15,6 @@ networks! * :ref:`music_tutorial_2` * :ref:`music_tutorial_3` * :ref:`music_tutorial_4` - * :ref:`music_sli` * :ref:`tips_music` 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 `, *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. 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/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 a14057979f..b1cd5413b2 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 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 004616bc2c..0000000000 Binary files a/doc/slihelp_generator/assets/css/moeppel1.png and /dev/null differ diff --git a/doc/slihelp_generator/assets/css/moeppel2.png b/doc/slihelp_generator/assets/css/moeppel2.png deleted file mode 100644 index 3338959b90..0000000000 Binary files a/doc/slihelp_generator/assets/css/moeppel2.png and /dev/null differ diff --git a/doc/slihelp_generator/assets/css/nest-initiative-logo.png b/doc/slihelp_generator/assets/css/nest-initiative-logo.png deleted file mode 100644 index 95bd1ae36d..0000000000 Binary files a/doc/slihelp_generator/assets/css/nest-initiative-logo.png and /dev/null differ diff --git a/doc/slihelp_generator/assets/css/prettify.css b/doc/slihelp_generator/assets/css/prettify.css deleted file mode 100644 index b747bad411..0000000000 --- a/doc/slihelp_generator/assets/css/prettify.css +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @license - * Copyright (C) 2015 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. - */ - -/* Pretty printing styles. Used with prettify.js. */ - - -/* SPAN elements with the classes below are added by prettyprint. */ -.pln { color: #000 } /* plain text */ - -@media screen { - .str { color: #080 } /* string content */ - .kwd { color: #008 } /* a keyword */ - .com { color: #800 } /* a comment */ - .typ { color: #606 } /* a type name */ - .lit { color: #066 } /* a literal value */ - /* punctuation, lisp open bracket, lisp close bracket */ - .pun, .opn, .clo { color: #660 } - .tag { color: #008 } /* a markup tag name */ - .atn { color: #606 } /* a markup attribute name */ - .atv { color: #080 } /* a markup attribute value */ - .dec, .var { color: #606 } /* a declaration; a variable name */ - .fun { color: red } /* a function name */ -} - -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { color: #060 } - .kwd { color: #006; font-weight: bold } - .com { color: #600; font-style: italic } - .typ { color: #404; font-weight: bold } - .lit { color: #044 } - .pun, .opn, .clo { color: #440 } - .tag { color: #006; font-weight: bold } - .atn { color: #404 } - .atv { color: #060 } -} - -/* Put a border around prettyprinted code snippets. */ -pre.prettyprint { padding: 2px; border: 1px solid #888 } - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L5, -li.L6, -li.L7, -li.L8 { list-style-type: decimal } -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { background: #eee } diff --git a/doc/slihelp_generator/assets/css/style.css b/doc/slihelp_generator/assets/css/style.css deleted file mode 100755 index 2108c400cc..0000000000 --- a/doc/slihelp_generator/assets/css/style.css +++ /dev/null @@ -1,2153 +0,0 @@ -/* -Theme Name: Twenty Twelve -Theme URI: https://wordpress.org/themes/twentytwelve/ -Author: the WordPress team -Author URI: https://wordpress.org/ -Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background. -Version: 2.2 -License: GNU General Public License v2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html -Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready -Text Domain: twentytwelve - -This theme, like WordPress, is licensed under the GPL. -Use it to make something cool, have fun, and share what you've learned with others. -*/ - -/* =Notes --------------------------------------------------------------- -This stylesheet uses rem values with a pixel fallback. The rem -values (and line heights) are calculated using two variables: - -$rembase: 14; -$line-height: 24; - ----------- Examples - -* Use a pixel value with a rem fallback for font-size, padding, margins, etc. - padding: 5px 0; - padding: 0.357142857rem 0; (5 / $rembase) - -* Set a font-size and then set a line-height based on the font-size - font-size: 16px - font-size: 1.142857143rem; (16 / $rembase) - line-height: 1.5; ($line-height / 16) - ----------- Vertical spacing - -Vertical spacing between most elements should use 24px or 48px -to maintain vertical rhythm: - -.my-new-div { - margin: 24px 0; - margin: 1.714285714rem 0; ( 24 / $rembase ) -} - ----------- Further reading - -http://snook.ca/archives/html_and_css/font-size-with-rem -http://blog.typekit.com/2011/11/09/type-study-sizing-the-legible-letter/ - - -/* =Reset --------------------------------------------------------------- */ - -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - vertical-align: baseline; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -blockquote, -q { - quotes: none; -} -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -caption, -th, -td { - font-weight: normal; - text-align: left; -} -h1, -h2, -h3, -h4, -h5, -h6 { - clear: both; -} -html { - overflow-y: scroll; - font-size: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -a:focus { - outline: thin dotted; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section { - display: block; -} -audio, -canvas, -video { - display: inline-block; -} -audio:not([controls]) { - display: none; -} -del { - color: #333; -} -ins { - background: #fff9c0; - text-decoration: none; -} -hr { - background-color: #ccc; - border: 0; - height: 1px; - margin: 24px; - margin-bottom: 1.714285714rem; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -small { - font-size: smaller; -} -img { - border: 0; - -ms-interpolation-mode: bicubic; -} - -/* Clearing floats */ -.clear:after, -.wrapper:after, -.format-status .entry-header:after { - clear: both; -} -.clear:before, -.clear:after, -.wrapper:before, -.wrapper:after, -.format-status .entry-header:before, -.format-status .entry-header:after { - display: table; - content: ""; -} - - -/* =Repeatable patterns --------------------------------------------------------------- */ - -/* Small headers */ -.archive-title, -.page-title, -.widget-title, -.entry-content th, -.comment-content th { - font-size: 11px; - font-size: 0.785714286rem; - line-height: 2.181818182; - font-weight: bold; - text-transform: uppercase; - color: #636363; -} - -/* Shared Post Format styling */ -article.format-quote footer.entry-meta, -article.format-link footer.entry-meta, -article.format-status footer.entry-meta { - font-size: 11px; - font-size: 0.785714286rem; - line-height: 2.181818182; -} - -/* Form fields, general styles first */ -button, -input, -select, -textarea { - border: 1px solid #ccc; - border-radius: 3px; - font-family: inherit; - padding: 6px; - padding: 0.428571429rem; -} -button, -input { - line-height: normal; -} -textarea { - font-size: 100%; - overflow: auto; - vertical-align: top; -} - -/* Reset non-text input types */ -input[type="checkbox"], -input[type="radio"], -input[type="file"], -input[type="hidden"], -input[type="image"], -input[type="color"] { - border: 0; - border-radius: 0; - padding: 0; -} - -/* Buttons */ -.menu-toggle, -input[type="submit"], -input[type="button"], -input[type="reset"], -article.post-password-required input[type=submit], -.bypostauthor cite span { - padding: 6px 10px; - padding: 0.428571429rem 0.714285714rem; - font-size: 11px; - font-size: 0.785714286rem; - line-height: 1.428571429; - font-weight: normal; - color: #7c7c7c; - background-color: #e6e6e6; - background-repeat: repeat-x; - background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); - background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); - background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6); - background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6); - background-image: linear-gradient(top, #f4f4f4, #e6e6e6); - border: 1px solid #d2d2d2; - border-radius: 3px; - box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); -} -.menu-toggle, -button, -input[type="submit"], -input[type="button"], -input[type="reset"] { - cursor: pointer; -} -button[disabled], -input[disabled] { - cursor: default; -} -.menu-toggle:hover, -.menu-toggle:focus, -button:hover, -input[type="submit"]:hover, -input[type="button"]:hover, -input[type="reset"]:hover, -article.post-password-required input[type=submit]:hover { - color: #5e5e5e; - background-color: #ebebeb; - background-repeat: repeat-x; - background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb); - background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb); - background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb); - background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb); - background-image: linear-gradient(top, #f9f9f9, #ebebeb); -} -.menu-toggle:active, -.menu-toggle.toggled-on, -button:active, -input[type="submit"]:active, -input[type="button"]:active, -input[type="reset"]:active { - color: #757575; - background-color: #e1e1e1; - background-repeat: repeat-x; - background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1); - background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1); - background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1); - background-image: -o-linear-gradient(top, #ebebeb, #e1e1e1); - background-image: linear-gradient(top, #ebebeb, #e1e1e1); - box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4; - border-color: transparent; -} -.bypostauthor cite span { - color: #fff; - background-color: #21759b; - background-image: none; - border: 1px solid #1f6f93; - border-radius: 2px; - box-shadow: none; - padding: 0; -} - -/* Responsive images */ -.entry-content img, -.comment-content img, -.widget img { - max-width: 100%; /* Fluid images for posts, comments, and widgets */ -} -img[class*="align"], -img[class*="wp-image-"], -img[class*="attachment-"] { - height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ -} -img.size-full, -img.size-large, -img.header-image, -img.wp-post-image { - max-width: 100%; - height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ -} - -/* Make sure videos and embeds fit their containers */ -embed, -iframe, -object, -video { - max-width: 100%; -} -.entry-content .twitter-tweet-rendered { - max-width: 100% !important; /* Override the Twitter embed fixed width */ -} - -/* Images */ -.alignleft { - float: left; -} -.alignright { - float: right; -} -.aligncenter { - display: block; - margin-left: auto; - margin-right: auto; -} -.entry-content img, -.comment-content img, -.widget img, -img.header-image, -.author-avatar img, -img.wp-post-image { - /* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */ - border-radius: 3px; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); -} -.wp-caption { - max-width: 100%; /* Keep wide captions from overflowing their container. */ - padding: 4px; -} -.wp-caption .wp-caption-text, -.gallery-caption, -.entry-caption { - font-style: italic; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; - color: #757575; -} -img.wp-smiley, -.rsswidget img { - border: 0; - border-radius: 0; - box-shadow: none; - margin-bottom: 0; - margin-top: 0; - padding: 0; -} -.entry-content dl.gallery-item { - margin: 0; -} -.gallery-item a, -.gallery-caption { - width: 90%; -} -.gallery-item a { - display: block; -} -.gallery-caption a { - display: inline; -} -.gallery-columns-1 .gallery-item a { - max-width: 100%; - width: auto; -} -.gallery .gallery-icon img { - height: auto; - max-width: 90%; - padding: 5%; -} -.gallery-columns-1 .gallery-icon img { - padding: 3%; -} - -/* Navigation */ -.site-content nav { - clear: both; - line-height: 2; - overflow: hidden; -} -#nav-above { - padding: 24px 0; - padding: 1.714285714rem 0; -} -#nav-above { - display: none; -} -.paged #nav-above { - display: block; -} -.nav-previous, -.previous-image { - float: left; - width: 50%; -} -.nav-next, -.next-image { - float: right; - text-align: right; - width: 50%; -} -.nav-single + .comments-area, -#comment-nav-above { - margin: 48px 0; - margin: 3.428571429rem 0; -} - -/* Author profiles */ -.author .archive-header { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.author-info { - border-top: 1px solid #ededed; - margin: 24px 0; - margin: 1.714285714rem 0; - padding-top: 24px; - padding-top: 1.714285714rem; - overflow: hidden; -} -.author-description p { - color: #757575; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; -} -.author.archive .author-info { - border-top: 0; - margin: 0 0 48px; - margin: 0 0 3.428571429rem; -} -.author.archive .author-avatar { - margin-top: 0; -} - - -/* =Basic structure --------------------------------------------------------------- */ - -/* Body, links, basics */ -html { - font-size: 87.5%; -} -body { - font-size: 14px; - font-size: 1rem; - font-family: Helvetica, Arial, sans-serif; - text-rendering: optimizeLegibility; - color: #444; -} -body.custom-font-enabled { - font-family: "Open Sans", Helvetica, Arial, sans-serif; -} -a { - outline: none; - color: #21759b; -} -a:hover { - color: #0f3647; -} - -/* Assistive text */ -.assistive-text, -.site .screen-reader-text { - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); - overflow: hidden; - height: 1px; - width: 1px; -} -.main-navigation .assistive-text:focus, -.site .screen-reader-text:hover, -.site .screen-reader-text:active, -.site .screen-reader-text:focus { - background: #fff; - border: 2px solid #333; - border-radius: 3px; - clip: auto !important; - color: #000; - display: block; - font-size: 12px; - height: auto; - padding: 12px; - position: absolute; - top: 5px; - left: 5px; - width: auto; - z-index: 100000; /* Above WP toolbar */ -} - -/* Page structure */ -.site { - padding: 0 24px; - padding: 0 1.714285714rem; - background-color: #fff; -} -.site-content { - margin: 24px 0 0; - margin: 1.714285714rem 0 0; -} -.widget-area { - margin: 24px 0 0; - margin: 1.714285714rem 0 0; -} - -/* Header */ -.site-header { - padding: 24px 0; - padding: 1.714285714rem 0; -} -.site-header h1, -.site-header h2 { - text-align: center; -} -.site-header h1 a, -.site-header h2 a { - color: #515151; - display: inline-block; - text-decoration: none; -} -.site-header h1 a:hover, -.site-header h2 a:hover { - color: #21759b; -} -.site-header h1 { - font-size: 24px; - font-size: 1.714285714rem; - line-height: 1.285714286; - margin-bottom: 14px; - margin-bottom: 1rem; -} -.site-header h2 { - font-weight: normal; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - color: #757575; -} -.header-image { - margin-top: 24px; - margin-top: 1.714285714rem; -} - -/* Navigation Menu */ -.main-navigation { - margin-top: 24px; - margin-top: 1.714285714rem; - text-align: center; -} -.main-navigation li { - margin-top: 24px; - margin-top: 1.714285714rem; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 1.42857143; -} -.main-navigation a { - color: #5e5e5e; -} -.main-navigation a:hover, -.main-navigation a:focus { - color: #21759b; -} -.main-navigation ul.nav-menu, -.main-navigation div.nav-menu > 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 ac6f09d588..0000000000 Binary files a/doc/slihelp_generator/assets/images/arrow.png and /dev/null differ 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 6ebe8442b6..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/README.md
    +++ /dev/null
    @@ -1,148 +0,0 @@
    -# 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 3813903dbf..0000000000
    Binary files a/doc/slihelp_generator/assets/js/highlight/styles/brown-papersq.png and /dev/null differ
    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 9c07d4ab40..0000000000
    Binary files a/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.jpg and /dev/null differ
    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 956e9790a0..0000000000
    Binary files a/doc/slihelp_generator/assets/js/highlight/styles/school-book.png and /dev/null differ
    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 bb87425721..0000000000
    --- a/doc/slihelp_generator/generate_help.py
    +++ /dev/null
    @@ -1,167 +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 html
    -import io
    -import os
    -import re
    -import sys
    -import textwrap
    -
    -from helpers_sli import (
    -    check_ifdef,
    -    create_helpdirs,
    -    cut_it,
    -    delete_helpdir,
    -    help_generation_required,
    -)
    -from writers import coll_data
    -
    -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/helpers_sli.py b/doc/slihelp_generator/helpers_sli.py
    deleted file mode 100644
    index 91f859d007..0000000000
    --- a/doc/slihelp_generator/helpers_sli.py
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# helpers_sli.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 errno
    -import os
    -import re
    -import shutil
    -
    -
    -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 735c892b0d..0000000000
    --- a/doc/slihelp_generator/writers.py
    +++ /dev/null
    @@ -1,305 +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 string import Template
    -
    -from helpers_sli import cut_it
    -
    -
    -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 = "\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("\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("\n".join(hlplist))
    -        f_file_name_hlp.write("\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 = "\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("\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("\n".join(hlp_list))
    -    f_helphlpindex.write("\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/environment.yml b/environment.yml
    index 973e486abc..ca67809d53 100644
    --- a/environment.yml
    +++ b/environment.yml
    @@ -36,7 +36,6 @@ dependencies:
       - boost >= 1.69
       - gsl >= 1.11
       - libtool
    -  - readline
       - hdf5
       - cppcheck
       - doxygen
    diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
    deleted file mode 100644
    index 45d0c300fb..0000000000
    --- a/examples/CMakeLists.txt
    +++ /dev/null
    @@ -1,31 +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/>.
    -
    -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/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`.
    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
    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 6fb9d65441..0000000000
    --- a/examples/nest/ArtificialSynchrony.sli
    +++ /dev/null
    @@ -1,226 +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 1.648 def              % syn. time constant 3/2ln3
    -
    -/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 Precise / 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_ex tau_syn
    -        /tau_syn_in tau_syn
    -        /V_m  E_L
    -        /V_reset V_reset
    -        /V_th  V_th
    -        /t_ref t_refra
    -     >> def
    - }
    - {
    - /params <<
    -        /C_m C_m
    -        /E_L E_L
    -        /I_e I_e
    -        /tau_m tau_m
    -        /tau_syn_ex tau_syn
    -        /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 precise simulations first: )= }
    -         {(\nRun the grid constrained simulations now: )= } ifelse
    -
    -userdict begin
    - 0.0 0.2 5.0 {
    -  cvd /strength Set
    -
    -  (weight [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_ps 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-Precise-) 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 61343e80e5..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 performs 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.05 (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.05 (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 47061630a4..0000000000
    --- a/examples/nest/Potjans_2014/spike_analysis.py
    +++ /dev/null
    @@ -1,191 +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 glob
    -import os
    -import re
    -
    -import matplotlib.pyplot as plt
    -import numpy as np
    -
    -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.0  # 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 cd88ed495f..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 stabilize before reordering 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 deaff3c569..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 stabilize before reordering 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 e74034e5ce..0000000000
    --- a/examples/nest/brunel_ps.sli
    +++ /dev/null
    @@ -1,313 +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_ps NE Create def  % create exitatory neurons
    -
    -  (Creating inhibitory population.) =  % show message
    -  /I_neurons /iaf_psc_alpha_ps 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_ex tauSyn
    -      /tau_syn_in 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/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..45e2f057d1 100755
    --- a/examples/nest/music/minimalmusicsetup_receivenest.py
    +++ b/examples/nest/music/minimalmusicsetup_receivenest.py
    @@ -22,13 +22,13 @@
     
     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.")
         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 3985e9cb34..fde3602975 100755
    --- a/examples/nest/music/minimalmusicsetup_sendnest.py
    +++ b/examples/nest/music/minimalmusicsetup_sendnest.py
    @@ -22,13 +22,13 @@
     
     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.")
         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/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/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 b72a2684c5..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 dictionary
    - 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 dictionary.
    -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 d21059ed11..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 hyperrectangular 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 2a8fe784ec..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 dictionary
    -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 dictionary 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 performance: 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 performs 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 performs 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 e0705c0c74..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 occurred
    -  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 dc8333b371..0000000000
    --- a/lib/sli/nest-init.sli
    +++ /dev/null
    @@ -1,1531 +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] { /val Set << /constant << /value val >> >> CreateParameter_D } 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 new functions to trie if it exists, else create new
    -/cva dup lookup not
    -{
    -  trie
    -} if
    -  [/connectiontype] /cva_C load addtotrie
    -  [/nodecollectiontype] { /all cva_g_l } addtotrie
    -  [/nodecollectiontype /literaltype] /cva_g_l load addtotrie
    -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
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/ConnectSonata [/dictionarytype /integertype]
    -{
    -  ConnectSonata_D
    -} 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 occurred.
    -
    -   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
    -
    -/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
    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 66b3529062..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 occurred.
    -     % 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 72f9b32758..0000000000
    --- a/lib/sli/sli-init.sli
    +++ /dev/null
    @@ -1,2264 +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 dictionary
    -
    -   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 dictionary 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 dictionary 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 occurred 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_without_boost { statusdict/have_boost :: not { /skipped_no_boost exit_test_gracefully } if } def
    -/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 cb6d0e2246..0000000000
    --- a/lib/sli/unittest.sli
    +++ /dev/null
    @@ -1,1419 +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 << /show_results false >> Options
    -
    -
    -/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
    -    /distributed_process_invariant_events_assert_or_die /show_results GetOption
    -    {
    -      dup
    -      { == } forall
    -    }
    -    if
    -
    -    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 0000aaac77..135603c1d6 100644
    --- a/libnestutil/CMakeLists.txt
    +++ b/libnestutil/CMakeLists.txt
    @@ -17,9 +17,11 @@
     # 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
    +    dictionary.h dictionary.cpp
         dict_util.h
         enum_bitfield.h
         iaf_propagator.h iaf_propagator.cpp
    @@ -33,22 +35,28 @@ set( nestutil_sources
         sort.h
         string_utils.h
         vector_util.h
    -    )
    +)
     
    -add_library( nestutil STATIC ${nestutil_sources} )
    +add_library(nestutil STATIC ${nestutil_sources})
     
    -set_target_properties( nestutil
    -    PROPERTIES
    -    POSITION_INDEPENDENT_CODE ON
    -    )
    +if(APPLE)
    +    set_target_properties(nestutil PROPERTIES LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
    +endif()
     
    -target_link_libraries( nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} )
    +set_target_properties(nestutil PROPERTIES POSITION_INDEPENDENT_CODE ON)
     
    -target_include_directories( nestutil PRIVATE
    +target_link_libraries(nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} OpenMP::OpenMP_CXX)
    +
    +target_include_directories(nestutil PRIVATE
    +    ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
    +    ${PROJECT_SOURCE_DIR}/nestkernel
    +    ${PROJECT_SOURCE_DIR}/thirdparty
         ${Boost_INCLUDE_DIRS}
    -    )
    +)
    +
    +FILTER_HEADERS("${nestutil_sources}" install_headers)
     
    -FILTER_HEADERS("${nestutil_sources}" install_headers )
    -install( FILES ${install_headers} ${PROJECT_BINARY_DIR}/libnestutil/config.h
    -    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    +install(FILES ${install_headers} ${PROJECT_BINARY_DIR}/libnestutil/config.h
    +    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest
    +)
    diff --git a/sli/allocator.cpp b/libnestutil/allocator.cpp
    similarity index 90%
    rename from sli/allocator.cpp
    rename to libnestutil/allocator.cpp
    index f74d1b742c..ab5772a802 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 = nullptr;
     }
     
    -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;
    @@ -129,19 +129,19 @@ sli::pool::grow( size_t nelements )
       {
         reinterpret_cast< link* >( p )->next = reinterpret_cast< link* >( p + el_size );
       }
    -  reinterpret_cast< link* >( last )->next = nullptr;
    +  reinterpret_cast< link* >( last )->next = NULL;
       head = reinterpret_cast< link* >( start );
     }
     
     void
    -sli::pool::grow()
    +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 7904d7f40e..bb9dbf0960 100644
    --- a/sli/allocator.h
    +++ b/libnestutil/allocator.h
    @@ -31,7 +31,7 @@
     #include <cstdlib>
     #include <string>
     
    -namespace sli
    +namespace nest
     {
     
     /**
    diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h
    index 5648804bac..fa8a1dc752 100644
    --- a/libnestutil/block_vector.h
    +++ b/libnestutil/block_vector.h
    @@ -29,7 +29,7 @@
     #include <iterator>
     #include <vector>
     
    -#include "sliexceptions.h"
    +#include "exceptions.h"
     
     template < typename value_type_ >
     class BlockVector;
    @@ -556,35 +556,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/config.h.in b/libnestutil/config.h.in
    index a4c5ab01e2..01df7031c6 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/libnestutil/dict_util.h b/libnestutil/dict_util.h
    index eeb954b5f9..0714f5ff40 100644
    --- a/libnestutil/dict_util.h
    +++ b/libnestutil/dict_util.h
    @@ -25,43 +25,33 @@
     
     // Includes from nestkernel:
     #include "kernel_manager.h"
    -#include "nest_datums.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
    +#include "dictionary.h"
     
     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 >
    +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 )
    +  const auto it = d.find( key );
    +  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 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 );
    +    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 );
    +    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
    new file mode 100644
    index 0000000000..a3ead7e801
    --- /dev/null
    +++ b/libnestutil/dictionary.cpp
    @@ -0,0 +1,569 @@
    +/*
    + *  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 <http://www.gnu.org/licenses/>.
    + *
    + */
    +
    +#include <algorithm>
    +#include <boost/any.hpp>
    +#include <boost/core/demangle.hpp>
    +#include <iomanip>
    +#include <iostream>
    +#include <map>
    +#include <string>
    +#include <vector>
    +
    +#include "dictionary.h"
    +
    +#include "kernel_manager.h"
    +#include "parameter.h"
    +
    +/**
    + * General vector streamer.
    + * This templated operator streams all elements of a std::vector<>.
    + */
    +template < typename T >
    +std::ostream&
    +operator<<( std::ostream& os, const std::vector< T >& vec )
    +{
    +  os << "vector[";
    +  bool first = true;
    +  for ( const auto& element : vec )
    +  {
    +    if ( not first )
    +    {
    +      os << ", ";
    +    }
    +    os << element;
    +    first = false;
    +  }
    +  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 )
    +{
    +  return boost::core::demangle( 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.item ) + "\n";
    +  }
    +  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;
    +
    +    const auto& item = kv.second.item;
    +
    +    if ( is_type< int >( item ) )
    +    {
    +      type = "int";
    +      value_stream << boost::any_cast< int >( item ) << '\n';
    +    }
    +    else if ( is_type< unsigned int >( item ) )
    +    {
    +      type = "unsigned int";
    +      value_stream << boost::any_cast< unsigned int >( item ) << '\n';
    +    }
    +    else if ( is_type< long >( item ) )
    +    {
    +      type = "long";
    +      value_stream << boost::any_cast< long >( item ) << '\n';
    +    }
    +    else if ( is_type< size_t >( item ) )
    +    {
    +      type = "size_t";
    +      value_stream << boost::any_cast< size_t >( item ) << '\n';
    +    }
    +    else if ( is_type< double >( item ) )
    +    {
    +      type = "double";
    +      value_stream << boost::any_cast< double >( item ) << '\n';
    +    }
    +    else if ( is_type< bool >( item ) )
    +    {
    +      type = "bool";
    +      const auto value = boost::any_cast< bool >( item );
    +      value_stream << ( value ? "true" : "false" ) << '\n';
    +    }
    +    else if ( is_type< std::string >( item ) )
    +    {
    +      type = "std::string";
    +      value_stream << "\"" << boost::any_cast< std::string >( item ) << "\"\n";
    +    }
    +    else if ( is_type< std::vector< int > >( item ) )
    +    {
    +      type = "std::vector<int>";
    +      value_stream << boost::any_cast< std::vector< int > >( item ) << '\n';
    +    }
    +    else if ( is_type< std::vector< double > >( item ) )
    +    {
    +      type = "std::vector<double>";
    +      value_stream << boost::any_cast< std::vector< double > >( item ) << '\n';
    +    }
    +    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 > >( item ) )
    +    {
    +      type = "std::vector<std::string>";
    +      value_stream << boost::any_cast< std::vector< std::string > >( item ) << '\n';
    +    }
    +    else if ( is_type< std::vector< boost::any > >( item ) )
    +    {
    +      type = "vector<boost::any>";
    +      value_stream << "vector<any>" << '\n';
    +    }
    +    else if ( is_type< dictionary >( item ) )
    +    {
    +      type = "dictionary";
    +      value_stream << "dictionary" << '\n';
    +    }
    +    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 > >( item ) )
    +    {
    +      type = "NodeCollection";
    +      const auto nc = boost::any_cast< std::shared_ptr< nest::NodeCollection > >( item );
    +      nc->print_me( value_stream );
    +      value_stream << "\n";
    +    }
    +    else
    +    {
    +      throw nest::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 << "}";
    +}
    +
    +bool
    +value_equal( const boost::any& first, const boost::any& second )
    +{
    +  if ( is_type< int >( first ) )
    +  {
    +    if ( not is_type< 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_type< long >( first ) )
    +  {
    +    if ( not is_type< 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_type< size_t >( first ) )
    +  {
    +    if ( not is_type< 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_type< double >( first ) )
    +  {
    +    if ( not is_type< 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_type< bool >( first ) )
    +  {
    +    if ( not is_type< 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_type< std::string >( first ) )
    +  {
    +    if ( not is_type< std::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_type< std::vector< int > >( first ) )
    +  {
    +    if ( not is_type< std::vector< int > >( 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_type< std::vector< double > >( first ) )
    +  {
    +    if ( not is_type< std::vector< double > >( 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_type< std::vector< std::vector< double > > >( first ) )
    +  {
    +    if ( not is_type< std::vector< std::vector< double > > >( 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_type< std::vector< std::string > >( first ) )
    +  {
    +    if ( not is_type< std::vector< std::string > >( 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_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 ) )
    +    {
    +      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_type< std::shared_ptr< nest::Parameter > >( first ) )
    +  {
    +    if ( not is_type< std::shared_ptr< nest::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
    +  {
    +    std::string msg = std::string( "Unsupported type in dictionary::value_equal(): " ) + debug_type( first );
    +    throw nest::TypeMismatch( msg );
    +  }
    +  return true;
    +}
    +
    +
    +bool
    +dictionary::operator==( const dictionary& other ) const
    +{
    +  if ( size() != other.size() )
    +  {
    +    return false;
    +  }
    +  // Iterate elements in the other dictionary
    +  for ( const auto& [ other_key, other_entry ] : other )
    +  {
    +    // Check if it exists in this dictionary
    +    if ( not known( other_key ) )
    +    {
    +      return false;
    +    }
    +
    +    // Check for equality
    +    const auto& this_entry = maptype_::at( other_key );
    +    if ( not value_equal( this_entry.item, other_entry.item ) )
    +    {
    +      return false;
    +    }
    +  }
    +  // All elements are equal
    +  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 )
    +{
    +  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 )
    +{
    +  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 )
    +{
    +  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
    +{
    +  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 )
    +{
    +  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
    +{
    +  const auto it = maptype_::find( key );
    +  if ( it != end() )
    +  {
    +    register_access_( it->second );
    +  }
    +  return it;
    +}
    +
    +void
    +dictionary::init_access_flags( const bool thread_local_dict ) const
    +{
    +  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 bool thread_local_dict ) const
    +{
    +  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
    new file mode 100644
    index 0000000000..d46ff4a750
    --- /dev/null
    +++ b/libnestutil/dictionary.h
    @@ -0,0 +1,385 @@
    +/*
    + *  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 <http://www.gnu.org/licenses/>.
    + *
    + */
    +
    +#ifndef DICTIONARY_H
    +#define DICTIONARY_H
    +
    +#include <boost/any.hpp>
    +#include <map>
    +#include <string>
    +#include <vector>
    +
    +#include "exceptions.h"
    +
    +class dictionary;
    +
    +/**
    + * @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 );
    +
    +std::string debug_dict_types( const dictionary& dict );
    +
    +template < typename T >
    +bool
    +is_type( const boost::any& operand )
    +{
    +  return operand.type() == typeid( T );
    +}
    +
    +/**
    + * @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.
    + */
    +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?)
    +  //                   * 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, DictEntry_ >;
    +  using maptype_::maptype_; // Inherit constructors
    +
    +  /**
    +   * @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.
    +   * @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
    +  {
    +    try
    +    {
    +      return boost::any_cast< 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( T ).name() ) );
    +      throw nest::TypeMismatch( msg );
    +    }
    +  }
    +
    +  /**
    +   * @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.
    +   *
    +   * @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
    +  {
    +    if ( is_type< size_t >( value ) )
    +    {
    +      return cast_value_< size_t >( value, key );
    +    }
    +    else if ( is_type< long >( value ) )
    +    {
    +      return cast_value_< long >( value, key );
    +    }
    +    else if ( is_type< 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 ";
    +    throw nest::TypeMismatch( msg );
    +  }
    +
    +  void register_access_( const DictEntry_& entry ) const;
    +
    +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
    +  {
    +    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 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.
    +   * @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
    +  {
    +    auto it = find( key );
    +    if ( it != end() )
    +    {
    +      value = cast_value_< T >( it->second.item, key );
    +      return true;
    +    }
    +    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.
    +   *
    +   * @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
    +  {
    +    auto it = find( key );
    +    if ( it != end() )
    +    {
    +      value = cast_to_integer_( it->second.item, key );
    +      return true;
    +    }
    +    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.
    +   *
    +   * @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
    +  {
    +    // Bypass find() function to not set access flag
    +    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.
    +   *
    +   * 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.
    +   *
    +   * @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 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 bool thread_local_dict = false ) 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;
    +};
    +
    +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_ */
    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/models/CMakeLists.txt b/models/CMakeLists.txt
    index 4b861b13f3..ef98121528 100644
    --- a/models/CMakeLists.txt
    +++ b/models/CMakeLists.txt
    @@ -31,20 +31,20 @@ set(models_sources
     )
     
     add_library(models STATIC ${models_sources})
    -set_target_properties(models
    -    PROPERTIES
    -    POSITION_INDEPENDENT_CODE ON
    -)
     
    -target_link_libraries(models nestutil sli_lib nestkernel)
    +if(APPLE)
    +    set_target_properties(models PROPERTIES LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
    +endif()
    +
    +set_target_properties(models PROPERTIES POSITION_INDEPENDENT_CODE ON)
    +
    +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}/models
    -    ${PROJECT_SOURCE_DIR}/sli
    -    ${PROJECT_SOURCE_DIR}/models
         ${PROJECT_SOURCE_DIR}/nestkernel
     )
     
    diff --git a/models/ac_generator.cpp b/models/ac_generator.cpp
    index d7c5ea7751..42be4ebb02 100644
    --- a/models/ac_generator.cpp
    +++ b/models/ac_generator.cpp
    @@ -35,11 +35,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     namespace nest
     {
     void
    @@ -54,7 +49,7 @@ template <>
     void
     RecordablesMap< ac_generator >::create()
     {
    -  insert_( Name( names::I ), &ac_generator::get_I_ );
    +  insert_( names::I, &ac_generator::get_I_ );
     }
     }
     
    @@ -116,28 +111,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 ] = amp_;
    +  d[ names::offset ] = offset_;
    +  d[ names::phase ] = phi_deg_;
    +  d[ names::frequency ] = 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 ] = y_0_;
    +  d[ names::y_1 ] = 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, 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 );
     }
     
     
    @@ -253,11 +248,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 ] = input_param[ 0 ];
    +    d[ names::offset ] = input_param[ 1 ];
    +    d[ names::frequency ] = input_param[ 2 ];
    +    d[ names::phase ] = input_param[ 3 ];
         ptmp.set( d, this );
       }
     
    diff --git a/models/ac_generator.h b/models/ac_generator.h
    index 8f53ac5d7e..bb44a5c28e 100644
    --- a/models/ac_generator.h
    +++ b/models/ac_generator.h
    @@ -135,8 +135,8 @@ class ac_generator : public StimulationDevice
     
       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;
     
       StimulationDevice::Type get_type() const override;
       void set_data_from_stimulation_backend( std::vector< double >& input_param ) override;
    @@ -162,8 +162,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
       };
     
       // ------------------------------------------------------------
    @@ -177,7 +177,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
       };
     
       // ------------------------------------------------------------
    @@ -246,17 +246,17 @@ ac_generator::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 dc8298bc3e..9e8ab97c96 100644
    --- a/models/aeif_cond_alpha.cpp
    +++ b/models/aeif_cond_alpha.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -188,52 +186,52 @@ nest::aeif_cond_alpha::State_::operator=( const State_& 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 ] = 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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_syn_ex, node );
    +  update_value_param( d, names::tau_syn_in, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset_ >= V_peak_ )
       {
    @@ -286,26 +284,26 @@ 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 ] = 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 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 );
    -  if ( y_[ G_EXC ] < 0 or y_[ G_INH ] < 0 )
    +  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 1b4a3dbcac..9f34eb6cd4 100644
    --- a/models/aeif_cond_alpha.h
    +++ b/models/aeif_cond_alpha.h
    @@ -227,8 +227,8 @@ class aeif_cond_alpha : 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;
     
     private:
       void init_buffers_() override;
    @@ -274,8 +274,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -313,8 +313,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -440,17 +440,17 @@ aeif_cond_alpha::handles_test_event( DataLoggingRequest& dlr, size_t receptor_ty
     }
     
     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 ] = 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_astro.cpp b/models/aeif_cond_alpha_astro.cpp
    index 9b073b5487..92f6a4d17c 100644
    --- a/models/aeif_cond_alpha_astro.cpp
    +++ b/models/aeif_cond_alpha_astro.cpp
    @@ -41,9 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     /* ----------------------------------------------------------------
      * Recordables map
      * ---------------------------------------------------------------- */
    @@ -189,52 +186,52 @@ nest::aeif_cond_alpha_astro::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     void
    -nest::aeif_cond_alpha_astro::Parameters_::get( DictionaryDatum& d ) const
    +nest::aeif_cond_alpha_astro::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 ] = 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_astro::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::aeif_cond_alpha_astro::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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_syn_ex, node );
    +  update_value_param( d, names::tau_syn_in, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset_ >= V_peak_ )
       {
    @@ -287,25 +284,25 @@ nest::aeif_cond_alpha_astro::Parameters_::set( const DictionaryDatum& d, Node* n
     }
     
     void
    -nest::aeif_cond_alpha_astro::State_::get( DictionaryDatum& d ) const
    +nest::aeif_cond_alpha_astro::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 ] = 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_astro::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node )
    +nest::aeif_cond_alpha_astro::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, 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_astro.h b/models/aeif_cond_alpha_astro.h
    index ca8f63e845..0fa3f6e716 100644
    --- a/models/aeif_cond_alpha_astro.h
    +++ b/models/aeif_cond_alpha_astro.h
    @@ -236,8 +236,8 @@ class aeif_cond_alpha_astro : public ArchivingNode
       size_t handles_test_event( SICEvent&, 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;
    @@ -283,8 +283,8 @@ class aeif_cond_alpha_astro : 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:
    @@ -321,8 +321,8 @@ class aeif_cond_alpha_astro : public ArchivingNode
         State_( const State_& );
         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* );
       };
     
       // ----------------------------------------------------------------
    @@ -468,17 +468,17 @@ aeif_cond_alpha_astro::handles_test_event( DataLoggingRequest& dlr, size_t recep
     }
     
     inline void
    -aeif_cond_alpha_astro::get_status( DictionaryDatum& d ) const
    +aeif_cond_alpha_astro::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d );
       ArchivingNode::get_status( d );
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -aeif_cond_alpha_astro::set_status( const DictionaryDatum& d )
    +aeif_cond_alpha_astro::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 f027713973..e39cc027b0 100644
    --- a/models/aeif_cond_alpha_multisynapse.cpp
    +++ b/models/aeif_cond_alpha_multisynapse.cpp
    @@ -37,10 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     namespace nest // template specialization must be placed in namespace
     {
    @@ -69,12 +65,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
    @@ -185,44 +181,42 @@ 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() );
    -  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::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();
    +  d[ names::E_rev ] = E_rev;
    +  d[ names::tau_syn ] = tau_syn;
    +  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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, E_rev );
    +  bool tau_flag = d.update_value( names::tau_syn, tau_syn );
       if ( Erev_flag or tau_flag )
       { // receptor arrays have been modified
         if ( ( E_rev.size() != old_n_receptors or tau_syn.size() != old_n_receptors )
    @@ -253,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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_peak_ < V_th )
       {
    @@ -313,32 +307,32 @@ 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 ] = y_[ V_M ];
     
    -  std::vector< double >* dg = new std::vector< double >();
    -  std::vector< double >* g = new std::vector< double >();
    +  std::vector< double > dg;
    +  std::vector< double > g;
     
       for ( size_t i = 0;
             i < ( ( y_.size() - State_::NUMBER_OF_FIXED_STATES_ELEMENTS ) / State_::NUM_STATE_ELEMENTS_PER_RECEPTOR );
             ++i )
       {
    -    dg->push_back( y_[ State_::DG + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    -    g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    +    dg.push_back( y_[ State_::DG + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    +    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 ] = dg;
    +  d[ names::g ] = g;
     
    -  def< double >( d, names::w, y_[ W ] );
    +  d[ names::w ] = 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, y_[ V_M ], node );
    +  update_value_param( d, names::w, y_[ W ], node );
     }
     
     aeif_cond_alpha_multisynapse::Buffers_::Buffers_( aeif_cond_alpha_multisynapse& n )
    @@ -620,7 +614,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 ad46eaad82..971de6dc9a 100644
    --- a/models/aeif_cond_alpha_multisynapse.h
    +++ b/models/aeif_cond_alpha_multisynapse.h
    @@ -227,8 +227,8 @@ class aeif_cond_alpha_multisynapse : 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;
     
     private:
       void init_buffers_() override;
    @@ -272,8 +272,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
    @@ -316,8 +316,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_
     
    @@ -410,7 +410,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 );
     };
     
    @@ -444,13 +444,13 @@ aeif_cond_alpha_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_
     }
     
     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 ] = recordablesMap_.get_list();
     }
     
     } // namespace
    diff --git a/models/aeif_cond_beta_multisynapse.cpp b/models/aeif_cond_beta_multisynapse.cpp
    index 5ef7e10717..af3a021f7f 100644
    --- a/models/aeif_cond_beta_multisynapse.cpp
    +++ b/models/aeif_cond_beta_multisynapse.cpp
    @@ -38,10 +38,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     namespace nest // template specialization must be placed in namespace
     {
     void
    @@ -69,12 +65,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
    @@ -185,48 +181,45 @@ 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() );
    -  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::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();
    +  d[ names::E_rev ] = E_rev;
    +  d[ names::tau_rise ] = tau_rise;
    +  d[ names::tau_decay ] = tau_decay;
    +  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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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 );
    -  if ( Erev_flag or taur_flag or taud_flag )
    +  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 or tau_rise.size() != old_n_receptors
                or tau_decay.size() != old_n_receptors )
    @@ -261,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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_peak_ < V_th )
       {
    @@ -321,32 +314,32 @@ 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 ] = y_[ V_M ];
     
    -  std::vector< double >* dg = new std::vector< double >();
    -  std::vector< double >* g = new std::vector< double >();
    +  std::vector< double > dg;
    +  std::vector< double > g;
     
       for ( size_t i = 0;
             i < ( ( y_.size() - State_::NUMBER_OF_FIXED_STATES_ELEMENTS ) / State_::NUM_STATE_ELEMENTS_PER_RECEPTOR );
             ++i )
       {
    -    dg->push_back( y_[ State_::DG + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    -    g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    +    dg.push_back( y_[ State_::DG + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] );
    +    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 ] = dg;
    +  d[ names::g ] = g;
     
    -  def< double >( d, names::w, y_[ W ] );
    +  d[ names::w ] = 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, y_[ V_M ], node );
    +  update_value_param( d, names::w, y_[ W ], node );
     }
     
     aeif_cond_beta_multisynapse::Buffers_::Buffers_( aeif_cond_beta_multisynapse& n )
    @@ -629,7 +622,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 dd0c34bd3b..38a99b29e9 100644
    --- a/models/aeif_cond_beta_multisynapse.h
    +++ b/models/aeif_cond_beta_multisynapse.h
    @@ -230,8 +230,8 @@ class aeif_cond_beta_multisynapse : 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;
     
     private:
       void init_buffers_() override;
    @@ -275,8 +275,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
    @@ -319,8 +319,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_
     
    @@ -414,7 +414,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 );
     };
     
    @@ -448,13 +448,13 @@ aeif_cond_beta_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_t
     }
     
     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 ] = recordablesMap_.get_list();
     }
     
     } // namespace
    diff --git a/models/aeif_cond_exp.cpp b/models/aeif_cond_exp.cpp
    index cb0eb86d0c..69ad36ee0a 100644
    --- a/models/aeif_cond_exp.cpp
    +++ b/models/aeif_cond_exp.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -187,52 +185,52 @@ nest::aeif_cond_exp::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_syn_ex, node );
    +  update_value_param( d, names::tau_syn_in, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_peak_ < V_th )
       {
    @@ -285,21 +283,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 ] = 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 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, 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 or 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 bf040a664a..c987e1ec62 100644
    --- a/models/aeif_cond_exp.h
    +++ b/models/aeif_cond_exp.h
    @@ -228,8 +228,8 @@ class aeif_cond_exp : 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;
     
     private:
       void init_buffers_() override;
    @@ -275,8 +275,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -312,8 +312,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -433,17 +433,17 @@ aeif_cond_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 b4a1b9c86e..939dca053b 100644
    --- a/models/aeif_psc_alpha.cpp
    +++ b/models/aeif_psc_alpha.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -182,48 +180,48 @@ nest::aeif_psc_alpha::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_syn_ex, node );
    +  update_value_param( d, names::tau_syn_in, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset_ >= V_peak_ )
       {
    @@ -276,25 +274,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 ] = 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 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, 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 or 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 96149eefb6..aaf1396129 100644
    --- a/models/aeif_psc_alpha.h
    +++ b/models/aeif_psc_alpha.h
    @@ -217,8 +217,8 @@ class aeif_psc_alpha : 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;
     
     private:
       void init_buffers_() override;
    @@ -262,8 +262,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -301,8 +301,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -428,17 +428,17 @@ aeif_psc_alpha::handles_test_event( DataLoggingRequest& dlr, size_t receptor_typ
     }
     
     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 ] = 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 7cafe3ad64..9b094320bc 100644
    --- a/models/aeif_psc_delta.cpp
    +++ b/models/aeif_psc_delta.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -173,44 +171,44 @@ nest::aeif_psc_delta::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( 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::Delta_T, Delta_T, node );
    -  updateValueParam< double >( d, names::tau_w, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset_ >= V_peak_ )
       {
    @@ -261,21 +259,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, 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 ] = y_[ V_M ];
    +  d[ names::w ] = 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, 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 b055e1db95..078601cdd6 100644
    --- a/models/aeif_psc_delta.h
    +++ b/models/aeif_psc_delta.h
    @@ -206,8 +206,8 @@ class aeif_psc_delta : 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;
     
     private:
       void init_buffers_() override;
    @@ -251,8 +251,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:
    @@ -291,8 +291,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -417,17 +417,17 @@ aeif_psc_delta::handles_test_event( DataLoggingRequest& dlr, size_t receptor_typ
     }
     
     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 ] = 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 c45158ee77..0c921f9aa4 100644
    --- a/models/aeif_psc_delta_clopath.cpp
    +++ b/models/aeif_psc_delta_clopath.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -207,62 +205,62 @@ nest::aeif_psc_delta_clopath::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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_u_bar_plus, tau_u_bar_plus );
    -  def< double >( d, names::tau_u_bar_minus, tau_u_bar_minus );
    -  def< double >( d, names::tau_u_bar_bar, tau_u_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 ] = 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_u_bar_plus ] = tau_u_bar_plus;
    +  d[ names::tau_u_bar_minus ] = tau_u_bar_minus;
    +  d[ names::tau_u_bar_bar ] = tau_u_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 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_u_bar_plus, tau_u_bar_plus, node );
    -  updateValueParam< double >( d, names::tau_u_bar_minus, tau_u_bar_minus, node );
    -  updateValueParam< double >( d, names::tau_u_bar_bar, tau_u_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, 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_u_bar_plus, tau_u_bar_plus, node );
    +  update_value_param( d, names::tau_u_bar_minus, tau_u_bar_minus, node );
    +  update_value_param( d, names::tau_u_bar_bar, tau_u_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_ )
       {
    @@ -326,23 +324,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 ] = 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 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, 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 )
    diff --git a/models/aeif_psc_delta_clopath.h b/models/aeif_psc_delta_clopath.h
    index 505ccb6da0..26c1a51b46 100644
    --- a/models/aeif_psc_delta_clopath.h
    +++ b/models/aeif_psc_delta_clopath.h
    @@ -243,8 +243,8 @@ class aeif_psc_delta_clopath : public ClopathArchivingNode
       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;
     
     private:
       void init_buffers_() override;
    @@ -297,8 +297,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -338,8 +338,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -459,17 +459,17 @@ aeif_psc_delta_clopath::handles_test_event( DataLoggingRequest& dlr, size_t rece
     }
     
     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 ] = 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 6b8aec869c..8abce464f0 100644
    --- a/models/aeif_psc_exp.cpp
    +++ b/models/aeif_psc_exp.cpp
    @@ -41,8 +41,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -181,48 +179,48 @@ nest::aeif_psc_exp::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_syn_ex, node );
    +  update_value_param( d, names::tau_syn_in, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset_ >= V_peak_ )
       {
    @@ -275,21 +273,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 ] = 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 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, 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 or 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 540d6db015..d76e8da0d7 100644
    --- a/models/aeif_psc_exp.h
    +++ b/models/aeif_psc_exp.h
    @@ -214,8 +214,8 @@ class aeif_psc_exp : 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;
     
     private:
       void init_buffers_() override;
    @@ -259,8 +259,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -296,8 +296,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -417,17 +417,17 @@ aeif_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 06bce3bd22..f179479d2e 100644
    --- a/models/amat2_psc_exp.cpp
    +++ b/models/amat2_psc_exp.cpp
    @@ -33,8 +33,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -109,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 ] = 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
    -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, 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, 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,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 ] = 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 ] = 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 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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    @@ -205,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, 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 )
    diff --git a/models/amat2_psc_exp.h b/models/amat2_psc_exp.h
    index 3a7b0deecf..ea4483f954 100644
    --- a/models/amat2_psc_exp.h
    +++ b/models/amat2_psc_exp.h
    @@ -199,8 +199,8 @@ class amat2_psc_exp : public ArchivingNode
       void handle( CurrentEvent& ) override;
       void handle( DataLoggingRequest& ) 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;
    @@ -261,12 +261,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 dictionary
    +    double set( const dictionary&, Node* node );
       };
     
       // ----------------------------------------------------------------
    @@ -293,14 +293,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -452,17 +452,17 @@ amat2_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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/astrocyte_lr_1994.cpp b/models/astrocyte_lr_1994.cpp
    index cd32bf5bc5..f743a982e2 100644
    --- a/models/astrocyte_lr_1994.cpp
    +++ b/models/astrocyte_lr_1994.cpp
    @@ -40,9 +40,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     nest::RecordablesMap< nest::astrocyte_lr_1994 > nest::astrocyte_lr_1994::recordablesMap_;
     
     namespace nest
    @@ -164,45 +161,45 @@ nest::astrocyte_lr_1994::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     void
    -nest::astrocyte_lr_1994::Parameters_::get( DictionaryDatum& d ) const
    +nest::astrocyte_lr_1994::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::Ca_tot, Ca_tot_ );
    -  def< double >( d, names::IP3_0, IP3_0_ );
    -  def< double >( d, names::Kd_act, Kd_act_ );
    -  def< double >( d, names::Kd_inh, Kd_inh_ );
    -  def< double >( d, names::Kd_IP3_1, Kd_IP3_1_ );
    -  def< double >( d, names::Kd_IP3_2, Kd_IP3_2_ );
    -  def< double >( d, names::Km_SERCA, Km_SERCA_ );
    -  def< double >( d, names::ratio_ER_cyt, ratio_ER_cyt_ );
    -  def< double >( d, names::delta_IP3, delta_IP3_ );
    -  def< double >( d, names::k_IP3R, k_IP3R_ );
    -  def< double >( d, names::SIC_scale, SIC_scale_ );
    -  def< double >( d, names::SIC_th, SIC_th_ );
    -  def< double >( d, names::rate_L, rate_L_ );
    -  def< double >( d, names::rate_IP3R, rate_IP3R_ );
    -  def< double >( d, names::rate_SERCA, rate_SERCA_ );
    -  def< double >( d, names::tau_IP3, tau_IP3_ );
    +  d[ names::Ca_tot ] = Ca_tot_;
    +  d[ names::IP3_0 ] = IP3_0_;
    +  d[ names::Kd_act ] = Kd_act_;
    +  d[ names::Kd_inh ] = Kd_inh_;
    +  d[ names::Kd_IP3_1 ] = Kd_IP3_1_;
    +  d[ names::Kd_IP3_2 ] = Kd_IP3_2_;
    +  d[ names::Km_SERCA ] = Km_SERCA_;
    +  d[ names::ratio_ER_cyt ] = ratio_ER_cyt_;
    +  d[ names::delta_IP3 ] = delta_IP3_;
    +  d[ names::k_IP3R ] = k_IP3R_;
    +  d[ names::SIC_scale ] = SIC_scale_;
    +  d[ names::SIC_th ] = SIC_th_;
    +  d[ names::rate_L ] = rate_L_;
    +  d[ names::rate_IP3R ] = rate_IP3R_;
    +  d[ names::rate_SERCA ] = rate_SERCA_;
    +  d[ names::tau_IP3 ] = tau_IP3_;
     }
     
     void
    -nest::astrocyte_lr_1994::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::astrocyte_lr_1994::Parameters_::set( const dictionary& d, Node* node )
     {
    -  updateValueParam< double >( d, names::Ca_tot, Ca_tot_, node );
    -  updateValueParam< double >( d, names::IP3_0, IP3_0_, node );
    -  updateValueParam< double >( d, names::Kd_act, Kd_act_, node );
    -  updateValueParam< double >( d, names::Kd_inh, Kd_inh_, node );
    -  updateValueParam< double >( d, names::Kd_IP3_1, Kd_IP3_1_, node );
    -  updateValueParam< double >( d, names::Kd_IP3_2, Kd_IP3_2_, node );
    -  updateValueParam< double >( d, names::Km_SERCA, Km_SERCA_, node );
    -  updateValueParam< double >( d, names::ratio_ER_cyt, ratio_ER_cyt_, node );
    -  updateValueParam< double >( d, names::delta_IP3, delta_IP3_, node );
    -  updateValueParam< double >( d, names::k_IP3R, k_IP3R_, node );
    -  updateValueParam< double >( d, names::SIC_scale, SIC_scale_, node );
    -  updateValueParam< double >( d, names::SIC_th, SIC_th_, node );
    -  updateValueParam< double >( d, names::rate_L, rate_L_, node );
    -  updateValueParam< double >( d, names::rate_IP3R, rate_IP3R_, node );
    -  updateValueParam< double >( d, names::rate_SERCA, rate_SERCA_, node );
    -  updateValueParam< double >( d, names::tau_IP3, tau_IP3_, node );
    +  update_value_param( d, names::Ca_tot, Ca_tot_, node );
    +  update_value_param( d, names::IP3_0, IP3_0_, node );
    +  update_value_param( d, names::Kd_act, Kd_act_, node );
    +  update_value_param( d, names::Kd_inh, Kd_inh_, node );
    +  update_value_param( d, names::Kd_IP3_1, Kd_IP3_1_, node );
    +  update_value_param( d, names::Kd_IP3_2, Kd_IP3_2_, node );
    +  update_value_param( d, names::Km_SERCA, Km_SERCA_, node );
    +  update_value_param( d, names::ratio_ER_cyt, ratio_ER_cyt_, node );
    +  update_value_param( d, names::delta_IP3, delta_IP3_, node );
    +  update_value_param( d, names::k_IP3R, k_IP3R_, node );
    +  update_value_param( d, names::SIC_scale, SIC_scale_, node );
    +  update_value_param( d, names::SIC_th, SIC_th_, node );
    +  update_value_param( d, names::rate_L, rate_L_, node );
    +  update_value_param( d, names::rate_IP3R, rate_IP3R_, node );
    +  update_value_param( d, names::rate_SERCA, rate_SERCA_, node );
    +  update_value_param( d, names::tau_IP3, tau_IP3_, node );
     
       if ( Ca_tot_ <= 0 )
       {
    @@ -275,19 +272,19 @@ nest::astrocyte_lr_1994::Parameters_::set( const DictionaryDatum& d, Node* node
     }
     
     void
    -nest::astrocyte_lr_1994::State_::get( DictionaryDatum& d ) const
    +nest::astrocyte_lr_1994::State_::get( dictionary& d ) const
     {
    -  def< double >( d, names::IP3, y_[ IP3 ] );
    -  def< double >( d, names::Ca_astro, y_[ Ca_astro ] );
    -  def< double >( d, names::h_IP3R, y_[ h_IP3R ] );
    +  d[ names::IP3 ] = y_[ IP3 ];
    +  d[ names::Ca_astro ] = y_[ Ca_astro ];
    +  d[ names::h_IP3R ] = y_[ h_IP3R ];
     }
     
     void
    -nest::astrocyte_lr_1994::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node )
    +nest::astrocyte_lr_1994::State_::set( const dictionary& d, const Parameters_&, Node* node )
     {
    -  updateValueParam< double >( d, names::IP3, y_[ IP3 ], node );
    -  updateValueParam< double >( d, names::Ca_astro, y_[ Ca_astro ], node );
    -  updateValueParam< double >( d, names::h_IP3R, y_[ h_IP3R ], node );
    +  update_value_param( d, names::IP3, y_[ IP3 ], 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/models/astrocyte_lr_1994.h b/models/astrocyte_lr_1994.h
    index 8262f7c679..65e702ee4f 100644
    --- a/models/astrocyte_lr_1994.h
    +++ b/models/astrocyte_lr_1994.h
    @@ -279,8 +279,8 @@ class astrocyte_lr_1994 : public Node
       {
       }
     
    -  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;
    @@ -331,8 +331,8 @@ class astrocyte_lr_1994 : public Node
     
         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:
    @@ -367,8 +367,8 @@ class astrocyte_lr_1994 : public Node
     
         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* );
       };
     
       // ----------------------------------------------------------------
    @@ -467,16 +467,16 @@ astrocyte_lr_1994::handles_test_event( DataLoggingRequest& dlr, size_t receptor_
     }
     
     inline void
    -astrocyte_lr_1994::get_status( DictionaryDatum& d ) const
    +astrocyte_lr_1994::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d );
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -astrocyte_lr_1994::set_status( const DictionaryDatum& d )
    +astrocyte_lr_1994::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/bernoulli_synapse.h b/models/bernoulli_synapse.h
    index 78a6faa963..b2c9d0914e 100644
    --- a/models/bernoulli_synapse.h
    +++ b/models/bernoulli_synapse.h
    @@ -175,9 +175,9 @@ class bernoulli_synapse : public Connection< targetidentifierT >
         return send_spike;
       }
     
    -  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 )
    @@ -195,21 +195,21 @@ constexpr ConnectionModelProperties bernoulli_synapse< targetidentifierT >::prop
     
     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 ] = weight_;
    +  d[ names::p_transmit ] = p_transmit_;
    +  d[ names::size_of ] = 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, weight_ );
    +  d.update_value( names::p_transmit, p_transmit_ );
     
       if ( p_transmit_ < 0 or p_transmit_ > 1 )
       {
    diff --git a/models/binary_neuron.h b/models/binary_neuron.h
    index d3854d650e..6020c7bbb7 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
     {
    @@ -107,8 +102,8 @@ class binary_neuron : public ArchivingNode
       SignalType sends_signal() const override;
       SignalType receives_signal() const 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;
     
    @@ -139,8 +134,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ----------------------------------------------------------------
    @@ -158,8 +153,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -288,19 +283,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 ] = 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
    @@ -350,16 +345,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 ] = 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, tau_m_, node );
       if ( tau_m_ <= 0 )
       {
         throw BadProperty( "All time constants must be strictly positive." );
    @@ -368,15 +363,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 ] = h_; // summed input
    +  d[ names::S ] = 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 331907f0b2..ada878b21b 100644
    --- a/models/clopath_synapse.h
    +++ b/models/clopath_synapse.h
    @@ -34,9 +34,6 @@
     #include "nest.h"
     #include "ring_buffer.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -155,12 +152,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.
    @@ -300,27 +297,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 ] = 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 >
     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, 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/cm_compartmentcurrents.cpp b/models/cm_compartmentcurrents.cpp
    index ddaed802a6..12bd9b1d63 100644
    --- a/models/cm_compartmentcurrents.cpp
    +++ b/models/cm_compartmentcurrents.cpp
    @@ -34,8 +34,7 @@ nest::Na::Na( double v_comp )
       // some default initialization
       init_statevars( v_comp );
     }
    -
    -nest::Na::Na( double v_comp, const DictionaryDatum& channel_params )
    +nest::Na::Na( double v_comp, const dictionary& channel_params )
       // state variables
       : m_Na_( 0.0 )
       , h_Na_( 0.0 )
    @@ -45,13 +44,13 @@ nest::Na::Na( double v_comp, const DictionaryDatum& channel_params )
       , q10_( 1. / 3.21 )
     {
       // update sodium channel parameters
    -  if ( channel_params->known( "gbar_Na" ) )
    +  if ( channel_params.known( "gbar_Na" ) )
       {
    -    gbar_Na_ = getValue< double >( channel_params, "gbar_Na" );
    +    gbar_Na_ = channel_params.get< double >( "gbar_Na" );
       }
    -  if ( channel_params->known( "e_Na" ) )
    +  if ( channel_params.known( "e_Na" ) )
       {
    -    e_Na_ = getValue< double >( channel_params, "e_Na" );
    +    e_Na_ = channel_params.get< double >( "e_Na" );
       }
     
       init_statevars( v_comp );
    @@ -69,10 +68,10 @@ nest::Na::init_statevars( double v_init )
     }
     
     void
    -nest::Na::append_recordables( std::map< Name, double* >* recordables, const long compartment_idx )
    +nest::Na::append_recordables( std::map< std::string, double* >* recordables, const long compartment_idx )
     {
    -  ( *recordables )[ Name( "m_Na_" + std::to_string( compartment_idx ) ) ] = &m_Na_;
    -  ( *recordables )[ Name( "h_Na_" + std::to_string( compartment_idx ) ) ] = &h_Na_;
    +  ( *recordables )[ "m_Na_" + std::to_string( compartment_idx ) ] = &m_Na_;
    +  ( *recordables )[ "h_Na_" + std::to_string( compartment_idx ) ] = &h_Na_;
     }
     
     std::pair< double, double >
    @@ -198,7 +197,7 @@ nest::K::K( double v_comp )
       init_statevars( v_comp );
     }
     
    -nest::K::K( double v_comp, const DictionaryDatum& channel_params )
    +nest::K::K( double v_comp, const dictionary& channel_params )
       // state variables
       : n_K_( 0.0 )
       // parameters
    @@ -207,13 +206,13 @@ nest::K::K( double v_comp, const DictionaryDatum& channel_params )
       , q10_( 1. / 3.21 )
     {
       // update potassium channel parameters
    -  if ( channel_params->known( "gbar_K" ) )
    +  if ( channel_params.known( "gbar_K" ) )
       {
    -    gbar_K_ = getValue< double >( channel_params, "gbar_K" );
    +    gbar_K_ = channel_params.get< double >( "gbar_K" );
       }
    -  if ( channel_params->known( "e_Na" ) )
    +  if ( channel_params.known( "e_Na" ) )
       {
    -    e_K_ = getValue< double >( channel_params, "e_K" );
    +    e_K_ = channel_params.get< double >( "e_K" );
       }
     
       // initialize the state variables
    @@ -229,9 +228,9 @@ nest::K::init_statevars( double v_init )
     }
     
     void
    -nest::K::append_recordables( std::map< Name, double* >* recordables, const long compartment_idx )
    +nest::K::append_recordables( std::map< std::string, double* >* recordables, const long compartment_idx )
     {
    -  ( *recordables )[ Name( "n_K_" + std::to_string( compartment_idx ) ) ] = &n_K_;
    +  ( *recordables )[ "n_K_" + std::to_string( compartment_idx ) ] = &n_K_;
     }
     
     std::pair< double, double >
    @@ -319,7 +318,7 @@ nest::AMPA::AMPA( const long syn_index )
       g_norm_ = 1. / ( -std::exp( -tp / tau_r_ ) + std::exp( -tp / tau_d_ ) );
     }
     
    -nest::AMPA::AMPA( const long syn_index, const DictionaryDatum& receptor_params )
    +nest::AMPA::AMPA( const long syn_index, const dictionary& receptor_params )
       // initialization state variables
       : g_r_AMPA_( 0.0 )
       , g_d_AMPA_( 0.0 )
    @@ -335,17 +334,17 @@ nest::AMPA::AMPA( const long syn_index, const DictionaryDatum& receptor_params )
       syn_idx = syn_index;
     
       // update AMPA receptor parameters
    -  if ( receptor_params->known( "e_AMPA" ) )
    +  if ( receptor_params.known( "e_AMPA" ) )
       {
    -    e_rev_ = getValue< double >( receptor_params, "e_AMPA" );
    +    e_rev_ = receptor_params.get< double >( "e_AMPA" );
       }
    -  if ( receptor_params->known( "tau_r_AMPA" ) )
    +  if ( receptor_params.known( "tau_r_AMPA" ) )
       {
    -    tau_r_ = getValue< double >( receptor_params, "tau_r_AMPA" );
    +    tau_r_ = receptor_params.get< double >( "tau_r_AMPA" );
       }
    -  if ( receptor_params->known( "tau_d_AMPA" ) )
    +  if ( receptor_params.known( "tau_d_AMPA" ) )
       {
    -    tau_d_ = getValue< double >( receptor_params, "tau_d_AMPA" );
    +    tau_d_ = receptor_params.get< double >( "tau_d_AMPA" );
       }
     
       double tp = ( tau_r_ * tau_d_ ) / ( tau_d_ - tau_r_ ) * std::log( tau_d_ / tau_r_ );
    @@ -353,10 +352,10 @@ nest::AMPA::AMPA( const long syn_index, const DictionaryDatum& receptor_params )
     }
     
     void
    -nest::AMPA::append_recordables( std::map< Name, double* >* recordables )
    +nest::AMPA::append_recordables( std::map< std::string, double* >* recordables )
     {
    -  ( *recordables )[ Name( "g_r_AMPA_" + std::to_string( syn_idx ) ) ] = &g_r_AMPA_;
    -  ( *recordables )[ Name( "g_d_AMPA_" + std::to_string( syn_idx ) ) ] = &g_d_AMPA_;
    +  ( *recordables )[ "g_r_AMPA_" + std::to_string( syn_idx ) ] = &g_r_AMPA_;
    +  ( *recordables )[ "g_d_AMPA_" + std::to_string( syn_idx ) ] = &g_d_AMPA_;
     }
     
     std::pair< double, double >
    @@ -406,7 +405,7 @@ nest::GABA::GABA( const long syn_index )
       g_norm_ = 1. / ( -std::exp( -tp / tau_r_ ) + std::exp( -tp / tau_d_ ) );
     }
     
    -nest::GABA::GABA( const long syn_index, const DictionaryDatum& receptor_params )
    +nest::GABA::GABA( const long syn_index, const dictionary& receptor_params )
       // initialization state variables
       : g_r_GABA_( 0.0 )
       , g_d_GABA_( 0.0 )
    @@ -422,17 +421,17 @@ nest::GABA::GABA( const long syn_index, const DictionaryDatum& receptor_params )
       syn_idx = syn_index;
     
       // update GABA receptor parameters
    -  if ( receptor_params->known( "e_GABA" ) )
    +  if ( receptor_params.known( "e_GABA" ) )
       {
    -    e_rev_ = getValue< double >( receptor_params, "e_GABA" );
    +    e_rev_ = receptor_params.get< double >( "e_GABA" );
       }
    -  if ( receptor_params->known( "tau_r_GABA" ) )
    +  if ( receptor_params.known( "tau_r_GABA" ) )
       {
    -    tau_r_ = getValue< double >( receptor_params, "tau_r_GABA" );
    +    tau_r_ = receptor_params.get< double >( "tau_r_GABA" );
       }
    -  if ( receptor_params->known( "tau_d_GABA" ) )
    +  if ( receptor_params.known( "tau_d_GABA" ) )
       {
    -    tau_d_ = getValue< double >( receptor_params, "tau_d_GABA" );
    +    tau_d_ = receptor_params.get< double >( "tau_d_GABA" );
       }
     
       double tp = ( tau_r_ * tau_d_ ) / ( tau_d_ - tau_r_ ) * std::log( tau_d_ / tau_r_ );
    @@ -440,10 +439,10 @@ nest::GABA::GABA( const long syn_index, const DictionaryDatum& receptor_params )
     }
     
     void
    -nest::GABA::append_recordables( std::map< Name, double* >* recordables )
    +nest::GABA::append_recordables( std::map< std::string, double* >* recordables )
     {
    -  ( *recordables )[ Name( "g_r_GABA_" + std::to_string( syn_idx ) ) ] = &g_r_GABA_;
    -  ( *recordables )[ Name( "g_d_GABA_" + std::to_string( syn_idx ) ) ] = &g_d_GABA_;
    +  ( *recordables )[ "g_r_GABA_" + std::to_string( syn_idx ) ] = &g_r_GABA_;
    +  ( *recordables )[ "g_d_GABA_" + std::to_string( syn_idx ) ] = &g_d_GABA_;
     }
     
     std::pair< double, double >
    @@ -493,7 +492,7 @@ nest::NMDA::NMDA( const long syn_index )
       g_norm_ = 1. / ( -std::exp( -tp / tau_r_ ) + std::exp( -tp / tau_d_ ) );
     }
     
    -nest::NMDA::NMDA( const long syn_index, const DictionaryDatum& receptor_params )
    +nest::NMDA::NMDA( const long syn_index, const dictionary& receptor_params )
       // initialization state variables
       : g_r_NMDA_( 0.0 )
       , g_d_NMDA_( 0.0 )
    @@ -509,17 +508,17 @@ nest::NMDA::NMDA( const long syn_index, const DictionaryDatum& receptor_params )
       syn_idx = syn_index;
     
       // update NMDA receptor parameters
    -  if ( receptor_params->known( "e_NMDA" ) )
    +  if ( receptor_params.known( "e_NMDA" ) )
       {
    -    e_rev_ = getValue< double >( receptor_params, "e_NMDA" );
    +    e_rev_ = receptor_params.get< double >( "e_NMDA" );
       }
    -  if ( receptor_params->known( "tau_r_NMDA" ) )
    +  if ( receptor_params.known( "tau_r_NMDA" ) )
       {
    -    tau_r_ = getValue< double >( receptor_params, "tau_r_NMDA" );
    +    tau_r_ = receptor_params.get< double >( "tau_r_NMDA" );
       }
    -  if ( receptor_params->known( "tau_d_NMDA" ) )
    +  if ( receptor_params.known( "tau_d_NMDA" ) )
       {
    -    tau_d_ = getValue< double >( receptor_params, "tau_d_NMDA" );
    +    tau_d_ = receptor_params.get< double >( "tau_d_NMDA" );
       }
     
       double tp = ( tau_r_ * tau_d_ ) / ( tau_d_ - tau_r_ ) * std::log( tau_d_ / tau_r_ );
    @@ -527,10 +526,10 @@ nest::NMDA::NMDA( const long syn_index, const DictionaryDatum& receptor_params )
     }
     
     void
    -nest::NMDA::append_recordables( std::map< Name, double* >* recordables )
    +nest::NMDA::append_recordables( std::map< std::string, double* >* recordables )
     {
    -  ( *recordables )[ Name( "g_r_NMDA_" + std::to_string( syn_idx ) ) ] = &g_r_NMDA_;
    -  ( *recordables )[ Name( "g_d_NMDA_" + std::to_string( syn_idx ) ) ] = &g_d_NMDA_;
    +  ( *recordables )[ "g_r_NMDA_" + std::to_string( syn_idx ) ] = &g_r_NMDA_;
    +  ( *recordables )[ "g_d_NMDA_" + std::to_string( syn_idx ) ] = &g_d_NMDA_;
     }
     
     std::pair< double, double >
    @@ -595,7 +594,7 @@ nest::AMPA_NMDA::AMPA_NMDA( const long syn_index )
       g_norm_NMDA_ = 1. / ( -std::exp( -tp / tau_r_NMDA_ ) + std::exp( -tp / tau_d_NMDA_ ) );
     }
     
    -nest::AMPA_NMDA::AMPA_NMDA( const long syn_index, const DictionaryDatum& receptor_params )
    +nest::AMPA_NMDA::AMPA_NMDA( const long syn_index, const dictionary& receptor_params )
       // initialization state variables
       : g_r_AN_AMPA_( 0.0 )
       , g_d_AN_AMPA_( 0.0 )
    @@ -619,29 +618,29 @@ nest::AMPA_NMDA::AMPA_NMDA( const long syn_index, const DictionaryDatum& recepto
       syn_idx = syn_index;
     
       // update AMPA+NMDA receptor parameters
    -  if ( receptor_params->known( "e_AMPA_NMDA" ) )
    +  if ( receptor_params.known( "e_AMPA_NMDA" ) )
       {
    -    e_rev_ = getValue< double >( receptor_params, "e_AMPA_NMDA" );
    +    e_rev_ = receptor_params.get< double >( "e_AMPA_NMDA" );
       }
    -  if ( receptor_params->known( "tau_r_AMPA" ) )
    +  if ( receptor_params.known( "tau_r_AMPA" ) )
       {
    -    tau_r_AMPA_ = getValue< double >( receptor_params, "tau_r_AMPA" );
    +    tau_r_AMPA_ = receptor_params.get< double >( "tau_r_AMPA" );
       }
    -  if ( receptor_params->known( "tau_d_AMPA" ) )
    +  if ( receptor_params.known( "tau_d_AMPA" ) )
       {
    -    tau_d_AMPA_ = getValue< double >( receptor_params, "tau_d_AMPA" );
    +    tau_d_AMPA_ = receptor_params.get< double >( "tau_d_AMPA" );
       }
    -  if ( receptor_params->known( "tau_r_NMDA" ) )
    +  if ( receptor_params.known( "tau_r_NMDA" ) )
       {
    -    tau_r_NMDA_ = getValue< double >( receptor_params, "tau_r_NMDA" );
    +    tau_r_NMDA_ = receptor_params.get< double >( "tau_r_NMDA" );
       }
    -  if ( receptor_params->known( "tau_d_NMDA" ) )
    +  if ( receptor_params.known( "tau_d_NMDA" ) )
       {
    -    tau_d_NMDA_ = getValue< double >( receptor_params, "tau_d_NMDA" );
    +    tau_d_NMDA_ = receptor_params.get< double >( "tau_d_NMDA" );
       }
    -  if ( receptor_params->known( "NMDA_ratio" ) )
    +  if ( receptor_params.known( "NMDA_ratio" ) )
       {
    -    NMDA_ratio_ = getValue< double >( receptor_params, "NMDA_ratio" );
    +    NMDA_ratio_ = receptor_params.get< double >( "NMDA_ratio" );
       }
     
       // AMPA normalization constant
    @@ -653,12 +652,12 @@ nest::AMPA_NMDA::AMPA_NMDA( const long syn_index, const DictionaryDatum& recepto
     }
     
     void
    -nest::AMPA_NMDA::append_recordables( std::map< Name, double* >* recordables )
    +nest::AMPA_NMDA::append_recordables( std::map< std::string, double* >* recordables )
     {
    -  ( *recordables )[ Name( "g_r_AN_AMPA_" + std::to_string( syn_idx ) ) ] = &g_r_AN_AMPA_;
    -  ( *recordables )[ Name( "g_d_AN_AMPA_" + std::to_string( syn_idx ) ) ] = &g_d_AN_AMPA_;
    -  ( *recordables )[ Name( "g_r_AN_NMDA_" + std::to_string( syn_idx ) ) ] = &g_r_AN_NMDA_;
    -  ( *recordables )[ Name( "g_d_AN_NMDA_" + std::to_string( syn_idx ) ) ] = &g_d_AN_NMDA_;
    +  ( *recordables )[ "g_r_AN_AMPA_" + std::to_string( syn_idx ) ] = &g_r_AN_AMPA_;
    +  ( *recordables )[ "g_d_AN_AMPA_" + std::to_string( syn_idx ) ] = &g_d_AN_AMPA_;
    +  ( *recordables )[ "g_r_AN_NMDA_" + std::to_string( syn_idx ) ] = &g_r_AN_NMDA_;
    +  ( *recordables )[ "g_d_AN_NMDA_" + std::to_string( syn_idx ) ] = &g_d_AN_NMDA_;
     }
     
     std::pair< double, double >
    @@ -706,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 87135ffe07..0d3402d87e 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -60,14 +60,13 @@ class Na
     
     public:
       Na( double v_comp );
    -  explicit Na( double v_comp, const DictionaryDatum& channel_params );
    +  explicit Na( double v_comp, const dictionary& channel_params );
       ~Na() {};
     
       void init_statevars( double v_init );
       void pre_run_hook() {};
    -
       //! make the state variables of this channel accessible
    -  void append_recordables( std::map< Name, double* >* recordables, const long compartment_idx );
    +  void append_recordables( std::map< std::string, double* >* recordables, const long compartment_idx );
     
       //! compute state variable time scale and asymptotic values
       std::pair< double, double > compute_statevar_m( double v_comp );
    @@ -103,14 +102,13 @@ class K
     
     public:
       K( double v_comp );
    -  explicit K( double v_comp, const DictionaryDatum& channel_params );
    +  explicit K( double v_comp, const dictionary& channel_params );
       ~K() {};
     
       void init_statevars( double v_init );
       void pre_run_hook() {};
    -
       //! make the state variables of this channel accessible
    -  void append_recordables( std::map< Name, double* >* recordables, const long compartment_idx );
    +  void append_recordables( std::map< std::string, double* >* recordables, const long compartment_idx );
     
       //! compute state variable time scale and asymptotic values
       std::pair< double, double > compute_statevar_n( double v_comp );
    @@ -147,7 +145,7 @@ class AMPA
     
     public:
       explicit AMPA( const long syn_index );
    -  AMPA( const long syn_index, const DictionaryDatum& receptor_params );
    +  AMPA( const long syn_index, const dictionary& receptor_params );
       ~AMPA() {};
     
       long
    @@ -169,7 +167,7 @@ class AMPA
       };
     
       //! make the state variables of this receptor accessible
    -  void append_recordables( std::map< Name, double* >* recordables );
    +  void append_recordables( std::map< std::string, double* >* recordables );
     
       //! associate the receptor with a spike buffer
       void
    @@ -210,7 +208,7 @@ class GABA
     
     public:
       explicit GABA( const long syn_index );
    -  GABA( const long syn_index, const DictionaryDatum& receptor_params );
    +  GABA( const long syn_index, const dictionary& receptor_params );
       ~GABA() {};
     
       long
    @@ -232,7 +230,7 @@ class GABA
       };
     
       //! make the state variables of this receptor accessible
    -  void append_recordables( std::map< Name, double* >* recordables );
    +  void append_recordables( std::map< std::string, double* >* recordables );
     
       //! associate the receptor with a spike buffer
       void
    @@ -273,7 +271,7 @@ class NMDA
     
     public:
       explicit NMDA( const long syn_index );
    -  NMDA( const long syn_index, const DictionaryDatum& receptor_params );
    +  NMDA( const long syn_index, const dictionary& receptor_params );
       ~NMDA() {};
     
       long
    @@ -295,7 +293,7 @@ class NMDA
       };
     
       //! make the state variables of this receptor accessible
    -  void append_recordables( std::map< Name, double* >* recordables );
    +  void append_recordables( std::map< std::string, double* >* recordables );
     
       //! associate the receptor with a spike buffer
       void
    @@ -355,7 +353,7 @@ class AMPA_NMDA
     public:
       // constructor, destructor
       explicit AMPA_NMDA( const long syn_index );
    -  AMPA_NMDA( const long syn_index, const DictionaryDatum& receptor_params );
    +  AMPA_NMDA( const long syn_index, const dictionary& receptor_params );
       ~AMPA_NMDA() {};
     
       long
    @@ -378,7 +376,7 @@ class AMPA_NMDA
       };
     
       //! make the state variables of this receptor accessible
    -  void append_recordables( std::map< Name, double* >* recordables );
    +  void append_recordables( std::map< std::string, double* >* recordables );
     
       //! associate the receptor with a spike buffer
       void
    @@ -416,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,9 +475,9 @@ class CompartmentCurrents
         }
       };
       void
    -  add_synapse( const std::string& type, const long syn_idx, const DictionaryDatum& receptor_params )
    +  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" )
         {
    @@ -506,47 +504,47 @@ 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
    -  add_receptor_info( ArrayDatum& ad, const long compartment_index )
    +  add_receptor_info( std::vector< dictionary >& info, const long compartment_index )
       {
         // receptor info for AMPA synapses
         for ( auto syn_it = AMPA_syns_.begin(); syn_it != AMPA_syns_.end(); ++syn_it )
         {
    -      DictionaryDatum dd = DictionaryDatum( new Dictionary );
    -      def< long >( dd, names::receptor_idx, syn_it->get_syn_idx() );
    -      def< long >( dd, names::comp_idx, compartment_index );
    -      def< std::string >( dd, names::receptor_type, "AMPA" );
    -      ad.push_back( dd );
    +      dictionary dd;
    +      dd[ names::receptor_idx ] = syn_it->get_syn_idx();
    +      dd[ names::comp_idx ] = compartment_index;
    +      dd[ names::receptor_type ] = std::string( "AMPA" );
    +      info.push_back( dd );
         }
         // receptor info for GABA synapses
         for ( auto syn_it = GABA_syns_.begin(); syn_it != GABA_syns_.end(); ++syn_it )
         {
    -      DictionaryDatum dd = DictionaryDatum( new Dictionary );
    -      def< long >( dd, names::receptor_idx, syn_it->get_syn_idx() );
    -      def< long >( dd, names::comp_idx, compartment_index );
    -      def< std::string >( dd, names::receptor_type, "GABA" );
    -      ad.push_back( dd );
    +      dictionary dd;
    +      dd[ names::receptor_idx ] = syn_it->get_syn_idx();
    +      dd[ names::comp_idx ] = compartment_index;
    +      dd[ names::receptor_type ] = std::string( "GABA" );
    +      info.push_back( dd );
         }
         // receptor info for NMDA synapses
         for ( auto syn_it = NMDA_syns_.begin(); syn_it != NMDA_syns_.end(); ++syn_it )
         {
    -      DictionaryDatum dd = DictionaryDatum( new Dictionary );
    -      def< long >( dd, names::receptor_idx, syn_it->get_syn_idx() );
    -      def< long >( dd, names::comp_idx, compartment_index );
    -      def< std::string >( dd, names::receptor_type, "NMDA" );
    -      ad.push_back( dd );
    +      dictionary dd;
    +      dd[ names::receptor_idx ] = syn_it->get_syn_idx();
    +      dd[ names::comp_idx ] = compartment_index;
    +      dd[ names::receptor_type ] = std::string( "NMDA" );
    +      info.push_back( dd );
         }
         // receptor info for AMPA_NMDA synapses
         for ( auto syn_it = AMPA_NMDA_syns_.begin(); syn_it != AMPA_NMDA_syns_.end(); ++syn_it )
         {
    -      DictionaryDatum dd = DictionaryDatum( new Dictionary );
    -      def< long >( dd, names::receptor_idx, syn_it->get_syn_idx() );
    -      def< long >( dd, names::comp_idx, compartment_index );
    -      def< std::string >( dd, names::receptor_type, "AMPA_NMDA" );
    -      ad.push_back( dd );
    +      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" );
    +      info.push_back( dd );
         }
       };
     
    @@ -575,11 +573,11 @@ class CompartmentCurrents
         }
       }
     
    -  std::map< Name, double* >
    +  std::map< std::string, double* >
       get_recordables( const long compartment_idx )
       {
     
    -    std::map< Name, double* > recordables;
    +    std::map< std::string, double* > recordables;
     
         // recordables sodium channel
         Na_chan_.append_recordables( &recordables, compartment_idx );
    diff --git a/models/cm_default.cpp b/models/cm_default.cpp
    index 37b714929b..285c8e1534 100644
    --- a/models/cm_default.cpp
    +++ b/models/cm_default.cpp
    @@ -76,40 +76,40 @@ nest::cm_default::cm_default( const cm_default& n )
      * ----------------------------------------------------------------
      */
     void
    -cm_default::get_status( DictionaryDatum& statusdict ) const
    +cm_default::get_status( dictionary& statusdict ) const
     {
    -  def< double >( statusdict, names::V_th, V_th_ );
    +  statusdict[ names::V_th ] = V_th_;
       ArchivingNode::get_status( statusdict );
     
       // add all recordables to the status dictionary
    -  ( *statusdict )[ names::recordables ] = recordablesMap_.get_list();
    +  statusdict[ names::recordables ] = recordablesMap_.get_list();
     
       // We add a list of dicts with compartment information and
       // a list of dicts with receptor information to the status dictionary
    -  ArrayDatum compartment_ad;
    -  ArrayDatum receptor_ad;
    +  std::vector< dictionary > compartments;
    +  std::vector< dictionary > receptors;
       for ( long comp_idx_ = 0; comp_idx_ != c_tree_.get_size(); comp_idx_++ )
       {
    -    DictionaryDatum dd = DictionaryDatum( new Dictionary );
    +    dictionary compartment_info;
         Compartment* compartment = c_tree_.get_compartment( comp_idx_ );
     
         // add compartment info
    -    def< long >( dd, names::comp_idx, comp_idx_ );
    -    def< long >( dd, names::parent_idx, compartment->p_index );
    -    compartment_ad.push_back( dd );
    +    compartment_info[ names::comp_idx ] = comp_idx_;
    +    compartment_info[ names::parent_idx ] = compartment->p_index;
    +    compartments.push_back( compartment_info );
     
         // add receptor info
    -    compartment->compartment_currents.add_receptor_info( receptor_ad, compartment->comp_index );
    +    compartment->compartment_currents.add_receptor_info( receptors, compartment->comp_index );
       }
       // add compartment info and receptor info to the status dictionary
    -  def< ArrayDatum >( statusdict, names::compartments, compartment_ad );
    -  def< ArrayDatum >( statusdict, names::receptors, receptor_ad );
    +  statusdict[ names::compartments ] = compartments;
    +  statusdict[ names::receptors ] = receptors;
     }
     
     void
    -nest::cm_default::set_status( const DictionaryDatum& statusdict )
    +nest::cm_default::set_status( const dictionary& statusdict )
     {
    -  updateValue< double >( statusdict, names::V_th, V_th_ );
    +  statusdict.update_value( names::V_th, V_th_ );
       ArchivingNode::set_status( statusdict );
     
       /**
    @@ -119,26 +119,21 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
        * single compartment or multiple compartments, depending on whether the
        * entry was a list of dicts or a single dict
        */
    -  const auto add_compartments_list_or_dict = [ this, statusdict ]( const Name name )
    +  const auto add_compartments_list_or_dict = [ this, &statusdict ]( const std::string name )
       {
    -    Datum* dat = ( *statusdict )[ name ].datum();
    -    ArrayDatum* ad = dynamic_cast< ArrayDatum* >( dat );
    -    DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( dat );
    -
    -    if ( ad )
    +    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 ( Token* tt = ( *ad ).begin(); tt != ( *ad ).end(); ++tt )
    +      for ( const auto& compartment_dict : compartments )
           {
    -        // cast the Datum pointer stored within token dynamically to a
    -        // DictionaryDatum pointer
    -        add_compartment_( *dynamic_cast< DictionaryDatum* >( tt->datum() ) );
    +        add_compartment_( compartment_dict );
           }
         }
    -    else if ( dd )
    +    else if ( is_type< dictionary >( statusdict.at( name ) ) )
         {
           // A single compartment is provided, we add add it to the tree
    -      add_compartment_( *dd );
    +      add_compartment_( statusdict.get< dictionary >( name ) );
         }
         else
         {
    @@ -155,24 +150,19 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
        * single receptor or multiple receptors, depending on whether the
        * entry was a list of dicts or a single dict
        */
    -  const auto add_receptors_list_or_dict = [ this, statusdict ]( const Name name )
    +  const auto add_receptors_list_or_dict = [ this, &statusdict ]( const std::string name )
       {
    -    Datum* dat = ( *statusdict )[ name ].datum();
    -    ArrayDatum* ad = dynamic_cast< ArrayDatum* >( dat );
    -    DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( dat );
    -
    -    if ( ad )
    +    if ( is_type< std::vector< dictionary > >( statusdict.at( name ) ) )
         {
    -      for ( Token* tt = ( *ad ).begin(); tt != ( *ad ).end(); ++tt )
    +      const auto receptors = statusdict.get< std::vector< dictionary > >( name );
    +      for ( const auto& receptor_dict : receptors )
           {
    -        // cast the Datum pointer stored within token dynamically to a
    -        // DictionaryDatum pointer
    -        add_receptor_( *dynamic_cast< DictionaryDatum* >( tt->datum() ) );
    +        add_receptor_( receptor_dict );
           }
         }
    -    else if ( dd )
    +    else if ( is_type< dictionary >( statusdict.at( name ) ) )
         {
    -      add_receptor_( *dd );
    +      add_receptor_( statusdict.get< dictionary >( name ) );
         }
         else
         {
    @@ -182,7 +172,7 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
         }
       };
     
    -  if ( statusdict->known( names::compartments ) )
    +  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.
    @@ -193,12 +183,12 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
         add_compartments_list_or_dict( names::compartments );
       }
     
    -  if ( statusdict->known( names::add_compartments ) )
    +  if ( statusdict.known( names::add_compartments ) )
       {
         add_compartments_list_or_dict( names::add_compartments );
       }
     
    -  if ( statusdict->known( names::receptors ) )
    +  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.
    @@ -208,7 +198,7 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
         }
         add_receptors_list_or_dict( names::receptors );
       }
    -  if ( statusdict->known( names::add_receptors ) )
    +  if ( statusdict.known( names::add_receptors ) )
       {
         add_receptors_list_or_dict( names::add_receptors );
       }
    @@ -220,30 +210,31 @@ nest::cm_default::set_status( const DictionaryDatum& statusdict )
        */
       init_recordables_pointers_();
     }
    +
     void
    -nest::cm_default::add_compartment_( DictionaryDatum& dd )
    +nest::cm_default::add_compartment_( const dictionary& dd )
     {
    -  dd->clear_access_flags();
    +  dd.init_access_flags();
     
    -  if ( dd->known( names::params ) )
    +  if ( dd.known( names::params ) )
       {
    -    c_tree_.add_compartment(
    -      getValue< long >( dd, names::parent_idx ), getValue< DictionaryDatum >( dd, names::params ) );
    +    c_tree_.add_compartment( dd.get< long >( names::parent_idx ), dd.get< dictionary >( names::params ) );
       }
       else
       {
    -    c_tree_.add_compartment( getValue< long >( dd, names::parent_idx ) );
    +    c_tree_.add_compartment( dd.get< long >( names::parent_idx ) );
       }
     
    -  ALL_ENTRIES_ACCESSED( *dd, "cm_default::add_compartment_", "Unread dictionary entries: " );
    +  dd.all_entries_accessed( "cm_default::add_compartment_", "Unread dictionary entries: " );
     }
    +
     void
    -nest::cm_default::add_receptor_( DictionaryDatum& dd )
    +nest::cm_default::add_receptor_( const dictionary& dd )
     {
    -  dd->clear_access_flags();
    +  dd.init_access_flags();
     
    -  const long compartment_idx = getValue< long >( dd, names::comp_idx );
    -  const std::string receptor_type = getValue< std::string >( dd, names::receptor_type );
    +  const long compartment_idx = dd.get< long >( names::comp_idx );
    +  const std::string receptor_type = dd.get< std::string >( names::receptor_type );
     
       // create a ringbuffer to collect spikes for the receptor
       RingBuffer buffer;
    @@ -254,17 +245,16 @@ nest::cm_default::add_receptor_( DictionaryDatum& dd )
     
       // add the receptor to the compartment
       Compartment* compartment = c_tree_.get_compartment( compartment_idx );
    -  if ( dd->known( names::params ) )
    +  if ( dd.known( names::params ) )
       {
    -    compartment->compartment_currents.add_synapse(
    -      receptor_type, syn_idx, getValue< DictionaryDatum >( dd, names::params ) );
    +    compartment->compartment_currents.add_synapse( receptor_type, syn_idx, dd.get< dictionary >( names::params ) );
       }
       else
       {
         compartment->compartment_currents.add_synapse( receptor_type, syn_idx );
       }
     
    -  ALL_ENTRIES_ACCESSED( *dd, "cm_default::add_receptor_", "Unread dictionary entries: " );
    +  dd.all_entries_accessed( "cm_default::add_receptor_", "Unread dictionary entries: " );
     }
     
     void
    @@ -276,7 +266,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< Name, 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 d65544cb04..36b71d2b41 100644
    --- a/models/cm_default.h
    +++ b/models/cm_default.h
    @@ -262,12 +262,12 @@ class cm_default : 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;
     
     private:
    -  void add_compartment_( DictionaryDatum& dd );
    -  void add_receptor_( DictionaryDatum& dd );
    +  void add_compartment_( const dictionary& dd );
    +  void add_receptor_( const dictionary& dd );
     
       void init_recordables_pointers_();
       void pre_run_hook() override;
    @@ -294,7 +294,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.cpp b/models/cm_tree.cpp
    index 52121ca2fe..fb33b92e66 100644
    --- a/models/cm_tree.cpp
    +++ b/models/cm_tree.cpp
    @@ -49,7 +49,7 @@ nest::Compartment::Compartment( const long compartment_index, const long parent_
     
     nest::Compartment::Compartment( const long compartment_index,
       const long parent_index,
    -  const DictionaryDatum& compartment_params )
    +  const dictionary& compartment_params )
       : xx_( 0.0 )
       , yy_( 0.0 )
       , comp_index( compartment_index )
    @@ -71,17 +71,17 @@ nest::Compartment::Compartment( const long compartment_index,
       , n_passed( 0 )
       , compartment_currents( v_comp )
     {
    -  compartment_params->clear_access_flags();
    +  compartment_params.init_access_flags();
     
    -  updateValue< double >( compartment_params, names::C_m, ca );
    -  updateValue< double >( compartment_params, names::g_C, gc );
    -  updateValue< double >( compartment_params, names::g_L, gl );
    -  updateValue< double >( compartment_params, names::e_L, el );
    -  updateValue< double >( compartment_params, names::v_comp, v_comp );
    +  compartment_params.update_value( names::C_m, ca );
    +  compartment_params.update_value( names::g_C, gc );
    +  compartment_params.update_value( names::g_L, gl );
    +  compartment_params.update_value( names::e_L, el );
    +  compartment_params.update_value( names::v_comp, v_comp );
     
       compartment_currents = CompartmentCurrents( v_comp, compartment_params );
     
    -  ALL_ENTRIES_ACCESSED( *compartment_params, "compartment_params", "Unread dictionary entries: " );
    +  compartment_params.all_entries_accessed( "compartment_params", "Unread dictionary entries: " );
     }
     
     void
    @@ -100,13 +100,13 @@ nest::Compartment::pre_run_hook()
       currents.clear();
     }
     
    -std::map< Name, double* >
    +std::map< std::string, double* >
     nest::Compartment::get_recordables()
     {
    -  std::map< Name, double* > recordables = compartment_currents.get_recordables( comp_index );
    +  std::map< std::string, double* > recordables = compartment_currents.get_recordables( comp_index );
     
       recordables.insert( recordables.begin(), recordables.end() );
    -  recordables[ Name( "v_comp" + std::to_string( comp_index ) ) ] = &v_comp;
    +  recordables[ "v_comp" + std::to_string( comp_index ) ] = &v_comp;
     
       return recordables;
     }
    @@ -174,7 +174,7 @@ nest::CompTree::add_compartment( const long parent_index )
     }
     
     void
    -nest::CompTree::add_compartment( const long parent_index, const DictionaryDatum& compartment_params )
    +nest::CompTree::add_compartment( const long parent_index, const dictionary& compartment_params )
     {
       Compartment* compartment = new Compartment( size_, parent_index, compartment_params );
       add_compartment( compartment, parent_index );
    @@ -346,10 +346,10 @@ nest::CompTree::set_syn_buffers( std::vector< RingBuffer >& syn_buffers )
     /**
      * Returns a map of variable names and pointers to the recordables
      */
    -std::map< Name, double* >
    +std::map< std::string, double* >
     nest::CompTree::get_recordables()
     {
    -  std::map< Name, double* > recordables;
    +  std::map< std::string, double* > recordables;
     
       /**
        * add recordables for all compartments, suffixed by compartment_idx,
    @@ -357,7 +357,7 @@ nest::CompTree::get_recordables()
        */
       for ( auto compartment_it = compartments_.begin(); compartment_it != compartments_.end(); ++compartment_it )
       {
    -    std::map< Name, double* > recordables_comp = ( *compartment_it )->get_recordables();
    +    std::map< std::string, double* > recordables_comp = ( *compartment_it )->get_recordables();
         recordables.insert( recordables_comp.begin(), recordables_comp.end() );
       }
       return recordables;
    diff --git a/models/cm_tree.h b/models/cm_tree.h
    index 6f5898729e..10bf1c92d4 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
     {
    @@ -92,12 +88,12 @@ class Compartment
       CompartmentCurrents compartment_currents;
     
       Compartment( const long compartment_index, const long parent_index );
    -  Compartment( const long compartment_index, const long parent_index, const DictionaryDatum& compartment_params );
    +  Compartment( const long compartment_index, const long parent_index, const dictionary& compartment_params );
       ~Compartment() {};
     
       // initialization
       void pre_run_hook();
    -  std::map< Name, double* > get_recordables();
    +  std::map< std::string, double* > get_recordables();
     
       //! matrix construction
       void construct_matrix_element( const long lag );
    @@ -175,7 +171,7 @@ class CompTree
     
       //! add a compartment to the tree structure
       void add_compartment( const long parent_index );
    -  void add_compartment( const long parent_index, const DictionaryDatum& compartment_params );
    +  void add_compartment( const long parent_index, const dictionary& compartment_params );
       void add_compartment( Compartment* compartment, const long parent_index );
     
       //! initialize the tree for simulation
    @@ -189,7 +185,7 @@ class CompTree
       void set_syn_buffers( std::vector< RingBuffer >& syn_buffers );
     
       //! make all state variables accessible for recording
    -  std::map< Name, double* > get_recordables();
    +  std::map< std::string, double* > get_recordables();
     
       //! get a compartment pointer from the tree
       Compartment* get_compartment( const long compartment_index ) const;
    diff --git a/models/cont_delay_synapse.h b/models/cont_delay_synapse.h
    index a5759c2622..db6f7148e7 100644
    --- a/models/cont_delay_synapse.h
    +++ b/models/cont_delay_synapse.h
    @@ -130,17 +130,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..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
     {
    @@ -46,27 +44,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 ] = weight_;
    +  d[ names::delay ] = Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_;
    +  d[ names::size_of ] = 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, weight_ );
     
       // set delay if mentioned
       double delay;
     
    -  if ( updateValue< double >( d, names::delay, delay ) )
    +  if ( d.update_value( names::delay, delay ) )
       {
     
         const double h = Time::get_resolution().get_ms();
    @@ -92,9 +90,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 ) )
       {
         LOG( M_WARNING,
           "Connect",
    diff --git a/models/correlation_detector.cpp b/models/correlation_detector.cpp
    index 3d7b09b8ae..650800140a 100644
    --- a/models/correlation_detector.cpp
    +++ b/models/correlation_detector.cpp
    @@ -35,18 +35,12 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     void
     nest::register_correlation_detector( const std::string& name )
     {
       register_node_model< correlation_detector >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and state
      * ---------------------------------------------------------------- */
    @@ -110,47 +104,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 ] = 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( 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 ] = n_events_;
    +  d[ names::histogram ] = histogram_;
    +  d[ names::histogram_correction ] = histogram_correction_;
    +  d[ names::count_histogram ] = 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, 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, t, node ) )
       {
         tau_max_ = Time::ms( t );
         reset = true;
       }
     
    -  if ( updateValueParam< double >( d, names::Tstart, t, node ) )
    +  if ( update_value_param( d, names::Tstart, t, node ) )
       {
         Tstart_ = Time::ms( t );
         reset = true;
       }
     
    -  if ( updateValueParam< double >( d, names::Tstop, t, node ) )
    +  if ( update_value_param( d, names::Tstop, t, node ) )
       {
         Tstop_ = Time::ms( t );
         reset = true;
    @@ -170,10 +164,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, nev ) )
       {
         if ( nev.size() == 2 and nev[ 0 ] == 0 and nev[ 1 ] == 0 )
         {
    diff --git a/models/correlation_detector.h b/models/correlation_detector.h
    index 4e1318853b..05aa0182fc 100644
    --- a/models/correlation_detector.h
    +++ b/models/correlation_detector.h
    @@ -130,6 +130,32 @@ n_events             list of  Number of events from source 0 and 1. By setting
                          integers n_events to [0,0], the histogram is cleared.
     ==================== ======== ==================================================
     
    +Remarks:
    +
    +This recorder does not record to file, screen or memory in the usual
    +sense.
    +
    +Correlation detectors IGNORE any connection delays.
    +
    +Correlation detector breaks with the persistence scheme as
    +follows: the internal buffers for storing spikes are part
    +of State_, but are initialized by init_buffers_().
    +
    +@todo The correlation detector could be made more efficient as follows
    +(HEP 2008-07-01):
    +- incoming_ is vector of two deques
    +- let handle() push_back() entries in incoming_ and do nothing else
    +- keep index to last "old spike" in each incoming_; cannot
    +  be iterator since that may change
    +- update() deletes all entries before now-tau_max, sorts the new
    +  entries, then registers new entries in histogram
    +
    +Example:
    +
    +See Auto- and crosscorrelation functions for spike
    +trains[cross_check_mip_corrdet.py]
    +in pynest/examples.
    +
     Receives
     ++++++++
     
    @@ -181,7 +207,7 @@ class correlation_detector : public Node
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -199,8 +225,8 @@ class correlation_detector : public Node
     
       size_t handles_test_event( SpikeEvent&, 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;
     
       void calibrate_time( const TimeConverter& tc ) override;
     
    @@ -256,14 +282,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 dictionary.
          * @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* );
     
         Time get_default_delta_tau();
       };
    @@ -297,12 +323,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_& );
       };
    @@ -326,7 +352,7 @@ correlation_detector::handles_test_event( SpikeEvent&, size_t receptor_type )
     }
     
     inline void
    -correlation_detector::get_status( DictionaryDatum& d ) const
    +nest::correlation_detector::get_status( dictionary& d ) const
     {
       device_.get_status( d );
       P_.get( d );
    @@ -334,7 +360,7 @@ correlation_detector::get_status( DictionaryDatum& d ) const
     }
     
     inline void
    -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 bab3a03043..46cf8bade3 100644
    --- a/models/correlomatrix_detector.cpp
    +++ b/models/correlomatrix_detector.cpp
    @@ -36,10 +36,6 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
     
     void
     nest::register_correlomatrix_detector( const std::string& name )
    @@ -113,46 +109,31 @@ 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 ] = 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( DictionaryDatum& d ) const
    +nest::correlomatrix_detector::State_::get( dictionary& d ) const
     {
    -  ( *d )[ names::n_events ] = IntVectorDatum( new std::vector< long >( n_events_ ) );
    -
    -  ArrayDatum* C = new ArrayDatum;
    -  ArrayDatum* CountC = new ArrayDatum;
    -  for ( size_t i = 0; i < covariance_.size(); ++i )
    -  {
    -    ArrayDatum* C_i = new ArrayDatum;
    -    ArrayDatum* CountC_i = new ArrayDatum;
    -    for ( size_t j = 0; j < covariance_[ i ].size(); ++j )
    -    {
    -      C_i->push_back( new DoubleVectorDatum( new std::vector< double >( covariance_[ i ][ j ] ) ) );
    -      CountC_i->push_back( new IntVectorDatum( new std::vector< long >( count_covariance_[ i ][ j ] ) ) );
    -    }
    -    C->push_back( *C_i );
    -    CountC->push_back( *CountC_i );
    -  }
    -  ( *d )[ names::covariance ] = C;
    -  ( *d )[ names::count_covariance ] = CountC;
    +  d[ names::n_events ] = n_events_;
    +  d[ names::covariance ] = covariance_;
    +  d[ names::count_covariance ] = count_covariance_;
     }
     
     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, N, node ) )
       {
         if ( N < 1 )
         {
    @@ -165,25 +146,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, 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, t, node ) )
       {
         tau_max_ = Time::ms( t );
         reset = true;
       }
     
    -  if ( updateValueParam< double >( d, names::Tstart, t, node ) )
    +  if ( update_value_param( d, names::Tstart, t, node ) )
       {
         Tstart_ = Time::ms( t );
         reset = true;
       }
     
    -  if ( updateValueParam< double >( d, names::Tstop, t, node ) )
    +  if ( update_value_param( d, names::Tstop, t, node ) )
       {
         Tstop_ = Time::ms( t );
         reset = true;
    @@ -208,7 +189,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 ef3fbb0506..b3e446c578 100644
    --- a/models/correlomatrix_detector.h
    +++ b/models/correlomatrix_detector.h
    @@ -171,7 +171,7 @@ class correlomatrix_detector : public Node
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -189,8 +189,8 @@ class correlomatrix_detector : public Node
     
       size_t handles_test_event( SpikeEvent&, 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;
     
       void calibrate_time( const TimeConverter& tc ) override;
     
    @@ -249,14 +249,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 dictionary.
          * @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 );
     
         Time get_default_delta_tau();
       };
    @@ -287,12 +287,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_& );
       };
    @@ -315,7 +315,7 @@ correlomatrix_detector::handles_test_event( SpikeEvent&, size_t receptor_type )
     }
     
     inline void
    -correlomatrix_detector::get_status( DictionaryDatum& d ) const
    +nest::correlomatrix_detector::get_status( dictionary& d ) const
     {
       device_.get_status( d );
       P_.get( d );
    @@ -323,7 +323,7 @@ correlomatrix_detector::get_status( DictionaryDatum& d ) const
     }
     
     inline void
    -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 ec270da576..f8717ecb7d 100644
    --- a/models/correlospinmatrix_detector.cpp
    +++ b/models/correlospinmatrix_detector.cpp
    @@ -36,18 +36,12 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     void
     nest::register_correlospinmatrix_detector( const std::string& name )
     {
       register_node_model< correlospinmatrix_detector >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and state
      * ---------------------------------------------------------------- */
    @@ -115,33 +109,23 @@ 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 ] = 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::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 )
    -  {
    -    ArrayDatum* CountC_i = new ArrayDatum;
    -    for ( size_t j = 0; j < count_covariance_[ i ].size(); ++j )
    -    {
    -      CountC_i->push_back( new IntVectorDatum( new std::vector< long >( count_covariance_[ i ][ j ] ) ) );
    -    }
    -    CountC->push_back( *CountC_i );
    -  }
    -  ( *d )[ names::count_covariance ] = CountC;
    +  d[ names::count_covariance ] = count_covariance_;
     }
     
     bool
    -nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d,
    +nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d,
       const correlospinmatrix_detector& n,
       Node* node )
     {
    @@ -149,7 +133,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, N, node ) )
       {
         if ( N < 1 )
         {
    @@ -162,7 +146,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, t, node ) )
       {
         delta_tau_ = Time::ms( t );
         reset = true;
    @@ -172,7 +156,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, t, node ) )
       {
         tau_max_ = Time::ms( t );
         reset = true;
    @@ -182,7 +166,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d,
         }
       }
     
    -  if ( updateValueParam< double >( d, names::Tstart, t, node ) )
    +  if ( update_value_param( d, names::Tstart, t, node ) )
       {
         Tstart_ = Time::ms( t );
         reset = true;
    @@ -192,7 +176,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d,
         }
       }
     
    -  if ( updateValueParam< double >( d, names::Tstop, t, node ) )
    +  if ( update_value_param( d, names::Tstop, t, node ) )
       {
         Tstop_ = Time::ms( t );
         reset = true;
    @@ -215,7 +199,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 7087454df4..2720e25f9e 100644
    --- a/models/correlospinmatrix_detector.h
    +++ b/models/correlospinmatrix_detector.h
    @@ -152,7 +152,7 @@ class correlospinmatrix_detector : public Node
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -173,8 +173,8 @@ class correlospinmatrix_detector : public Node
     
       SignalType receives_signal() const 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;
     
    @@ -233,14 +233,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 dictionary.
          * @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* );
     
         Time get_default_delta_tau();
       };
    @@ -283,12 +283,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_& );
       };
    @@ -311,7 +311,7 @@ correlospinmatrix_detector::handles_test_event( SpikeEvent&, size_t receptor_typ
     }
     
     inline void
    -correlospinmatrix_detector::get_status( DictionaryDatum& d ) const
    +nest::correlospinmatrix_detector::get_status( dictionary& d ) const
     {
       device_.get_status( d );
       P_.get( d );
    @@ -319,7 +319,7 @@ correlospinmatrix_detector::get_status( DictionaryDatum& d ) const
     }
     
     inline void
    -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 7c5389914f..b6ba155c89 100644
    --- a/models/dc_generator.cpp
    +++ b/models/dc_generator.cpp
    @@ -31,11 +31,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     namespace nest
     {
     void
    @@ -50,7 +45,7 @@ template <>
     void
     RecordablesMap< dc_generator >::create()
     {
    -  insert_( Name( names::I ), &dc_generator::get_I_ );
    +  insert_( names::I, &dc_generator::get_I_ );
     }
     }
     
    @@ -102,15 +97,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 ] = 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, amp_, node );
     }
     
     
    @@ -202,8 +197,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 ] = input_param[ 0 ];
         ptmp.set( d, this );
       }
     
    diff --git a/models/dc_generator.h b/models/dc_generator.h
    index dd8bafabd7..4c3956d663 100644
    --- a/models/dc_generator.h
    +++ b/models/dc_generator.h
    @@ -110,8 +110,8 @@ class dc_generator : public StimulationDevice
     
       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;
     
       StimulationDevice::Type get_type() const override;
     
    @@ -137,8 +137,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
       };
     
       // ------------------------------------------------------------
    @@ -207,16 +207,16 @@ dc_generator::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 d7b250853a..a3e7f296d5 100644
    --- a/models/diffusion_connection.h
    +++ b/models/diffusion_connection.h
    @@ -152,9 +152,9 @@ class diffusion_connection : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -181,26 +181,26 @@ constexpr ConnectionModelProperties diffusion_connection< targetidentifierT >::p
     
     template < typename targetidentifierT >
     void
    -diffusion_connection< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +diffusion_connection< 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 ] = weight_;
    +  d[ names::drift_factor ] = drift_factor_;
    +  d[ names::diffusion_factor ] = diffusion_factor_;
    +  d[ names::size_of ] = sizeof( *this );
     }
     
     template < typename targetidentifierT >
     void
    -diffusion_connection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +diffusion_connection< 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 ) )
       {
         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 ) )
       {
         throw BadProperty(
           "Please use the parameters drift_factor and "
    @@ -208,8 +208,8 @@ diffusion_connection< 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, drift_factor_ );
    +  d.update_value( names::diffusion_factor, diffusion_factor_ );
     }
     
     
    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_adapt_bsshslm_2020.cpp b/models/eprop_iaf_adapt_bsshslm_2020.cpp
    index f37f2203a0..5cbedc9810 100644
    --- a/models/eprop_iaf_adapt_bsshslm_2020.cpp
    +++ b/models/eprop_iaf_adapt_bsshslm_2020.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -118,60 +115,59 @@ 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::beta, beta_ );
    -  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::beta ] = beta_;
    +  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::beta, beta_, node );
    -  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 );
    -
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, 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 );
    +  update_value_param( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf_adapt_bsshslm_2020* nrn = dynamic_cast< eprop_iaf_adapt_bsshslm_2020* >( 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 );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
     
       if ( adapt_beta_ < 0 )
       {
    @@ -217,22 +213,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 f8d8009ba2..9884f96797 100644
    --- a/models/eprop_iaf_adapt_bsshslm_2020.h
    +++ b/models/eprop_iaf_adapt_bsshslm_2020.h
    @@ -317,8 +317,8 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
       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;
    @@ -390,10 +390,10 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
         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.
    @@ -430,10 +430,10 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
         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.
    @@ -593,15 +593,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 a4c52557ff..c35d0207d8 100644
    --- a/models/eprop_iaf_bsshslm_2020.cpp
    +++ b/models/eprop_iaf_bsshslm_2020.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -112,56 +109,55 @@ 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::beta, beta_ );
    -  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::beta ] = beta_;
    +  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::beta, beta_, node );
    -  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 );
    -
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, 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 );
    +  update_value_param( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf_bsshslm_2020* nrn = dynamic_cast< eprop_iaf_bsshslm_2020* >( 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 );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
     
       if ( C_m_ <= 0 )
       {
    @@ -197,17 +193,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 34cc9a575d..7cdf3dbe1c 100644
    --- a/models/eprop_iaf_bsshslm_2020.h
    +++ b/models/eprop_iaf_bsshslm_2020.h
    @@ -302,8 +302,8 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
       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;
    @@ -369,10 +369,10 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
         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.
    @@ -403,10 +403,10 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent< true >
         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.
    @@ -549,15 +549,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_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_learning_signal_connection_bsshslm_2020.h b/models/eprop_learning_signal_connection_bsshslm_2020.h
    index 5a6f5d5e5d..2dd44db3ad 100644
    --- a/models/eprop_learning_signal_connection_bsshslm_2020.h
    +++ b/models/eprop_learning_signal_connection_bsshslm_2020.h
    @@ -185,10 +185,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
    @@ -207,20 +207,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.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..8f0633e691 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 ] = static_cast< long >( LEARNING_WINDOW_SIG );
    +  receptor_dict[ names::target_signal ] = static_cast< long >( 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_readout_bsshslm_2020.cpp b/models/eprop_readout_bsshslm_2020.cpp
    index 79f059fb59..b0354b1181 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
     {
     
    @@ -107,32 +104,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 )
       {
    @@ -153,19 +150,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 36ae6e7134..33085f7016 100644
    --- a/models/eprop_readout_bsshslm_2020.h
    +++ b/models/eprop_readout_bsshslm_2020.h
    @@ -284,8 +284,8 @@ class eprop_readout_bsshslm_2020 : public EpropArchivingNodeReadout< true >
       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_bsshslm_2020 : public EpropArchivingNodeReadout< true >
         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_bsshslm_2020 : public EpropArchivingNodeReadout< true >
         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.
    @@ -556,21 +556,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 ] = static_cast< long >( READOUT_SIG );
    +  receptor_dict_[ names::target_signal ] = static_cast< long >( 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.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.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 3ac9144827..3045cdae52 100644
    --- a/models/eprop_synapse_bsshslm_2020.h
    +++ b/models/eprop_synapse_bsshslm_2020.h
    @@ -194,10 +194,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_;
    @@ -283,10 +283,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 );
    @@ -576,36 +576,38 @@ 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 ) and optimizer_ )
    +  if ( d.known( names::optimizer ) and optimizer_ )
       {
    -    optimizer_->set_status( getValue< DictionaryDatum >( d->lookup( 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.
    +    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/erfc_neuron.cpp b/models/erfc_neuron.cpp
    index 891a7cfc1f..9b08af2c86 100644
    --- a/models/erfc_neuron.cpp
    +++ b/models/erfc_neuron.cpp
    @@ -38,17 +38,17 @@ register_erfc_neuron( const std::string& name )
     
     
     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 ] = theta_;
    +  d[ names::sigma ] = 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, theta_, node );
    +  update_value_param( d, names::sigma, sigma_, node );
     }
     
     /*
    diff --git a/models/erfc_neuron.h b/models/erfc_neuron.h
    index 31050be552..4c7a48ccc5 100644
    --- a/models/erfc_neuron.h
    +++ b/models/erfc_neuron.h
    @@ -149,8 +149,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 5817c36f7f..e89d82b080 100644
    --- a/models/gamma_sup_generator.cpp
    +++ b/models/gamma_sup_generator.cpp
    @@ -34,17 +34,12 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "doubledatum.h"
    -
     void
     nest::register_gamma_sup_generator( const std::string& name )
     {
       register_node_model< gamma_sup_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Constructor of internal states class
      * ---------------------------------------------------------------- */
    @@ -140,30 +135,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 ] = rate_;
    +  d[ names::gamma_shape ] = gamma_shape_;
    +  d[ names::n_proc ] = 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, 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, 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, n_proc_l, node );
       if ( n_proc_l < 1 )
       {
         throw BadProperty( "The number of component processes cannot be smaller than one" );
    @@ -293,10 +288,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 ] = 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/gamma_sup_generator.h b/models/gamma_sup_generator.h
    index a982d5b3ad..b4958a66e5 100644
    --- a/models/gamma_sup_generator.h
    +++ b/models/gamma_sup_generator.h
    @@ -110,8 +110,8 @@ class gamma_sup_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -160,8 +160,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
       };
     
       // ------------------------------------------------------------
    @@ -244,14 +244,14 @@ gamma_sup_generator::send_test_event( Node& target, size_t receptor_type, synind
     }
     
     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 dd25df9776..3b76dda5c3 100644
    --- a/models/gap_junction.h
    +++ b/models/gap_junction.h
    @@ -141,9 +141,9 @@ class gap_junction : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -166,14 +166,14 @@ constexpr ConnectionModelProperties gap_junction< targetidentifierT >::propertie
     
     template < typename targetidentifierT >
     void
    -gap_junction< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +gap_junction< 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 ] = weight_;
    +  d[ names::size_of ] = sizeof( *this );
     }
     
     template < typename targetidentifierT >
    @@ -185,16 +185,16 @@ gap_junction< targetidentifierT >::get_secondary_event()
     
     template < typename targetidentifierT >
     void
    -gap_junction< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +gap_junction< 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 ) )
       {
         throw BadProperty( "gap_junction connection has no delay" );
       }
     
       ConnectionBase::set_status( d, cm );
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     }
     
     } // namespace
    diff --git a/models/gauss_rate.cpp b/models/gauss_rate.cpp
    index 520f0228e9..566335f7d5 100644
    --- a/models/gauss_rate.cpp
    +++ b/models/gauss_rate.cpp
    @@ -43,19 +43,19 @@ register_rate_transformer_gauss( const std::string& name )
     
     
     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 ] = g_;
    +  d[ names::mu ] = mu_;
    +  d[ names::sigma ] = 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, g_, node );
    +  update_value_param( d, names::mu, mu_, node );
    +  update_value_param( d, names::sigma, sigma_, node );
     }
     
     /*
    diff --git a/models/gauss_rate.h b/models/gauss_rate.h
    index 8d51447775..7b0393d179 100644
    --- a/models/gauss_rate.h
    +++ b/models/gauss_rate.h
    @@ -151,8 +151,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 43e7d96d19..6ac61d70f3 100644
    --- a/models/gif_cond_exp.cpp
    +++ b/models/gif_cond_exp.cpp
    @@ -38,10 +38,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     namespace nest
     {
    @@ -202,63 +198,55 @@ nest::gif_cond_exp::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 );
    -
    -  ArrayDatum tau_sfa_list_ad( tau_sfa_ );
    -  def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -  ArrayDatum q_sfa_list_ad( q_sfa_ );
    -  def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    -
    -  ArrayDatum tau_stc_list_ad( tau_stc_ );
    -  def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad );
    -
    -  ArrayDatum q_stc_list_ad( q_stc_ );
    -  def< ArrayDatum >( d, names::q_stc, q_stc_list_ad );
    +  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;
    +  d[ names::tau_sfa ] = tau_sfa_;
    +  d[ names::q_sfa ] = q_sfa_;
    +  d[ names::tau_stc ] = tau_stc_;
    +  d[ names::q_stc ] = q_stc_;
     }
     
     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 );
    -
    -  if ( updateValueParam< double >( d, names::lambda_0, 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
       }
     
    -  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, 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 );
     
    -  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, 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() )
       {
    @@ -313,28 +301,28 @@ nest::gif_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node )
           throw BadProperty( "All time constants must be strictly positive." );
         }
       }
    -  if ( tau_synE_ <= 0 or tau_synI_ <= 0 )
    +  if ( tau_synE_ <= 0 || tau_synI_ <= 0 )
       {
         throw BadProperty( "Synapse time constants must be strictly positive." );
       }
     }
     
     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 ] = 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 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, 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 077a4b453f..a78815157b 100644
    --- a/models/gif_cond_exp.h
    +++ b/models/gif_cond_exp.h
    @@ -249,8 +249,8 @@ class gif_cond_exp : public ArchivingNode
       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;
    @@ -312,8 +312,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
       };
     
       // ----------------------------------------------------------------
    @@ -350,8 +350,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -483,16 +483,16 @@ gif_cond_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 5a31ba490f..32878e9c12 100644
    --- a/models/gif_cond_exp_multisynapse.cpp
    +++ b/models/gif_cond_exp_multisynapse.cpp
    @@ -39,10 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     namespace nest
     {
    @@ -153,66 +149,55 @@ 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() );
    -  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 );
    -
    -  ArrayDatum tau_syn_ad( tau_syn_ );
    -  def< ArrayDatum >( d, names::tau_syn, tau_syn_ad );
    -
    -  ArrayDatum tau_sfa_list_ad( tau_sfa_ );
    -  def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -  ArrayDatum q_sfa_list_ad( q_sfa_ );
    -  def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    -
    -  ArrayDatum tau_stc_list_ad( tau_stc_ );
    -  def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad );
    -
    -  ArrayDatum q_stc_list_ad( q_stc_ );
    -  def< ArrayDatum >( d, names::q_stc, q_stc_list_ad );
    +  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::E_rev ] = E_rev_;
    +  d[ names::has_connections ] = has_connections_;
    +  d[ names::gsl_error_tol ] = gsl_error_tol;
    +  d[ names::tau_syn ] = tau_syn_;
    +  d[ names::tau_sfa ] = tau_sfa_;
    +  d[ names::q_sfa ] = q_sfa_;
    +  d[ names::tau_stc ] = tau_stc_;
    +  d[ names::q_stc ] = q_stc_;
     }
     
     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, 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
       }
     
    -  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, t_ref_, node );
    +  update_value_param( d, names::gsl_error_tol, 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, 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 = 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, E_rev_ );
    +  bool tau_flag = d.update_value( names::tau_syn, tau_syn_ );
       if ( Erev_flag or tau_flag )
       { // receptor arrays have been modified
         if ( ( E_rev_.size() != old_n_receptors or tau_syn_.size() != old_n_receptors )
    @@ -304,27 +289,26 @@ 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 ] = 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 >();
     
    +  std::vector< double > g;
       for ( size_t i = 0; i < ( y_.size() - State_::NUMBER_OF_FIXED_STATES_ELEMENTS ); ++i )
       {
    -    g->push_back( y_[ State_::G + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ] );
    +    g.push_back( y_[ State_::G + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ] );
       }
     
    -  ( *d )[ names::g ] = DoubleVectorDatum( g );
    +  d[ names::g ] = 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, 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 1fd6c9a516..5fc61372d1 100644
    --- a/models/gif_cond_exp_multisynapse.h
    +++ b/models/gif_cond_exp_multisynapse.h
    @@ -250,8 +250,8 @@ class gif_cond_exp_multisynapse : public ArchivingNode
       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;
    @@ -316,8 +316,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
    @@ -359,8 +359,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_
     
    @@ -492,16 +492,16 @@ gif_cond_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_t r
     }
     
     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 ] = 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 43299c877f..8d32b827c2 100644
    --- a/models/gif_pop_psc_exp.cpp
    +++ b/models/gif_pop_psc_exp.cpp
    @@ -117,50 +117,46 @@ 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_ );
    -
    -  ArrayDatum tau_sfa_list_ad( tau_sfa_ );
    -  def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -  ArrayDatum q_sfa_list_ad( q_sfa_ );
    -  def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    +  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_;
    +  d[ names::tau_sfa ] = tau_sfa_;
    +  d[ names::q_sfa ] = q_sfa_;
     }
     
     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, 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, tau_sfa_ );
    +  d.update_value( names::q_sfa, q_sfa_ );
     
     
       if ( tau_sfa_.size() != q_sfa_.size() )
    @@ -217,22 +213,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 ] = 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 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, 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 ed18a07d65..c0693f3c3f 100644
    --- a/models/gif_pop_psc_exp.h
    +++ b/models/gif_pop_psc_exp.h
    @@ -187,8 +187,8 @@ class gif_pop_psc_exp : public Node
       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;
     
     private:
       void init_buffers_() override;
    @@ -259,9 +259,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
       };
     
       // ----------------------------------------------------------------
    @@ -284,8 +284,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -449,7 +449,7 @@ gif_pop_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t receptor_ty
     }
     
     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_ );
    @@ -458,11 +458,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 ] = 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 0731dc8175..76cf726b0c 100644
    --- a/models/gif_psc_exp.cpp
    +++ b/models/gif_psc_exp.cpp
    @@ -29,14 +29,9 @@
     #include "universal_data_logger_impl.h"
     
     // Includes from libnestutil:
    +#include "compose.hpp"
     #include "dict_util.h"
     #include "iaf_propagator.h"
    -
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
    -#include "compose.hpp"
     #include "numerics.h"
     
     namespace nest
    @@ -109,57 +104,49 @@ 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_ );
    -
    -  ArrayDatum tau_sfa_list_ad( tau_sfa_ );
    -  def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -  ArrayDatum q_sfa_list_ad( q_sfa_ );
    -  def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    -
    -  ArrayDatum tau_stc_list_ad( tau_stc_ );
    -  def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad );
    -
    -  ArrayDatum q_stc_list_ad( q_stc_ );
    -  def< ArrayDatum >( d, names::q_stc, q_stc_list_ad );
    +  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_;
    +  d[ names::tau_sfa ] = tau_sfa_;
    +  d[ names::q_sfa ] = q_sfa_;
    +  d[ names::tau_stc ] = tau_stc_;
    +  d[ names::q_stc ] = q_stc_;
     }
     
     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 );
    -
    -  if ( updateValueParam< double >( d, names::lambda_0, 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
       }
     
    -  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, 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 );
     
    -  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, 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() )
       {
    @@ -221,17 +208,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 ] = 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 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, 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 dfc667d850..1146357b8f 100644
    --- a/models/gif_psc_exp.h
    +++ b/models/gif_psc_exp.h
    @@ -231,8 +231,8 @@ class gif_psc_exp : 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;
     
     private:
       void init_buffers_() override;
    @@ -290,8 +290,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
       };
     
       // ----------------------------------------------------------------
    @@ -316,8 +316,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -456,16 +456,16 @@ gif_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 cfeca96ea4..30a83dac12 100644
    --- a/models/gif_psc_exp_multisynapse.cpp
    +++ b/models/gif_psc_exp_multisynapse.cpp
    @@ -23,6 +23,7 @@
     #include "gif_psc_exp_multisynapse.h"
     
     // Includes from libnestutil:
    +#include "compose.hpp"
     #include "dict_util.h"
     #include "iaf_propagator.h"
     #include "numerics.h"
    @@ -33,11 +34,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
    -#include "compose.hpp"
     
     namespace nest
     {
    @@ -106,59 +102,50 @@ 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_ );
    -
    -  ArrayDatum tau_syn_ad( tau_syn_ );
    -  def< ArrayDatum >( d, names::tau_syn, tau_syn_ad );
    -
    -  ArrayDatum tau_sfa_list_ad( tau_sfa_ );
    -  def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -  ArrayDatum q_sfa_list_ad( q_sfa_ );
    -  def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    -
    -  ArrayDatum tau_stc_list_ad( tau_stc_ );
    -  def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad );
    -
    -  ArrayDatum q_stc_list_ad( q_stc_ );
    -  def< ArrayDatum >( d, names::q_stc, q_stc_list_ad );
    +  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_;
    +
    +  d[ names::tau_syn ] = tau_syn_;
    +  d[ names::tau_sfa ] = tau_sfa_;
    +  d[ names::q_sfa ] = q_sfa_;
    +  d[ names::tau_stc ] = tau_stc_;
    +  d[ names::q_stc ] = q_stc_;
     }
     
     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, 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
       }
     
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::t_ref, 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, 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() )
       {
    @@ -215,7 +202,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, tau_tmp ) )
       {
         if ( has_connections_ and tau_tmp.size() < tau_syn_.size() )
         {
    @@ -237,17 +224,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 ] = 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 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, 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 1011a87818..06fa6fb4c2 100644
    --- a/models/gif_psc_exp_multisynapse.h
    +++ b/models/gif_psc_exp_multisynapse.h
    @@ -237,8 +237,8 @@ class gif_psc_exp_multisynapse : 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;
     
     private:
       void init_buffers_() override;
    @@ -297,8 +297,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
    @@ -329,8 +329,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -456,16 +456,16 @@ gif_psc_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_t re
     }
     
     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 ] = 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 36b94176cb..546c6f0165 100644
    --- a/models/ginzburg_neuron.cpp
    +++ b/models/ginzburg_neuron.cpp
    @@ -38,21 +38,21 @@ register_ginzburg_neuron( const std::string& name )
     
     
     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 ] = theta_;
    +  d[ names::c_1 ] = c1_;
    +  d[ names::c_2 ] = c2_;
    +  d[ names::c_3 ] = 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, 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/ginzburg_neuron.h b/models/ginzburg_neuron.h
    index 70735564e4..b06ed99a52 100644
    --- a/models/ginzburg_neuron.h
    +++ b/models/ginzburg_neuron.h
    @@ -164,8 +164,8 @@ class gainfunction_ginzburg
       {
       }
     
    -  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 ) const;
     };
    diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp
    index a1434786b9..fb959bf20b 100644
    --- a/models/glif_cond.cpp
    +++ b/models/glif_cond.cpp
    @@ -35,14 +35,9 @@
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "kernel_manager.h"
    -#include "name.h"
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     using namespace nest;
     
     namespace nest
    @@ -69,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
    @@ -197,47 +192,45 @@ 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_ );
    -  ArrayDatum tau_syn_ad( tau_syn_ );
    -  def< ArrayDatum >( d, names::tau_syn, 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::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_;
    +  d[ names::tau_syn ] = tau_syn_;
    +  d[ names::E_rev ] = E_rev_;
    +  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
    -nest::glif_cond::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::glif_cond::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_;
    -  updateValue< double >( d, names::E_L, E_L_ );
    +  d.update_value( names::E_L, E_L_ );
       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_;
       }
    @@ -246,7 +239,7 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d, Node* node )
         V_reset_ -= delta_EL;
       }
     
    -  if ( updateValueParam< double >( d, names::V_th, th_inf_, node ) )
    +  if ( update_value_param( d, names::V_th, th_inf_, node ) )
       {
         th_inf_ -= E_L_;
       }
    @@ -255,27 +248,27 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d, Node* node )
         th_inf_ -= delta_EL;
       }
     
    -  updateValueParam< double >( d, names::g_m, G_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::g_m, G_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
     
    -  updateValueParam< double >( d, names::th_spike_add, th_spike_add_, node );
    -  updateValueParam< double >( d, names::th_spike_decay, th_spike_decay_, node );
    -  updateValueParam< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    -  updateValueParam< double >( d, names::voltage_reset_add, voltage_reset_add_, node );
    +  update_value_param( d, names::th_spike_add, th_spike_add_, node );
    +  update_value_param( d, names::th_spike_decay, th_spike_decay_, node );
    +  update_value_param( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    +  update_value_param( d, names::voltage_reset_add, voltage_reset_add_, node );
     
    -  updateValueParam< double >( d, names::th_voltage_index, th_voltage_index_, node );
    -  updateValueParam< double >( d, names::th_voltage_decay, th_voltage_decay_, node );
    +  update_value_param( d, names::th_voltage_index, th_voltage_index_, node );
    +  update_value_param( d, names::th_voltage_decay, th_voltage_decay_, node );
     
    -  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, 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
    -  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, 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
    @@ -362,8 +355,8 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d, Node* node )
       }
     
       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, tau_syn_ );
    +  bool Erev_flag = d.update_value( names::E_rev, E_rev_ );
     
       // receptor arrays have been modified
       if ( tau_flag or Erev_flag )
    @@ -397,32 +390,32 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     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 ] = 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 >();
    +  std::vector< double > dg;
    +  std::vector< double > g;
     
       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
    +    dg.push_back( y_[ State_::DG_SYN - State_::NUMBER_OF_RECORDABLES_ELEMENTS
           + ( i * State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ) ] );
    -    g->push_back( y_[ State_::G_SYN - State_::NUMBER_OF_RECORDABLES_ELEMENTS
    +    g.push_back( y_[ State_::G_SYN - State_::NUMBER_OF_RECORDABLES_ELEMENTS
           + ( i * State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ) ] );
       }
     
    -  ( *d )[ names::dg ] = DoubleVectorDatum( dg );
    -  ( *d )[ names::g ] = DoubleVectorDatum( g );
    +  d[ names::dg ] = dg;
    +  d[ names::g ] = g;
     }
     
     void
    -nest::glif_cond::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::glif_cond::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  if ( updateValueParam< double >( d, names::V_m, y_[ V_M ], node ) )
    +  if ( update_value_param( d, names::V_m, y_[ V_M ], node ) )
       {
         y_[ V_M ] -= p.E_L_;
       }
    @@ -431,7 +424,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, ASCurrents_ );
       if ( asc_flag and not p.has_asc_ )
       {
         throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." );
    @@ -447,13 +440,12 @@ nest::glif_cond::State_::set( const DictionaryDatum& d, const Parameters_& p, do
         }
       }
     
    -  if ( updateValueParam< double >( d, names::threshold_spike, threshold_spike_, node ) 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 ( updateValueParam< double >( d, names::threshold_voltage, threshold_voltage_, node )
    -    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/glif_cond.h b/models/glif_cond.h
    index acfbffef2b..5e6d2c4207 100644
    --- a/models/glif_cond.h
    +++ b/models/glif_cond.h
    @@ -40,8 +40,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -#include "dictdatum.h"
    -
     /* BeginUserDocs:  neuron, integrate-and-fire, conductance-based, adaptation, hard threshold
     
     Short description
    @@ -73,6 +71,8 @@ The five GLIF models are:
     * **GLIF Model 5** - Leaky integrate and fire with biologically defined reset rules,
       after-spike currents and a voltage dependent threshold (LIF_R_ASC_A)
     
    +Remarks:
    +
     GLIF model mechanism setting is based on three parameters
     (``spike_dependent_threshold``, ``after_spike_currents``, ``adapting_threshold``).
     The settings of these three parameters for the five GLIF models are listed
    @@ -231,8 +231,8 @@ class glif_cond : public ArchivingNode
       size_t handles_test_event( nest::CurrentEvent&, size_t ) override;
       size_t handles_test_event( nest::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:
       //! Reset internal buffers of neuron.
    @@ -291,8 +291,8 @@ class glif_cond : public ArchivingNode
     
         Parameters_();
     
    -    void get( DictionaryDatum& ) const;
    -    double set( const DictionaryDatum&, Node* );
    +    void get( dictionary& ) const;
    +    double set( const dictionary&, Node* );
       };
     
     
    @@ -333,8 +333,8 @@ class glif_cond : public ArchivingNode
     
         State_( const Parameters_& );
     
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void get( dictionary&, const Parameters_& ) const;
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
     
    @@ -438,7 +438,7 @@ class glif_cond : 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 );
     };
     
    @@ -480,7 +480,7 @@ nest::glif_cond::handles_test_event( nest::DataLoggingRequest& dlr, size_t recep
     }
     
     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 );
    @@ -489,11 +489,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 ] = 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, this ); // throws if BadProperty
    diff --git a/models/glif_psc.cpp b/models/glif_psc.cpp
    index b60dafc0ec..8b40df5237 100644
    --- a/models/glif_psc.cpp
    +++ b/models/glif_psc.cpp
    @@ -34,10 +34,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     using namespace nest;
     
     nest::RecordablesMap< nest::glif_psc > nest::glif_psc::recordablesMap_;
    @@ -119,45 +115,44 @@ 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_ );
    -  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::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_;
    +  d[ names::tau_syn ] = tau_syn_;
    +  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
    -nest::glif_psc::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::glif_psc::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_;
       }
    @@ -166,7 +161,7 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d, Node* node )
         V_reset_ -= delta_EL;
       }
     
    -  if ( updateValueParam< double >( d, names::V_th, th_inf_, node ) )
    +  if ( update_value_param( d, names::V_th, th_inf_, node ) )
       {
         th_inf_ -= E_L_;
       }
    @@ -175,27 +170,27 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d, Node* node )
         th_inf_ -= delta_EL;
       }
     
    -  updateValueParam< double >( d, names::g, G_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::g, G_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
     
    -  updateValueParam< double >( d, names::th_spike_add, th_spike_add_, node );
    -  updateValueParam< double >( d, names::th_spike_decay, th_spike_decay_, node );
    -  updateValueParam< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    -  updateValueParam< double >( d, names::voltage_reset_add, voltage_reset_add_, node );
    +  update_value_param( d, names::th_spike_add, th_spike_add_, node );
    +  update_value_param( d, names::th_spike_decay, th_spike_decay_, node );
    +  update_value_param( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    +  update_value_param( d, names::voltage_reset_add, voltage_reset_add_, node );
     
    -  updateValueParam< double >( d, names::th_voltage_index, th_voltage_index_, node );
    -  updateValueParam< double >( d, names::th_voltage_decay, th_voltage_decay_, node );
    +  update_value_param( d, names::th_voltage_index, th_voltage_index_, node );
    +  update_value_param( d, names::th_voltage_decay, th_voltage_decay_, node );
     
    -  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, 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
    -  updateValueParam< bool >( d, names::spike_dependent_threshold, has_theta_spike_, node );
    -  updateValueParam< bool >( d, names::after_spike_currents, has_asc_, node );
    -  updateValueParam< bool >( d, names::adapting_threshold, has_theta_voltage_, node );
    +  update_value_param( d, names::spike_dependent_threshold, has_theta_spike_, node );
    +  update_value_param( d, names::after_spike_currents, has_asc_, node );
    +  update_value_param( d, names::adapting_threshold, has_theta_voltage_, node );
     
       // check model mechanisms parameter
       if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1
    @@ -282,7 +277,7 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d, Node* node )
       }
     
       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, tau_syn_ ) )
       {
         if ( this->n_receptors_() != old_n_receptors and has_connections_ )
         {
    @@ -303,18 +298,18 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     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 ] = 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 DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  if ( updateValueParam< double >( d, names::V_m, U_, node ) )
    +  if ( update_value_param( d, names::V_m, U_, node ) )
       {
         U_ -= p.E_L_;
       }
    @@ -323,7 +318,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, ASCurrents_ );
       if ( asc_flag and not p.has_asc_ )
       {
         throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." );
    @@ -339,13 +334,12 @@ nest::glif_psc::State_::set( const DictionaryDatum& d, const Parameters_& p, dou
         }
       }
     
    -  if ( updateValueParam< double >( d, names::threshold_spike, threshold_spike_, node ) 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 ( updateValueParam< double >( d, names::threshold_voltage, threshold_voltage_, node )
    -    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/glif_psc.h b/models/glif_psc.h
    index 63d51b93e8..f93d7143b6 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: neuron, integrate-and-fire, current-based, adaptation, hard thershold
     
     Short description
    @@ -63,6 +61,8 @@ The five GLIF models are:
     * **GLIF Model 5** - Leaky integrate and fire with biologically defined reset rules,
       after-spike currents and a voltage dependent threshold (LIF_R_ASC_A)
     
    +Remarks:
    +
     GLIF model mechanism setting is based on three parameters
     (``spike_dependent_threshold``, ``after_spike_currents``, ``adapting_threshold``).
     The settings of these three parameters for the five GLIF models are listed
    @@ -227,8 +227,8 @@ class glif_psc : public ArchivingNode
       size_t handles_test_event( nest::CurrentEvent&, size_t ) override;
       size_t handles_test_event( nest::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:
       //! Reset internal buffers of neuron.
    @@ -282,8 +282,8 @@ class glif_psc : public ArchivingNode
     
         Parameters_();
     
    -    void get( DictionaryDatum& ) const;
    -    double set( const DictionaryDatum&, Node* );
    +    void get( dictionary& ) const;
    +    double set( const dictionary&, Node* );
       };
     
       struct State_
    @@ -302,8 +302,8 @@ class glif_psc : public ArchivingNode
     
         State_( const Parameters_& );
     
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void get( dictionary&, const Parameters_& ) const;
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
     
    @@ -434,7 +434,7 @@ nest::glif_psc::handles_test_event( nest::DataLoggingRequest& dlr, size_t recept
     }
     
     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 );
    @@ -443,11 +443,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 ] = 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, this ); // throws if BadProperty
    diff --git a/models/glif_psc_double_alpha.cpp b/models/glif_psc_double_alpha.cpp
    index f79de012d3..8806eda38c 100644
    --- a/models/glif_psc_double_alpha.cpp
    +++ b/models/glif_psc_double_alpha.cpp
    @@ -34,10 +34,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     using namespace nest;
     
     nest::RecordablesMap< nest::glif_psc_double_alpha > nest::glif_psc_double_alpha::recordablesMap_;
    @@ -125,53 +121,48 @@ nest::glif_psc_double_alpha::State_::State_( const Parameters_& p )
      * ---------------------------------------------------------------- */
     
     void
    -nest::glif_psc_double_alpha::Parameters_::get( DictionaryDatum& d ) const
    +nest::glif_psc_double_alpha::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_ );
    -
    -  ArrayDatum tau_syn_fast_ad( tau_syn_fast_ );
    -  def< ArrayDatum >( d, names::tau_syn_fast, tau_syn_fast_ad );
    -
    -  ArrayDatum tau_syn_slow_ad( tau_syn_slow_ );
    -  def< ArrayDatum >( d, names::tau_syn_slow, tau_syn_slow_ad );
    -
    -  ArrayDatum amp_slow_ad( amp_slow_ );
    -  def< ArrayDatum >( d, names::amp_slow, amp_slow_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::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_;
    +
    +  d[ names::tau_syn_fast ] = tau_syn_fast_;
    +  d[ names::tau_syn_slow ] = tau_syn_slow_;
    +  d[ names::amp_slow ] = amp_slow_;
    +
    +  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
    -nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::glif_psc_double_alpha::Parameters_::set( const dictionary& d, Node* node )
     {
    -  // if E_L_ is changed, we need to adjust all variables defined relative to
    -  // E_L_
    +  // 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_;
       }
    @@ -180,7 +171,7 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
         V_reset_ -= delta_EL;
       }
     
    -  if ( updateValueParam< double >( d, names::V_th, th_inf_, node ) )
    +  if ( update_value_param( d, names::V_th, th_inf_, node ) )
       {
         th_inf_ -= E_L_;
       }
    @@ -189,27 +180,27 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
         th_inf_ -= delta_EL;
       }
     
    -  updateValueParam< double >( d, names::g, G_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::g, G_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
     
    -  updateValueParam< double >( d, names::th_spike_add, th_spike_add_, node );
    -  updateValueParam< double >( d, names::th_spike_decay, th_spike_decay_, node );
    -  updateValueParam< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    -  updateValueParam< double >( d, names::voltage_reset_add, voltage_reset_add_, node );
    +  update_value_param( d, names::th_spike_add, th_spike_add_, node );
    +  update_value_param( d, names::th_spike_decay, th_spike_decay_, node );
    +  update_value_param( d, names::voltage_reset_fraction, voltage_reset_fraction_, node );
    +  update_value_param( d, names::voltage_reset_add, voltage_reset_add_, node );
     
    -  updateValueParam< double >( d, names::th_voltage_index, th_voltage_index_, node );
    -  updateValueParam< double >( d, names::th_voltage_decay, th_voltage_decay_, node );
    +  update_value_param( d, names::th_voltage_index, th_voltage_index_, node );
    +  update_value_param( d, names::th_voltage_decay, th_voltage_decay_, node );
     
    -  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, 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
    -  updateValueParam< bool >( d, names::spike_dependent_threshold, has_theta_spike_, node );
    -  updateValueParam< bool >( d, names::after_spike_currents, has_asc_, node );
    -  updateValueParam< bool >( d, names::adapting_threshold, has_theta_voltage_, node );
    +  update_value_param( d, names::spike_dependent_threshold, has_theta_spike_, node );
    +  update_value_param( d, names::after_spike_currents, has_asc_, node );
    +  update_value_param( d, names::adapting_threshold, has_theta_voltage_, node );
     
       // check model mechanisms parameter
       if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1
    @@ -296,7 +287,7 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
       }
     
       const size_t old_n_receptors = this->n_receptors_();
    -  if ( updateValue< std::vector< double > >( d, names::tau_syn_fast, tau_syn_fast_ ) )
    +  if ( d.update_value( names::tau_syn_fast, tau_syn_fast_ ) )
       {
         if ( this->n_receptors_() != old_n_receptors and has_connections_ )
         {
    @@ -312,7 +303,7 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
           }
         }
       }
    -  if ( updateValue< std::vector< double > >( d, names::tau_syn_slow, tau_syn_slow_ ) )
    +  if ( d.update_value( names::tau_syn_slow, tau_syn_slow_ ) )
       {
         for ( size_t i = 0; i < tau_syn_slow_.size(); ++i )
         {
    @@ -323,7 +314,7 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
         }
       }
       // for amp_slow
    -  if ( updateValue< std::vector< double > >( d, names::amp_slow, amp_slow_ ) )
    +  if ( d.update_value( names::amp_slow, amp_slow_ ) )
       {
         for ( size_t i = 0; i < amp_slow_.size(); ++i )
         {
    @@ -338,18 +329,18 @@ nest::glif_psc_double_alpha::Parameters_::set( const DictionaryDatum& d, Node* n
     }
     
     void
    -nest::glif_psc_double_alpha::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +nest::glif_psc_double_alpha::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 ] = U_ + p.E_L_;
    +  d[ names::ASCurrents ] = ASCurrents_;
    +  d[ names::threshold_spike ] = threshold_spike_;
    +  d[ names::threshold_voltage ] = threshold_voltage_;
     }
     
     void
    -nest::glif_psc_double_alpha::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::glif_psc_double_alpha::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  if ( updateValueParam< double >( d, names::V_m, U_, node ) )
    +  if ( update_value_param( d, names::V_m, U_, node ) )
       {
         U_ -= p.E_L_;
       }
    @@ -358,7 +349,7 @@ nest::glif_psc_double_alpha::State_::set( const DictionaryDatum& d, const Parame
         U_ -= delta_EL;
       }
     
    -  bool asc_flag = updateValue< std::vector< double > >( d, names::ASCurrents, 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." );
    @@ -374,13 +365,12 @@ nest::glif_psc_double_alpha::State_::set( const DictionaryDatum& d, const Parame
         }
       }
     
    -  if ( updateValueParam< double >( d, names::threshold_spike, threshold_spike_, node ) 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 ( updateValueParam< double >( d, names::threshold_voltage, threshold_voltage_, node )
    -    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/glif_psc_double_alpha.h b/models/glif_psc_double_alpha.h
    index 69a51a98b0..33d1154e76 100644
    --- a/models/glif_psc_double_alpha.h
    +++ b/models/glif_psc_double_alpha.h
    @@ -30,8 +30,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -#include "dictdatum.h"
    -
     /* BeginUserDocs: neuron, integrate-and-fire, current-based, adaptation, hard threshold
     
     Short description
    @@ -231,21 +229,21 @@ class glif_psc_double_alpha : public ArchivingNode
     
       glif_psc_double_alpha( const glif_psc_double_alpha& );
     
    -  using nest::Node::handle;
    -  using nest::Node::handles_test_event;
    +  using Node::handle;
    +  using Node::handles_test_event;
     
    -  size_t send_test_event( nest::Node&, size_t, nest::synindex, bool ) override;
    +  size_t send_test_event( Node&, size_t, synindex, bool ) override;
     
    -  void handle( nest::SpikeEvent& ) override;
    -  void handle( nest::CurrentEvent& ) override;
    -  void handle( nest::DataLoggingRequest& ) override;
    +  void handle( SpikeEvent& ) override;
    +  void handle( CurrentEvent& ) override;
    +  void handle( DataLoggingRequest& ) override;
     
    -  size_t handles_test_event( nest::SpikeEvent&, size_t ) override;
    -  size_t handles_test_event( nest::CurrentEvent&, size_t ) override;
    -  size_t handles_test_event( nest::DataLoggingRequest&, size_t ) override;
    +  size_t handles_test_event( SpikeEvent&, size_t ) override;
    +  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;
     
     private:
       //! Reset internal buffers of neuron.
    @@ -255,11 +253,11 @@ class glif_psc_double_alpha : public ArchivingNode
       void pre_run_hook() override;
     
       //! Take neuron through given time interval
    -  void update( nest::Time const&, const long, const long ) override;
    +  void update( Time const&, const long, const long ) override;
     
       // The next two classes need to be friends to access the State_ class/member
    -  friend class nest::RecordablesMap< glif_psc_double_alpha >;
    -  friend class nest::UniversalDataLogger< glif_psc_double_alpha >;
    +  friend class RecordablesMap< glif_psc_double_alpha >;
    +  friend class UniversalDataLogger< glif_psc_double_alpha >;
     
       struct Parameters_
       {
    @@ -301,8 +299,8 @@ class glif_psc_double_alpha : public ArchivingNode
     
         Parameters_();
     
    -    void get( DictionaryDatum& ) const;
    -    double set( const DictionaryDatum&, Node* );
    +    void get( dictionary& ) const;
    +    double set( const dictionary&, Node* );
       };
     
       struct State_
    @@ -325,8 +323,8 @@ class glif_psc_double_alpha : public ArchivingNode
     
         State_( const Parameters_& );
     
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void get( dictionary&, const Parameters_& ) const;
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
     
    @@ -335,11 +333,11 @@ class glif_psc_double_alpha : public ArchivingNode
         Buffers_( glif_psc_double_alpha& );
         Buffers_( const Buffers_&, glif_psc_double_alpha& );
     
    -    std::vector< nest::RingBuffer > spikes_; //!< Buffer incoming spikes through delay, as sum
    -    nest::RingBuffer currents_;              //!< Buffer incoming currents through delay,
    +    std::vector< RingBuffer > spikes_; //!< Buffer incoming spikes through delay, as sum
    +    RingBuffer currents_;              //!< Buffer incoming currents through delay,
     
         //! Logger for all analog data
    -    nest::UniversalDataLogger< glif_psc_double_alpha > logger_;
    +    UniversalDataLogger< glif_psc_double_alpha > logger_;
       };
     
       struct Variables_
    @@ -427,46 +425,46 @@ class glif_psc_double_alpha : public ArchivingNode
       Buffers_ B_;
     
       //! Mapping of recordables names to access functions
    -  static nest::RecordablesMap< glif_psc_double_alpha > recordablesMap_;
    +  static RecordablesMap< glif_psc_double_alpha > recordablesMap_;
     };
     
     
     inline size_t
    -nest::glif_psc_double_alpha::Parameters_::n_receptors_() const
    +glif_psc_double_alpha::Parameters_::n_receptors_() const
     {
       return tau_syn_fast_.size();
     }
     
     inline size_t
    -nest::glif_psc_double_alpha::send_test_event( nest::Node& target, size_t receptor_type, nest::synindex, bool )
    +glif_psc_double_alpha::send_test_event( Node& target, size_t receptor_type, synindex, bool )
     {
    -  nest::SpikeEvent e;
    +  SpikeEvent e;
       e.set_sender( *this );
       return target.handles_test_event( e, receptor_type );
     }
     
     inline size_t
    -nest::glif_psc_double_alpha::handles_test_event( nest::CurrentEvent&, size_t receptor_type )
    +glif_psc_double_alpha::handles_test_event( CurrentEvent&, size_t receptor_type )
     {
       if ( receptor_type != 0 )
       {
    -    throw nest::UnknownReceptorType( receptor_type, get_name() );
    +    throw UnknownReceptorType( receptor_type, get_name() );
       }
       return 0;
     }
     
     inline size_t
    -nest::glif_psc_double_alpha::handles_test_event( nest::DataLoggingRequest& dlr, size_t receptor_type )
    +glif_psc_double_alpha::handles_test_event( DataLoggingRequest& dlr, size_t receptor_type )
     {
       if ( receptor_type != 0 )
       {
    -    throw nest::UnknownReceptorType( receptor_type, get_name() );
    +    throw UnknownReceptorType( receptor_type, get_name() );
       }
       return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
     }
     
     inline void
    -glif_psc_double_alpha::get_status( DictionaryDatum& d ) const
    +glif_psc_double_alpha::get_status( dictionary& d ) const
     {
       // get our own parameter and state data
       P_.get( d );
    @@ -475,11 +473,11 @@ glif_psc_double_alpha::get_status( DictionaryDatum& d ) const
       // get information managed by parent class
       ArchivingNode::get_status( d );
     
    -  ( *d )[ nest::names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -glif_psc_double_alpha::set_status( const DictionaryDatum& d )
    +glif_psc_double_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/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp
    index 7907b051c8..0aa3eaf8f8 100644
    --- a/models/hh_cond_beta_gap_traub.cpp
    +++ b/models/hh_cond_beta_gap_traub.cpp
    @@ -44,9 +44,6 @@
     #include "nest_impl.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_;
     
    @@ -230,45 +227,45 @@ nest::hh_cond_beta_gap_traub::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 DictionaryDatum& d, Node* node )
    +nest::hh_cond_beta_gap_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_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 );
    -  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, 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 )
       {
    @@ -292,21 +289,21 @@ nest::hh_cond_beta_gap_traub::Parameters_::set( const DictionaryDatum& d, Node*
     }
     
     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 ] = 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 DictionaryDatum& d, const Parameters_&, Node* node )
    +nest::hh_cond_beta_gap_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, 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 or y_[ HH_H ] < 0 or 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 fd63783789..65a6e02aa2 100644
    --- a/models/hh_cond_beta_gap_traub.h
    +++ b/models/hh_cond_beta_gap_traub.h
    @@ -226,8 +226,8 @@ class hh_cond_beta_gap_traub : public ArchivingNode
       {
       }
     
    -  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;
    @@ -280,8 +280,8 @@ class hh_cond_beta_gap_traub : public ArchivingNode
     
         Parameters_();
     
    -    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 dicitonary
       };
     
     public:
    @@ -316,8 +316,8 @@ class hh_cond_beta_gap_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* );
       };
     
       // Variables class -------------------------------------------------------
    @@ -484,19 +484,19 @@ hh_cond_beta_gap_traub::handles_test_event( GapJunctionEvent&, size_t receptor_t
     }
     
     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 ] = recordablesMap_.get_list();
     
    -  def< double >( d, names::t_spike, get_spiketime_ms() );
    +  d[ names::t_spike ] = 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, this );       // throws if BadProperty
    diff --git a/models/hh_cond_exp_traub.cpp b/models/hh_cond_exp_traub.cpp
    index 5aa908a15d..8f7ec02a39 100644
    --- a/models/hh_cond_exp_traub.cpp
    +++ b/models/hh_cond_exp_traub.cpp
    @@ -41,8 +41,6 @@
     #include "nest_impl.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_;
     
    @@ -188,41 +186,41 @@ nest::hh_cond_exp_traub::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 )
       {
    @@ -241,21 +239,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 ] = 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 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, 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 or y_[ HH_H ] < 0 or y_[ HH_N ] < 0 )
       {
         throw BadProperty( "All (in)activation variables must be non-negative." );
    @@ -420,18 +418,14 @@ nest::hh_cond_exp_traub::update( Time const& origin, const long from, const long
         {
           --S_.r_;
         }
    -    else
    +    else if ( S_.y_[ State_::V_M ] >= P_.V_T + 30. and V_.U_old_ > S_.y_[ State_::V_M ] ) // (threshold and maximum)
         {
    -      // (threshold   and    maximum    )
    -      if ( S_.y_[ State_::V_M ] >= P_.V_T + 30. and V_.U_old_ > S_.y_[ State_::V_M ] )
    -      {
    -        S_.r_ = V_.refractory_counts_;
    +      S_.r_ = V_.refractory_counts_;
     
    -        set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
    +      set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
     
    -        SpikeEvent se;
    -        kernel().event_delivery_manager.send( *this, se, lag );
    -      }
    +      SpikeEvent se;
    +      kernel().event_delivery_manager.send( *this, se, lag );
         }
     
         // set new input current
    diff --git a/models/hh_cond_exp_traub.h b/models/hh_cond_exp_traub.h
    index 1d2075ba43..bbbfb3a746 100644
    --- a/models/hh_cond_exp_traub.h
    +++ b/models/hh_cond_exp_traub.h
    @@ -183,8 +183,8 @@ class hh_cond_exp_traub : 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;
     
     private:
       void init_buffers_() override;
    @@ -232,8 +232,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -265,8 +265,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -381,19 +381,19 @@ hh_cond_exp_traub::handles_test_event( DataLoggingRequest& dlr, size_t receptor_
     }
     
     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 ] = recordablesMap_.get_list();
     
    -  def< double >( d, names::t_spike, get_spiketime_ms() );
    +  d[ names::t_spike ] = 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 29e953b810..81ed1d00db 100644
    --- a/models/hh_psc_alpha.cpp
    +++ b/models/hh_psc_alpha.cpp
    @@ -39,9 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     
     nest::RecordablesMap< nest::hh_psc_alpha > nest::hh_psc_alpha::recordablesMap_;
     
    @@ -189,37 +186,37 @@ nest::hh_psc_alpha::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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;
     }
     
     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, 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 );
       if ( C_m <= 0 )
       {
         throw BadProperty( "Capacitance must be strictly positive." );
    @@ -239,21 +236,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 ] = y_[ V_M ];
    +  d[ names::Act_m ] = y_[ HH_M ];
    +  d[ names::Inact_h ] = y_[ HH_H ];
    +  d[ names::Act_n ] = 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, 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 or y_[ HH_H ] < 0 or y_[ HH_N ] < 0 )
       {
         throw BadProperty( "All (in)activation variables must be non-negative." );
    @@ -433,7 +430,7 @@ nest::hh_psc_alpha::update( Time const& origin, const long from, const long to )
         {
           --S_.r_;
         }
    -    else if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] ) // ( threshold and maximum )
    +    else if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] ) // (threshold and maximum)
         {
           S_.r_ = V_.RefractoryCounts_;
     
    diff --git a/models/hh_psc_alpha.h b/models/hh_psc_alpha.h
    index cdc63e89b3..1b4b67ea6f 100644
    --- a/models/hh_psc_alpha.h
    +++ b/models/hh_psc_alpha.h
    @@ -179,8 +179,8 @@ class hh_psc_alpha : 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;
     
     private:
       void init_buffers_() override;
    @@ -218,8 +218,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -260,8 +260,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -384,17 +384,17 @@ hh_psc_alpha::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 e0c35e830f..068205e57d 100644
    --- a/models/hh_psc_alpha_clopath.cpp
    +++ b/models/hh_psc_alpha_clopath.cpp
    @@ -39,9 +39,6 @@
     #include "nest_impl.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_;
     
    @@ -203,43 +200,43 @@ nest::hh_psc_alpha_clopath::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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_u_bar_plus, tau_u_bar_plus );
    -  def< double >( d, names::tau_u_bar_minus, tau_u_bar_minus );
    -  def< double >( d, names::tau_u_bar_bar, tau_u_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_u_bar_plus ] = tau_u_bar_plus;
    +  d[ names::tau_u_bar_minus ] = tau_u_bar_minus;
    +  d[ names::tau_u_bar_bar ] = tau_u_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_u_bar_plus, tau_u_bar_plus, node );
    -  updateValueParam< double >( d, names::tau_u_bar_minus, tau_u_bar_minus, node );
    -  updateValueParam< double >( d, names::tau_u_bar_bar, tau_u_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_u_bar_plus, tau_u_bar_plus, node );
    +  update_value_param( d, names::tau_u_bar_minus, tau_u_bar_minus, node );
    +  update_value_param( d, names::tau_u_bar_bar, tau_u_bar_bar, node );
       if ( C_m <= 0 )
       {
         throw BadProperty( "Capacitance must be strictly positive." );
    @@ -259,27 +256,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 ] = 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 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, 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 or y_[ HH_H ] < 0 or y_[ HH_N ] < 0 )
       {
         throw BadProperty( "All (in)activation variables must be non-negative." );
    @@ -468,17 +465,15 @@ nest::hh_psc_alpha_clopath::update( Time const& origin, const long from, const l
         {
           --S_.r_;
         }
    -    else
    -      // (    threshold    and     maximum       )
    -      if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] )
    -      {
    -        S_.r_ = V_.RefractoryCounts_;
    +    else if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] ) // (threshold and maximum)
    +    {
    +      S_.r_ = V_.RefractoryCounts_;
     
    -        set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
    +      set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
     
    -        SpikeEvent se;
    -        kernel().event_delivery_manager.send( *this, se, lag );
    -      }
    +      SpikeEvent se;
    +      kernel().event_delivery_manager.send( *this, se, lag );
    +    }
     
         // log state data
         B_.logger_.record_data( origin.get_steps() + lag );
    diff --git a/models/hh_psc_alpha_clopath.h b/models/hh_psc_alpha_clopath.h
    index b1b3649b2a..4dc19dbbcf 100644
    --- a/models/hh_psc_alpha_clopath.h
    +++ b/models/hh_psc_alpha_clopath.h
    @@ -215,8 +215,8 @@ class hh_psc_alpha_clopath : public ClopathArchivingNode
       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;
     
     private:
       void init_buffers_() override;
    @@ -257,8 +257,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -302,8 +302,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -426,17 +426,17 @@ hh_psc_alpha_clopath::handles_test_event( DataLoggingRequest& dlr, size_t recept
     }
     
     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 ] = 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 b26176784f..7a0f6b8a68 100644
    --- a/models/hh_psc_alpha_gap.cpp
    +++ b/models/hh_psc_alpha_gap.cpp
    @@ -40,9 +40,6 @@
     #include "nest_impl.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_;
     
    @@ -229,39 +226,39 @@ nest::hh_psc_alpha_gap::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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." );
    @@ -281,24 +278,24 @@ 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 ] = 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 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 );
    -  if ( y_[ HH_M ] < 0 or y_[ HH_H ] < 0 or y_[ HH_N ] < 0 or y_[ HH_P ] < 0 )
    +  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." );
       }
    @@ -528,17 +525,15 @@ nest::hh_psc_alpha_gap::update_( Time const& origin, const long from, const long
           {
             --S_.r_;
           }
    -      else
    -        // (    threshold    and     maximum       )
    -        if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] )
    -        {
    -          S_.r_ = V_.RefractoryCounts_;
    +      else if ( S_.y_[ State_::V_M ] >= 0 and U_old > S_.y_[ State_::V_M ] ) // (threshold and maximum)
    +      {
    +        S_.r_ = V_.RefractoryCounts_;
     
    -          set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
    +        set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );
     
    -          SpikeEvent se;
    -          kernel().event_delivery_manager.send( *this, se, lag );
    -        }
    +        SpikeEvent se;
    +        kernel().event_delivery_manager.send( *this, se, lag );
    +      }
     
           // log state data
           B_.logger_.record_data( origin.get_steps() + lag );
    diff --git a/models/hh_psc_alpha_gap.h b/models/hh_psc_alpha_gap.h
    index cbeca72139..b596cf3ba7 100644
    --- a/models/hh_psc_alpha_gap.h
    +++ b/models/hh_psc_alpha_gap.h
    @@ -197,8 +197,8 @@ class hh_psc_alpha_gap : public ArchivingNode
       {
       }
     
    -  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;
    @@ -244,8 +244,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -286,8 +286,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -444,17 +444,17 @@ hh_psc_alpha_gap::handles_test_event( GapJunctionEvent&, size_t 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 ] = 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 047ca61fa3..74b17bb035 100644
    --- a/models/ht_neuron.cpp
    +++ b/models/ht_neuron.cpp
    @@ -339,97 +339,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 ] = E_Na;
    +  d[ names::E_K ] = E_K;
    +  d[ names::g_NaL ] = g_NaL;
    +  d[ names::g_KL ] = g_KL;
    +  d[ names::tau_m ] = tau_m;
    +  d[ names::theta_eq ] = theta_eq;
    +  d[ names::tau_theta ] = tau_theta;
    +  d[ names::t_ref ] = t_ref;
    +  d[ names::tau_spike ] = tau_spike;
    +  d[ names::g_peak_AMPA ] = g_peak_AMPA;
    +  d[ names::tau_rise_AMPA ] = tau_rise_AMPA;
    +  d[ names::tau_decay_AMPA ] = tau_decay_AMPA;
    +  d[ names::E_rev_AMPA ] = E_rev_AMPA;
    +  d[ names::g_peak_NMDA ] = g_peak_NMDA;
    +  d[ names::tau_rise_NMDA ] = tau_rise_NMDA;
    +  d[ names::tau_decay_NMDA ] = tau_decay_NMDA;
    +  d[ names::E_rev_NMDA ] = E_rev_NMDA;
    +  d[ names::V_act_NMDA ] = V_act_NMDA;
    +  d[ names::S_act_NMDA ] = S_act_NMDA;
    +  d[ names::tau_Mg_slow_NMDA ] = tau_Mg_slow_NMDA;
    +  d[ names::tau_Mg_fast_NMDA ] = tau_Mg_fast_NMDA;
    +  d[ names::instant_unblock_NMDA ] = instant_unblock_NMDA;
    +  d[ names::g_peak_GABA_A ] = g_peak_GABA_A;
    +  d[ names::tau_rise_GABA_A ] = tau_rise_GABA_A;
    +  d[ names::tau_decay_GABA_A ] = tau_decay_GABA_A;
    +  d[ names::E_rev_GABA_A ] = E_rev_GABA_A;
    +  d[ names::g_peak_GABA_B ] = g_peak_GABA_B;
    +  d[ names::tau_rise_GABA_B ] = tau_rise_GABA_B;
    +  d[ names::tau_decay_GABA_B ] = tau_decay_GABA_B;
    +  d[ names::E_rev_GABA_B ] = E_rev_GABA_B;
    +  d[ names::g_peak_NaP ] = g_peak_NaP;
    +  d[ names::E_rev_NaP ] = E_rev_NaP;
    +  d[ names::N_NaP ] = N_NaP;
    +  d[ names::g_peak_KNa ] = g_peak_KNa;
    +  d[ names::E_rev_KNa ] = E_rev_KNa;
    +  d[ names::tau_D_KNa ] = tau_D_KNa;
    +  d[ names::g_peak_T ] = g_peak_T;
    +  d[ names::E_rev_T ] = E_rev_T;
    +  d[ names::N_T ] = N_T;
    +  d[ names::g_peak_h ] = g_peak_h;
    +  d[ names::E_rev_h ] = E_rev_h;
    +  d[ names::voltage_clamp ] = 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, E_Na, node );
    +  update_value_param( d, names::E_K, E_K, node );
    +  update_value_param( d, names::g_NaL, g_NaL, node );
    +  update_value_param( d, names::g_KL, g_KL, node );
    +  update_value_param( d, names::tau_m, tau_m, node );
    +  update_value_param( d, names::theta_eq, theta_eq, node );
    +  update_value_param( d, names::tau_theta, tau_theta, node );
    +  update_value_param( d, names::tau_spike, tau_spike, node );
    +  update_value_param( d, names::t_ref, t_ref, node );
    +  update_value_param( d, names::g_peak_AMPA, g_peak_AMPA, node );
    +  update_value_param( d, names::tau_rise_AMPA, tau_rise_AMPA, node );
    +  update_value_param( d, names::tau_decay_AMPA, tau_decay_AMPA, node );
    +  update_value_param( d, names::E_rev_AMPA, E_rev_AMPA, node );
    +  update_value_param( d, names::g_peak_NMDA, g_peak_NMDA, 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::E_rev_NMDA, E_rev_NMDA, node );
    +  update_value_param( d, names::V_act_NMDA, V_act_NMDA, node );
    +  update_value_param( d, names::S_act_NMDA, S_act_NMDA, node );
    +  update_value_param( d, names::tau_Mg_slow_NMDA, tau_Mg_slow_NMDA, node );
    +  update_value_param( d, names::tau_Mg_fast_NMDA, tau_Mg_fast_NMDA, node );
    +  update_value_param( d, names::instant_unblock_NMDA, instant_unblock_NMDA, node );
    +  update_value_param( d, names::g_peak_GABA_A, g_peak_GABA_A, node );
    +  update_value_param( d, names::tau_rise_GABA_A, tau_rise_GABA_A, node );
    +  update_value_param( d, names::tau_decay_GABA_A, tau_decay_GABA_A, node );
    +  update_value_param( d, names::E_rev_GABA_A, E_rev_GABA_A, node );
    +  update_value_param( d, names::g_peak_GABA_B, g_peak_GABA_B, node );
    +  update_value_param( d, names::tau_rise_GABA_B, tau_rise_GABA_B, node );
    +  update_value_param( d, names::tau_decay_GABA_B, tau_decay_GABA_B, node );
    +  update_value_param( d, names::E_rev_GABA_B, E_rev_GABA_B, node );
    +  update_value_param( d, names::g_peak_NaP, g_peak_NaP, node );
    +  update_value_param( d, names::E_rev_NaP, E_rev_NaP, node );
    +  update_value_param( d, names::N_NaP, N_NaP, node );
    +  update_value_param( d, names::g_peak_KNa, g_peak_KNa, node );
    +  update_value_param( d, names::E_rev_KNa, E_rev_KNa, node );
    +  update_value_param( d, names::tau_D_KNa, tau_D_KNa, node );
    +  update_value_param( d, names::g_peak_T, g_peak_T, node );
    +  update_value_param( d, names::E_rev_T, E_rev_T, node );
    +  update_value_param( d, names::N_T, N_T, node );
    +  update_value_param( d, names::g_peak_h, g_peak_h, node );
    +  update_value_param( d, names::E_rev_h, E_rev_h, node );
    +  update_value_param( d, names::voltage_clamp, voltage_clamp, node );
     
       if ( g_peak_AMPA < 0 )
       {
    @@ -561,20 +561,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 ] = y_[ V_M ];     // Membrane potential
    +  d[ names::theta ] = 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, y_[ V_M ], nodeptr );
    +  update_value_param( d, names::theta, y_[ THETA ], nodeptr );
     
       bool equilibrate = false;
    -  updateValueParam< bool >( d, names::equilibrate, equilibrate, nodeptr );
    +  update_value_param( d, names::equilibrate, equilibrate, nodeptr );
       if ( equilibrate )
       {
         y_[ m_fast_NMDA ] = node.m_eq_NMDA_( y_[ V_M ] );
    @@ -734,25 +734,25 @@ nest::ht_neuron::pre_run_hook()
     }
     
     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 ] = 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();
    +  d[ names::receptor_types ] = receptor_type;
    +  d[ names::recordables ] = 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 6b33b29cdd..2751967ab6 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
     {
    @@ -214,8 +210,8 @@ class ht_neuron : 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;
     
     private:
       /**
    @@ -256,8 +252,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
     
         // Note: Conductances are unitless
         // Leaks
    @@ -371,8 +367,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 1221e89116..e7302de2d5 100644
    --- a/models/ht_synapse.h
    +++ b/models/ht_synapse.h
    @@ -141,12 +141,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.
    @@ -238,26 +238,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 ] = 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 >
     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, 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_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..a9497e0784 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 ] = 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();
    +  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 cf650afefe..d4991feb0c 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 ] = 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::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_chs_2007.cpp b/models/iaf_chs_2007.cpp
    index b5c183d7b0..3252528db4 100644
    --- a/models/iaf_chs_2007.cpp
    +++ b/models/iaf_chs_2007.cpp
    @@ -32,9 +32,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -93,26 +90,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 ] = 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 ] = 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, 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 = updateValue< std::vector< double > >( d, names::noise, noise_ );
    +  const bool updated_noise = d.update_value( names::noise, noise_ );
       if ( updated_noise )
       {
         s.position_ = 0;
    @@ -140,15 +137,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 ] = 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, 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 df3bb48efd..fc19083005 100644
    --- a/models/iaf_chs_2007.h
    +++ b/models/iaf_chs_2007.h
    @@ -140,8 +140,8 @@ class iaf_chs_2007 : public ArchivingNode
       size_t handles_test_event( SpikeEvent&, 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;
    @@ -170,8 +170,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -210,14 +210,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 );
       };
     
     
    @@ -320,17 +320,17 @@ iaf_chs_2007::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 62559536ae..5d620fd4c7 100644
    --- a/models/iaf_chxk_2008.cpp
    +++ b/models/iaf_chxk_2008.cpp
    @@ -37,8 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -195,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 ] = 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 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, 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,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 ] = 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, y[ V_M ], node );
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/iaf_chxk_2008.h b/models/iaf_chxk_2008.h
    index 20e3fed269..352532f620 100644
    --- a/models/iaf_chxk_2008.h
    +++ b/models/iaf_chxk_2008.h
    @@ -181,8 +181,8 @@ class iaf_chxk_2008 : public ArchivingNode
       void handle( CurrentEvent& ) override;
       void handle( DataLoggingRequest& ) 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;
    @@ -223,8 +223,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 --------------------------------------------
    @@ -265,13 +265,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:
    @@ -434,17 +434,17 @@ iaf_chxk_2008::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 7cbff968ee..a89865a7e0 100644
    --- a/models/iaf_cond_alpha.cpp
    +++ b/models/iaf_cond_alpha.cpp
    @@ -39,8 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -191,40 +189,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 ] = 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 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, 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 );
     
    -  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, E_ex, node );
    +  update_value_param( 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 );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_synE, node );
    +  update_value_param( d, names::tau_syn_in, tau_synI, node );
     
    -  updateValueParam< double >( d, names::I_e, 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." );
    @@ -244,23 +242,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 ] = 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 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, 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 4d67e2c52f..f899a35a32 100644
    --- a/models/iaf_cond_alpha.h
    +++ b/models/iaf_cond_alpha.h
    @@ -165,8 +165,8 @@ class iaf_cond_alpha : public ArchivingNode
       void handle( CurrentEvent& ) override;
       void handle( DataLoggingRequest& ) 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;
    @@ -204,8 +204,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // State variables class --------------------------------------------
    @@ -244,13 +244,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:
    @@ -392,17 +392,17 @@ iaf_cond_alpha::handles_test_event( DataLoggingRequest& dlr, size_t receptor_typ
     }
     
     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 ] = 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 2b99b81025..4d8e070ee2 100644
    --- a/models/iaf_cond_alpha_mc.cpp
    +++ b/models/iaf_cond_alpha_mc.cpp
    @@ -39,33 +39,10 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
    -/* ----------------------------------------------------------------
    - * Compartment name list
    - * ---------------------------------------------------------------- */
    -
    -/* Harold Gutch reported some static destruction problems on OSX 10.4.
    -   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 );
    -
    -/* ----------------------------------------------------------------
    - * Receptor dictionary
    - * ---------------------------------------------------------------- */
    -
    -// leads to seg fault on exit, see #328
    -// DictionaryDatum nest::iaf_cond_alpha_mc::receptor_dict_ = new Dictionary();
    -
    -/* ----------------------------------------------------------------
    - * Recordables map
    - * ---------------------------------------------------------------- */
    -
    +std::vector< std::string > nest::iaf_cond_alpha_mc::comp_names_( NCOMP );
     nest::RecordablesMap< nest::iaf_cond_alpha_mc > nest::iaf_cond_alpha_mc::recordablesMap_;
     
    +
     namespace nest
     {
     void
    @@ -74,32 +51,22 @@ register_iaf_cond_alpha_mc( const std::string& name )
       register_node_model< iaf_cond_alpha_mc >( name );
     }
     
    -// specialization must be place in namespace
    -
    +// specialization must be placed in namespace
     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_ );
     }
    @@ -340,59 +307,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 ] = V_th;
    +  d[ names::V_reset ] = V_reset;
    +  d[ names::t_ref ] = t_ref;
     
    -  def< double >( d, names::g_sp, g_conn[ SOMA ] );
    -  def< double >( d, names::g_pd, 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 )
       {
    -    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 ] = 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 ] ] = 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, V_th, node );
    +  update_value_param( d, names::V_reset, V_reset, node );
    +  update_value_param( d, names::t_ref, 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, 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 ] ) )
    +    if ( d.known( comp_names_[ n ] ) )
         {
    -      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 ] );
    +
    +      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 )
    @@ -409,39 +376,39 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const DictionaryDatum& 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 or 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." );
         }
       }
     }
     
     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 ] ) );
    +    auto dd = d.get< dictionary >( comp_names_[ n ] );
     
    -    def< double >( dd, names::V_m, y_[ idx( n, V_M ) ] ); // Membrane potential
    +    dd[ names::V_m ] = 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 ] ) )
         {
    -      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 ] );
    +      update_value_param( dd, names::V_m, y_[ idx( n, V_M ) ], node );
         }
       }
     }
    @@ -461,9 +428,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 fe9052ee40..257ea7e661 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
     {
    @@ -209,8 +206,8 @@ class iaf_cond_alpha_mc : 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;
     
     private:
       void init_buffers_() override;
    @@ -322,8 +319,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     
    @@ -364,8 +361,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.
    @@ -468,10 +465,9 @@ 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_;
    +  // Dictionary of receptor types, leads to seg fault on exit, see #328
     
       //! Mapping of recordables names to access functions
       static RecordablesMap< iaf_cond_alpha_mc > recordablesMap_;
    @@ -537,37 +533,37 @@ iaf_cond_alpha_mc::handles_test_event( DataLoggingRequest& dlr, size_t receptor_
     }
     
     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 ] = 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 ] = 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 ] = PROX_EXC;
    -  ( *receptor_dict_ )[ names::proximal_inh ] = PROX_INH;
    -  ( *receptor_dict_ )[ names::proximal_curr ] = 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 ] = DIST_EXC;
    -  ( *receptor_dict_ )[ names::distal_inh ] = DIST_INH;
    -  ( *receptor_dict_ )[ names::distal_curr ] = 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_;
    +  d[ names::receptor_types ] = 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 a0f5d59c2e..eace4312c1 100644
    --- a/models/iaf_cond_beta.cpp
    +++ b/models/iaf_cond_beta.cpp
    @@ -40,8 +40,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -194,44 +192,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 ] = 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_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::I_e ] = 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, 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 );
     
    -  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, E_ex, node );
    +  update_value_param( 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 );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, 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, 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 );
     
    -  updateValueParam< double >( d, names::I_e, 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." );
    @@ -251,23 +249,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 ] = 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 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, 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 56f6510556..e040c08a93 100644
    --- a/models/iaf_cond_beta.h
    +++ b/models/iaf_cond_beta.h
    @@ -184,8 +184,8 @@ class iaf_cond_beta : public ArchivingNode
       void handle( CurrentEvent& ) override;
       void handle( DataLoggingRequest& ) 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;
    @@ -226,8 +226,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // State variables class --------------------------------------------
    @@ -266,13 +266,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:
    @@ -414,17 +414,17 @@ iaf_cond_beta::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 c777d686fd..acbe811c54 100644
    --- a/models/iaf_cond_exp.cpp
    +++ b/models/iaf_cond_exp.cpp
    @@ -39,8 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -155,40 +153,40 @@ nest::iaf_cond_exp::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, E_ex, node );
    +  update_value_param( 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 );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_synE, node );
    +  update_value_param( d, names::tau_syn_in, tau_synI, node );
     
    -  updateValueParam< double >( d, names::I_e, 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." );
    @@ -208,19 +206,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 ] = 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 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, 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 1c6e9abe10..cdfab47f65 100644
    --- a/models/iaf_cond_exp.h
    +++ b/models/iaf_cond_exp.h
    @@ -155,8 +155,8 @@ class iaf_cond_exp : 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;
     
     private:
       void init_buffers_() override;
    @@ -194,8 +194,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -225,8 +225,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -342,17 +342,17 @@ iaf_cond_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 d37b461e06..8ec098e534 100644
    --- a/models/iaf_cond_exp_sfa_rr.cpp
    +++ b/models/iaf_cond_exp_sfa_rr.cpp
    @@ -39,8 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -173,54 +171,54 @@ nest::iaf_cond_exp_sfa_rr::State_::operator=( const State_& s )
      * ---------------------------------------------------------------- */
     
     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 ] = 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 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, 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 );
     
    -  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, E_ex, node );
    +  update_value_param( 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 );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, 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, tau_synE, node );
    +  update_value_param( d, names::tau_syn_in, tau_synI, node );
     
    -  updateValueParam< double >( d, names::I_e, I_e, node );
    +  update_value_param( d, names::I_e, 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, 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." );
    @@ -240,23 +238,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 ] = 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 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, 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 12c156f5a6..88057cb9d4 100644
    --- a/models/iaf_cond_exp_sfa_rr.h
    +++ b/models/iaf_cond_exp_sfa_rr.h
    @@ -178,8 +178,8 @@ class iaf_cond_exp_sfa_rr : 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;
     
     private:
       void init_buffers_() override;
    @@ -226,8 +226,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -259,8 +259,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:
    @@ -377,17 +377,17 @@ iaf_cond_exp_sfa_rr::handles_test_event( DataLoggingRequest& dlr, size_t recepto
     
     
     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 ] = 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 053a30a22c..46a9a79018 100644
    --- a/models/iaf_psc_alpha.cpp
    +++ b/models/iaf_psc_alpha.cpp
    @@ -35,8 +35,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_;
     
    @@ -97,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 ] = 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::V_min ] = LowerBound_ + E_L_;
    +  d[ names::C_m ] = C_;
    +  d[ names::tau_m ] = Tau_;
    +  d[ names::t_ref ] = TauR_;
    +  d[ names::tau_syn_ex ] = tau_ex_;
    +  d[ names::tau_syn_in ] = 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, 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_;
       }
    @@ -129,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, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -138,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, LowerBound_, node ) )
       {
         LowerBound_ -= E_L_;
       }
    @@ -147,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, 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, TauR_, node );
     
       if ( C_ <= 0.0 )
       {
    @@ -182,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 ] = 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, y3_, node ) )
       {
         y3_ -= p.E_L_;
       }
    diff --git a/models/iaf_psc_alpha.h b/models/iaf_psc_alpha.h
    index a13b58e7e0..8dc8367172 100644
    --- a/models/iaf_psc_alpha.h
    +++ b/models/iaf_psc_alpha.h
    @@ -235,8 +235,8 @@ class iaf_psc_alpha : 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;
     
     private:
       void init_buffers_() override;
    @@ -286,12 +286,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -310,14 +310,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -453,17 +453,17 @@ iaf_psc_alpha::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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_multisynapse.cpp b/models/iaf_psc_alpha_multisynapse.cpp
    index cee69d2889..23f2894785 100644
    --- a/models/iaf_psc_alpha_multisynapse.cpp
    +++ b/models/iaf_psc_alpha_multisynapse.cpp
    @@ -34,10 +34,6 @@
     #include "numerics.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     /* ----------------------------------------------------------------
      * Recordables map
      * ---------------------------------------------------------------- */
    @@ -64,12 +60,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
    @@ -121,33 +117,31 @@ 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_ );
    -
    -  ArrayDatum tau_syn_ad( tau_syn_ );
    -  def< ArrayDatum >( d, names::tau_syn, tau_syn_ad );
    +  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::V_min ] = LowerBound_ + E_L_;
    +  d[ names::n_synapses ] = n_receptors_();
    +  d[ names::has_connections ] = has_connections_;
    +  d[ names::tau_syn ] = tau_syn_;
     }
     
     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, 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_;
       }
    @@ -155,7 +149,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, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -163,7 +157,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, LowerBound_, node ) )
       {
         LowerBound_ -= E_L_;
       }
    @@ -171,10 +165,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, 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 )
       {
    @@ -185,7 +179,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 and has_connections_ == true )
         {
    @@ -216,21 +210,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 ] = 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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    @@ -422,7 +413,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 61852db6ef..0980427d96 100644
    --- a/models/iaf_psc_alpha_multisynapse.h
    +++ b/models/iaf_psc_alpha_multisynapse.h
    @@ -58,7 +58,6 @@ a different time constant. The port number has to match the respective
     
     .. note::
     
    -
        If ``tau_m`` is very close to ``tau_syn_ex`` or ``tau_syn_in``, the model
        will numerically behave as if ``tau_m`` is equal to ``tau_syn_ex`` or
        ``tau_syn_in``, respectively, to avoid numerical instabilities.
    @@ -115,8 +114,8 @@ class iaf_psc_alpha_multisynapse : 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;
     
     private:
       void init_buffers_() override;
    @@ -172,12 +171,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_
     
       // ----------------------------------------------------------------
    @@ -219,14 +218,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_
     
       // ----------------------------------------------------------------
    @@ -309,7 +308,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 );
     };
     
    @@ -349,13 +348,13 @@ iaf_psc_alpha_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_t
     }
     
     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 ] = recordablesMap_.get_list();
     }
     
     } // namespace
    diff --git a/models/iaf_psc_alpha_ps.cpp b/models/iaf_psc_alpha_ps.cpp
    index 885d1f2051..388ca0f6df 100644
    --- a/models/iaf_psc_alpha_ps.cpp
    +++ b/models/iaf_psc_alpha_ps.cpp
    @@ -37,8 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -105,37 +103,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 ] = 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_syn_ex_;
    +  d[ names::tau_syn_in ] = tau_syn_in_;
    +  d[ names::t_ref ] = t_ref_;
     }
     
     double
    -nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::iaf_psc_alpha_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, 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_syn_ex_, node );
    -  updateValueParam< double >( d, names::tau_syn_in, tau_syn_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, tau_m_, 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::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 ( updateValueParam< double >( d, names::V_th, U_th_, node ) )
    +  if ( update_value_param( d, names::V_th, U_th_, node ) )
       {
         U_th_ -= E_L_;
       }
    @@ -144,7 +142,7 @@ nest::iaf_psc_alpha_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, U_min_, node ) )
       {
         U_min_ -= E_L_;
       }
    @@ -153,7 +151,7 @@ nest::iaf_psc_alpha_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, U_reset_, node ) )
       {
         U_reset_ -= E_L_;
       }
    @@ -191,20 +189,20 @@ nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     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 ] = V_m_ + p.E_L_; // Membrane potential
    +  d[ names::I_syn_ex ] = I_ex_;    // Excitatory synaptic current
    +  d[ names::I_syn_in ] = I_in_;    // Inhibitory synaptic current
    +  d[ names::dI_syn_in ] = dI_in_;  // Derivative inhib. current
    +  d[ names::dI_syn_ex ] = dI_ex_;  // Derivative exc. current
    +  d[ names::is_refractory ] = is_refractory_;
     }
     
     void
    -nest::iaf_psc_alpha_ps::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::iaf_psc_alpha_ps::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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    diff --git a/models/iaf_psc_alpha_ps.h b/models/iaf_psc_alpha_ps.h
    index 7e1ac8190c..94e2083958 100644
    --- a/models/iaf_psc_alpha_ps.h
    +++ b/models/iaf_psc_alpha_ps.h
    @@ -197,8 +197,8 @@ class iaf_psc_alpha_ps : public ArchivingNode
         return true;
       } // uses off_grid events
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       /**
        * Based on the current state, compute the value of the membrane potential
    @@ -324,12 +324,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&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       // ----------------------------------------------------------------
    @@ -351,14 +351,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, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       // ----------------------------------------------------------------
    @@ -507,17 +507,17 @@ iaf_psc_alpha_ps::handles_test_event( DataLoggingRequest& dlr, size_t receptor_t
     }
     
     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 ] = 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, this ); // throws if BadProperty
    diff --git a/models/iaf_psc_delta.cpp b/models/iaf_psc_delta.cpp
    index 4de329ed60..9630bb1f17 100644
    --- a/models/iaf_psc_delta.cpp
    +++ b/models/iaf_psc_delta.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     namespace nest
     {
     void
    @@ -95,29 +92,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 ] = E_L_; // Resting potential
    +  d[ names::I_e ] = I_e_;
    +  d[ names::V_th ] = V_th_ + E_L_; // threshold value
    +  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_;
     }
     
     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, 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_;
       }
    @@ -126,7 +123,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, V_th_, node ) )
       {
         V_th_ -= E_L_;
       }
    @@ -135,7 +132,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, V_min_, node ) )
       {
         V_min_ -= E_L_;
       }
    @@ -144,10 +141,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, 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 );
       if ( V_reset_ >= V_th_ )
       {
         throw BadProperty( "Reset potential must be smaller than threshold." );
    @@ -165,21 +162,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, 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 ] = 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, y3_, node ) )
       {
         y3_ -= p.E_L_;
       }
    diff --git a/models/iaf_psc_delta.h b/models/iaf_psc_delta.h
    index fde397dc15..27961124ab 100644
    --- a/models/iaf_psc_delta.h
    +++ b/models/iaf_psc_delta.h
    @@ -227,8 +227,8 @@ class iaf_psc_delta : 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;
     
     private:
       void init_buffers_() override;
    @@ -278,12 +278,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -306,14 +306,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -415,16 +415,16 @@ iaf_psc_delta::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 1da42f3dcc..5aa4a6b882 100644
    --- a/models/iaf_psc_delta_ps.cpp
    +++ b/models/iaf_psc_delta_ps.cpp
    @@ -38,8 +38,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -98,33 +96,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 ] = 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
    -nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::iaf_psc_delta_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, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  updateValueParam< double >( d, names::tau_m, tau_m_, 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, tau_m_, 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 ( updateValueParam< double >( d, names::V_th, U_th_, node ) )
    +  if ( update_value_param( d, names::V_th, U_th_, node ) )
       {
         U_th_ -= E_L_;
       }
    @@ -133,7 +131,7 @@ nest::iaf_psc_delta_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, U_min_, node ) )
       {
         U_min_ -= E_L_;
       }
    @@ -142,7 +140,7 @@ nest::iaf_psc_delta_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, U_reset_, node ) )
       {
         U_reset_ -= E_L_;
       }
    @@ -176,17 +174,17 @@ nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     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 ] = 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 DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::iaf_psc_delta_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  if ( updateValueParam< double >( d, names::V_m, U_, node ) )
    +  if ( update_value_param( d, names::V_m, U_, node ) )
       {
         U_ -= p.E_L_;
       }
    diff --git a/models/iaf_psc_delta_ps.h b/models/iaf_psc_delta_ps.h
    index 67c913fb1e..f8947cab3c 100644
    --- a/models/iaf_psc_delta_ps.h
    +++ b/models/iaf_psc_delta_ps.h
    @@ -203,8 +203,8 @@ class iaf_psc_delta_ps : public ArchivingNode
         return true;
       } // uses off_grid events
     
    -  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:
       /** @name Interface functions
    @@ -284,12 +284,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&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
     
    @@ -319,14 +319,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, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       // ----------------------------------------------------------------
    @@ -443,17 +443,17 @@ iaf_psc_delta_ps::handles_test_event( DataLoggingRequest& dlr, size_t receptor_t
     }
     
     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 ] = 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, this ); // throws if BadProperty
    diff --git a/models/iaf_psc_exp.cpp b/models/iaf_psc_exp.cpp
    index 48385040db..3e9472a848 100644
    --- a/models/iaf_psc_exp.cpp
    +++ b/models/iaf_psc_exp.cpp
    @@ -37,9 +37,6 @@
     #include "ring_buffer_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     /* ----------------------------------------------------------------
      * Recordables map
      * ---------------------------------------------------------------- */
    @@ -101,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 ] = 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
    -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, 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_;
       }
    @@ -134,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, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -143,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, 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." );
    @@ -166,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." );
    @@ -182,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 ] = 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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    diff --git a/models/iaf_psc_exp.h b/models/iaf_psc_exp.h
    index fcd646dccf..c47b7f2f3c 100644
    --- a/models/iaf_psc_exp.h
    +++ b/models/iaf_psc_exp.h
    @@ -277,8 +277,8 @@ class iaf_psc_exp : 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;
     
     private:
       void init_buffers_() override;
    @@ -336,12 +336,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -362,14 +362,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -515,17 +515,17 @@ iaf_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 dd38c565cd..59111b8f66 100644
    --- a/models/iaf_psc_exp_htum.cpp
    +++ b/models/iaf_psc_exp_htum.cpp
    @@ -32,8 +32,6 @@
     #include "numerics.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -95,30 +93,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 ] = 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
    -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, 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_;
       }
    @@ -127,7 +125,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, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -136,13 +134,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, 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." );
    @@ -166,15 +164,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 ] = 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, 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 62b349bd21..78e6835d1a 100644
    --- a/models/iaf_psc_exp_htum.h
    +++ b/models/iaf_psc_exp_htum.h
    @@ -180,8 +180,8 @@ class iaf_psc_exp_htum : 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;
     
     private:
       void init_buffers_() override;
    @@ -231,12 +231,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -258,14 +258,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -391,16 +391,16 @@ iaf_psc_exp_htum::handles_test_event( DataLoggingRequest& dlr, size_t receptor_t
     
     
     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 ] = 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 7c53921537..86937dd02a 100644
    --- a/models/iaf_psc_exp_multisynapse.cpp
    +++ b/models/iaf_psc_exp_multisynapse.cpp
    @@ -31,9 +31,6 @@
     #include "numerics.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -61,12 +58,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
    @@ -116,32 +113,30 @@ 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_ );
    -
    -  ArrayDatum tau_syn_ad( tau_syn_ );
    -  def< ArrayDatum >( d, names::tau_syn, tau_syn_ad );
    +  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_;
    +  d[ names::tau_syn ] = tau_syn_;
     }
     
     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, 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_;
       }
    @@ -149,7 +144,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, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -158,10 +153,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, 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 )
       {
    @@ -172,7 +167,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 and has_connections_ )
         {
    @@ -203,18 +198,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 ] = 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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    @@ -388,7 +383,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 3639df2b0d..1d869a3406 100644
    --- a/models/iaf_psc_exp_multisynapse.h
    +++ b/models/iaf_psc_exp_multisynapse.h
    @@ -119,8 +119,8 @@ class iaf_psc_exp_multisynapse : 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;
     
     private:
       void init_buffers_() override;
    @@ -172,12 +172,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_
     
       // ----------------------------------------------------------------
    @@ -218,14 +218,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_
     
       // ----------------------------------------------------------------
    @@ -309,7 +309,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 );
     };
     
    @@ -349,13 +349,13 @@ iaf_psc_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, size_t re
     }
     
     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 ] = recordablesMap_.get_list();
     }
     
     } // namespace
    diff --git a/models/iaf_psc_exp_ps.cpp b/models/iaf_psc_exp_ps.cpp
    index 71f83acc78..95ef48d673 100644
    --- a/models/iaf_psc_exp_ps.cpp
    +++ b/models/iaf_psc_exp_ps.cpp
    @@ -37,8 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -109,37 +107,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 ] = 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
    -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, 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, 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 ( updateValueParam< double >( d, names::V_th, U_th_, node ) )
    +  if ( update_value_param( d, names::V_th, U_th_, node ) )
       {
         U_th_ -= E_L_;
       }
    @@ -148,7 +146,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, U_min_, node ) )
       {
         U_min_ -= E_L_;
       }
    @@ -157,7 +155,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, U_reset_, node ) )
       {
         U_reset_ -= E_L_;
       }
    @@ -191,18 +189,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 ] = 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 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, y2_, node ) )
       {
         y2_ -= p.E_L_;
       }
    @@ -210,8 +208,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, 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 953bef593a..4db281ff22 100644
    --- a/models/iaf_psc_exp_ps.h
    +++ b/models/iaf_psc_exp_ps.h
    @@ -191,8 +191,8 @@ class iaf_psc_exp_ps : public ArchivingNode
         return true;
       }
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       /**
        * Based on the current state, compute the value of the membrane potential
    @@ -315,12 +315,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -341,14 +341,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -459,17 +459,17 @@ iaf_psc_exp_ps::handles_test_event( DataLoggingRequest& dlr, size_t receptor_typ
     }
     
     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 ] = 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 dcbf6435bf..14e565b1f9 100644
    --- a/models/iaf_psc_exp_ps_lossless.cpp
    +++ b/models/iaf_psc_exp_ps_lossless.cpp
    @@ -35,10 +35,6 @@
     #include "iaf_propagator.h"
     #include "regula_falsi.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -111,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 ] = 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
    -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, 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, 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 ( updateValueParam< double >( d, names::V_th, U_th_, node ) )
    +  if ( update_value_param( d, names::V_th, U_th_, node ) )
       {
         U_th_ -= E_L_;
       }
    @@ -150,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, U_min_, node ) )
       {
         U_min_ -= E_L_;
       }
    @@ -159,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, U_reset_, node ) )
       {
         U_reset_ -= E_L_;
       }
    @@ -212,23 +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::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 ] = 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 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, y2_, node ) )
       {
         y2_ -= p.E_L_;
       }
    @@ -237,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, I_syn_ex_, node );
    +  update_value_param( d, names::I_syn_in, I_syn_in_, node );
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/iaf_psc_exp_ps_lossless.h b/models/iaf_psc_exp_ps_lossless.h
    index 95f3becabc..7a06b76a5a 100644
    --- a/models/iaf_psc_exp_ps_lossless.h
    +++ b/models/iaf_psc_exp_ps_lossless.h
    @@ -70,31 +70,13 @@ meets the threshold.
     
     .. note::
     
    -   If ``tau_m`` is very close to ``tau_syn_ex`` or ``tau_syn_in``, the model
    -   will numerically behave as if ``tau_m`` is equal to ``tau_syn_ex`` or
    -   ``tau_syn_in``, respectively, to avoid numerical instabilities.
    +  If `tau_m` is very close to `tau_syn_ex` or `tau_syn_in`, the model
    +  will numerically behave as if `tau_m` is equal to `tau_syn_ex` or
    +  `tau_syn_in`, respectively, to avoid numerical instabilities.
     
       For implementation details see the
       `IAF Integration Singularity notebook <../model_details/IAF_Integration_Singularity.ipynb>`_.
     
    -This model transmits precise spike times to target nodes (on-grid spike
    -time and offset). If this node is connected to a spike_recorder, the
    -property "precise_times" of the spike_recorder has to be set to true in
    -order to record the offsets in addition to the on-grid spike times.
    -
    -The iaf_psc_delta_ps neuron accepts connections transmitting
    -CurrentEvents. These events transmit stepwise-constant currents which
    -can only change at on-grid times.
    -
    -In the current implementation, tau_syn_ex and tau_syn_in must be equal.
    -This is because the state space would be 3-dimensional otherwise, which
    -makes the detection of threshold crossing more difficult [1]_.
    -Support for different time constants may be added in the future,
    -see issue #921.
    -
    -For details about exact subthreshold integration, please see
    -:doc:`../neurons/exact-integration`.
    -
     Parameters
     ++++++++++
     
    @@ -187,8 +169,8 @@ class iaf_psc_exp_ps_lossless : public ArchivingNode
         return true;
       }
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       /**
        * Based on the current state, compute the value of the membrane potential
    @@ -326,8 +308,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 dictionary
    +    void get( dictionary& ) const;               //!< Store current values in dictionary
    +    double set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ----------------------------------------------------------------
    @@ -348,8 +330,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -506,17 +488,17 @@ iaf_psc_exp_ps_lossless::handles_test_event( DataLoggingRequest& dlr, size_t rec
     }
     
     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_ );
       ArchivingNode::get_status( d );
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = 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/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 76d2402010..9f78528708 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/inhomogeneous_poisson_generator.cpp b/models/inhomogeneous_poisson_generator.cpp
    index 8f0b5f58ba..89e4683541 100644
    --- a/models/inhomogeneous_poisson_generator.cpp
    +++ b/models/inhomogeneous_poisson_generator.cpp
    @@ -35,19 +35,12 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     void
     nest::register_inhomogeneous_poisson_generator( const std::string& name )
     {
       register_node_model< inhomogeneous_poisson_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameter
      * ---------------------------------------------------------------- */
    @@ -65,19 +58,19 @@ 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 >();
    -  times_ms->reserve( n_rates );
    +  std::vector< double > times_ms;
    +  times_ms.reserve( n_rates );
       for ( size_t n = 0; n < n_rates; ++n )
       {
    -    times_ms->push_back( rate_times_[ n ].get_ms() );
    +    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 ] = times_ms;
    +  d[ names::rate_values ] = rate_values_;
    +  d[ names::allow_offgrid_times ] = allow_offgrid_times_;
     }
     
     void
    @@ -117,16 +110,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 );
    +  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 ) )
    +  if ( d.known( names::allow_offgrid_times ) )
       {
    -    const bool flag_offgrid = d->lookup( names::allow_offgrid_times );
    +    const auto flag_offgrid = d.get< bool >( names::allow_offgrid_times );
     
         if ( flag_offgrid != allow_offgrid_times_ and not( times or rate_times_.empty() ) )
         {
    @@ -151,7 +144,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 );
     
       if ( d_times.empty() )
       {
    @@ -306,7 +299,7 @@ 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;
         std::vector< double > times_ms;
         std::vector< double > rate_values;
         const size_t n_spikes = P_.rate_times_.size();
    @@ -320,8 +313,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 ] = times_ms;
    +    d[ names::rate_values ] = rate_values;
     
         ptmp.set( d, B_, this );
       }
    diff --git a/models/inhomogeneous_poisson_generator.h b/models/inhomogeneous_poisson_generator.h
    index 40efca5aa3..9e0627f470 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"
    @@ -120,8 +119,8 @@ class inhomogeneous_poisson_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -152,9 +151,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 );
       };
    @@ -208,14 +207,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 9865f74427..ee97e0dfb4 100644
    --- a/models/izhikevich.cpp
    +++ b/models/izhikevich.cpp
    @@ -36,8 +36,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -93,29 +91,31 @@ 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 ] = 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 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, 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_ and h != 1.0 )
       {
    @@ -124,17 +124,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 ] = u_; // Membrane potential recovery variable
    +  d[ names::V_m ] = 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, 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 128020a698..b9f9cbb4a6 100644
    --- a/models/izhikevich.h
    +++ b/models/izhikevich.h
    @@ -169,8 +169,8 @@ class izhikevich : public ArchivingNode
     
       size_t send_test_event( Node&, size_t, 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;
     
     private:
       friend class RecordablesMap< izhikevich >;
    @@ -207,8 +207,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ----------------------------------------------------------------
    @@ -229,8 +229,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -328,16 +328,16 @@ izhikevich::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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.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/jonke_synapse.h b/models/jonke_synapse.h
    index e8bb578566..513e992d69 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
     {
    @@ -143,12 +140,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_;
    @@ -159,7 +156,6 @@ class JonkeCommonProperties : public CommonSynapseProperties
       double Wmax_;
     };
     
    -
     // connections are templates of target identifier type (used for pointer /
     // target index addressing) derived from generic connection template
     void register_jonke_synapse( const std::string& name );
    @@ -202,12 +198,12 @@ 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 );
     
       /**
        * Send an event to the receiver of this connection.
    @@ -363,22 +359,23 @@ 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< double >( d, names::Kplus, Kplus_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::weight ] = weight_;
    +  d[ names::Kplus ] = Kplus_;
    +  d[ names::size_of ] = 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_ );
    -  updateValue< double >( d, names::Kplus, Kplus_ );
     
    +  d.update_value( names::weight, weight_ );
    +
    +  d.update_value( names::Kplus, Kplus_ );
       if ( Kplus_ < 0 )
       {
         throw BadProperty( "Kplus must be non-negative." );
    diff --git a/models/lin_rate.cpp b/models/lin_rate.cpp
    index 2db3fcafd1..d36dfedfc5 100644
    --- a/models/lin_rate.cpp
    +++ b/models/lin_rate.cpp
    @@ -49,23 +49,23 @@ register_rate_transformer_lin( const std::string& name )
     
     
     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 ] = 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 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, 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/lin_rate.h b/models/lin_rate.h
    index 5482c62aae..e4e3f97384 100644
    --- a/models/lin_rate.h
    +++ b/models/lin_rate.h
    @@ -155,8 +155,8 @@ class nonlinearities_lin_rate
       {
       }
     
    -  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
     
       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 104d20af0f..27886e6497 100644
    --- a/models/mat2_psc_exp.cpp
    +++ b/models/mat2_psc_exp.cpp
    @@ -33,8 +33,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    @@ -102,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 ] = 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
    -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, 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, 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,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 ] = 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 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, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    @@ -185,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, 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 6cecbb30b6..4d340e5c85 100644
    --- a/models/mat2_psc_exp.h
    +++ b/models/mat2_psc_exp.h
    @@ -104,6 +104,19 @@ The following parameters can be set in the status dictionary:
                           relative to E_L as in [3]_)
     ============ =======  ========================================================
     
    +The following state variables can be read out with the multimeter device:
    +
    +====== ====  =================================
    + V_m   mV    Non-resetting membrane potential
    + V_th  mV    Two-timescale adaptive threshold
    +====== ====  =================================
    +
    +Remarks:
    +
    +tau_m != tau_syn_{ex,in} is required by the current implementation to avoid a
    +degenerate case of the ODE describing the model [1]_. For very similar values,
    +numerics will be unstable.
    +
     References
     ++++++++++
     
    @@ -173,8 +186,8 @@ class mat2_psc_exp : public ArchivingNode
       void handle( CurrentEvent& ) override;
       void handle( DataLoggingRequest& ) 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;
    @@ -229,12 +242,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 dictionary
    +    double set( const dictionary&, Node* node );
       };
     
       // ----------------------------------------------------------------
    @@ -258,14 +271,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -392,17 +405,17 @@ mat2_psc_exp::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 2f8b15a6d9..e174a8f1aa 100644
    --- a/models/mcculloch_pitts_neuron.cpp
    +++ b/models/mcculloch_pitts_neuron.cpp
    @@ -38,15 +38,15 @@ register_mcculloch_pitts_neuron( const std::string& name )
     
     
     void
    -gainfunction_mcculloch_pitts::get( DictionaryDatum& d ) const
    +gainfunction_mcculloch_pitts::get( dictionary& d ) const
     {
    -  def< double >( d, names::theta, theta_ );
    +  d[ names::theta ] = 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, theta_, node );
     }
     
     /*
    diff --git a/models/mcculloch_pitts_neuron.h b/models/mcculloch_pitts_neuron.h
    index c61643f65f..db66af41b6 100644
    --- a/models/mcculloch_pitts_neuron.h
    +++ b/models/mcculloch_pitts_neuron.h
    @@ -139,8 +139,8 @@ class gainfunction_mcculloch_pitts
       {
       }
     
    -  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, double h );
     };
    diff --git a/models/mip_generator.cpp b/models/mip_generator.cpp
    index bf60516e97..e5121a38f7 100644
    --- a/models/mip_generator.cpp
    +++ b/models/mip_generator.cpp
    @@ -54,17 +54,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 ] = rate_;
    +  d[ names::p_copy ] = 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, rate_, node );
    +  update_value_param( d, names::p_copy, p_copy_, node );
     
       if ( rate_ < 0 )
       {
    @@ -199,9 +199,9 @@ 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;
    +      d[ names::rate ] = input_param[ 0 ];
    +      d[ names::p_copy ] = input_param[ 1 ];
           ptmp.set( d, this );
         }
       }
    diff --git a/models/mip_generator.h b/models/mip_generator.h
    index ff1eb91ded..23d8380b2b 100644
    --- a/models/mip_generator.h
    +++ b/models/mip_generator.h
    @@ -126,8 +126,8 @@ class mip_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -156,8 +156,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -193,14 +193,14 @@ mip_generator::send_test_event( Node& target, size_t 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 2943c45850..9b38070a82 100644
    --- a/models/multimeter.cpp
    +++ b/models/multimeter.cpp
    @@ -105,23 +105,24 @@ 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();
    -  ArrayDatum ad;
    +  d[ names::interval ] = interval_.get_ms();
    +  d[ names::offset ] = offset_.get_ms();
    +
    +  // 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 )
       {
    -    ad.push_back( LiteralDatum( record_from_[ j ] ) );
    +    ad.push_back( record_from_[ j ] );
       }
    -  ( *d )[ names::record_from ] = ad;
    +  d[ names::record_from ] = 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_
    -    and ( d->known( names::interval ) or d->known( names::offset ) or d->known( names::record_from ) ) )
    +  if ( b.has_targets_ and ( d.known( names::interval ) or d.known( names::offset ) or d.known( names::record_from ) ) )
       {
         throw BadProperty(
           "The recording interval, the interval offset and the list of properties "
    @@ -130,7 +131,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, v, node ) )
       {
         if ( Time( Time::ms( v ) ) < Time::get_resolution() )
         {
    @@ -149,7 +150,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, v, node ) )
       {
         // if offset is different from the default value (0), it must be at least
         // as large as the resolution
    @@ -170,17 +171,7 @@ nest::multimeter::Parameters_::set( const DictionaryDatum& d, const Buffers_& b,
         }
       }
     
    -  // extract data
    -  if ( d->known( names::record_from ) )
    -  {
    -    record_from_.clear();
    -
    -    ArrayDatum ad = getValue< ArrayDatum >( d, names::record_from );
    -    for ( Token* t = ad.begin(); t != ad.end(); ++t )
    -    {
    -      record_from_.push_back( Name( getValue< std::string >( *t ) ) );
    -    }
    -  }
    +  d.update_value( names::record_from, record_from_ );
     }
     
     void
    @@ -247,10 +238,9 @@ multimeter::get_type() const
     voltmeter::voltmeter()
       : multimeter()
     {
    -  DictionaryDatum vmdict = DictionaryDatum( new Dictionary );
    -  ArrayDatum ad;
    -  ad.push_back( LiteralDatum( names::V_m.toString() ) );
    -  ( *vmdict )[ names::record_from ] = ad;
    +  dictionary vmdict;
    +  const std::vector< std::string > ad = { names::V_m };
    +  vmdict[ names::record_from ] = ad;
       set_status( vmdict );
     }
     
    diff --git a/models/multimeter.h b/models/multimeter.h
    index 80a3a5991a..4eefbddfcf 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
    @@ -155,7 +151,7 @@ class multimeter : public RecordingDevice
         return false;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -177,8 +173,8 @@ class multimeter : public RecordingDevice
       SignalType sends_signal() const override;
     
       Type get_type() const 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;
     
    @@ -199,15 +195,15 @@ 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_& );
         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 );
       };
     
       // ------------------------------------------------------------
    @@ -233,7 +229,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 );
    @@ -257,11 +253,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 ) and freeze )
    +  if ( d.update_value( names::frozen, freeze ) and freeze )
       {
         throw BadProperty( "multimeter cannot be frozen." );
       }
    diff --git a/models/music_cont_in_proxy.cpp b/models/music_cont_in_proxy.cpp
    index b0301aa8e4..4776296af5 100644
    --- a/models/music_cont_in_proxy.cpp
    +++ b/models/music_cont_in_proxy.cpp
    @@ -24,13 +24,6 @@
     
     #ifdef HAVE_MUSIC
     
    -// 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 "dict_util.h"
    @@ -67,34 +60,34 @@ 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 ] = port_name_;
     }
     
     void
    -nest::music_cont_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s, Node* node )
    +nest::music_cont_in_proxy::Parameters_::set( const dictionary& d, State_& s, Node* node )
     {
    -  if ( d->known( names::port_name ) and s.published_ )
    +  if ( d.known( names::port_name ) and s.published_ )
       {
         throw MUSICPortAlreadyPublished( node->get_name(), port_name_ );
       }
     
       if ( not s.published_ )
       {
    -    updateValue< string >( d, names::port_name, port_name_ );
    +    d.update_value( names::port_name, 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 ] = published_;
    +  d[ names::port_width ] = 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_& )
     {
     }
     
    @@ -165,16 +158,16 @@ nest::music_cont_in_proxy::pre_run_hook()
     }
     
     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 ] = 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_, this ); // throws if BadProperty
    diff --git a/models/music_cont_in_proxy.h b/models/music_cont_in_proxy.h
    index 520df9d488..3b065c25cd 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
     {
    @@ -114,8 +112,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_();
    @@ -136,8 +134,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_&, Node* ); //!< Set values from dictionary
    +    void get( dictionary& ) const;                 //!< Store current values in dictionary
    +    void set( const dictionary&, State_&, Node* ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -150,9 +148,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 a3d57d4f58..ea524f118f 100644
    --- a/models/music_cont_out_proxy.cpp
    +++ b/models/music_cont_out_proxy.cpp
    @@ -31,26 +31,18 @@
     // Includes from nestkernel:
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
    -#include "nest_datums.h"
     #include "nest_impl.h"
     
     // Includes from libnestutil:
     #include "compose.hpp"
     #include "logging.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -
     void
     nest::register_music_cont_out_proxy( const std::string& name )
     {
       register_node_model< music_cont_out_proxy >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and state
      * ----------------------------------------------------------------
    @@ -102,34 +94,34 @@ 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();
    -
    -  ArrayDatum ad_record_from;
    -
    -  for ( size_t j = 0; j < record_from_.size(); ++j )
    -  {
    -    ad_record_from.push_back( LiteralDatum( record_from_[ j ] ) );
    -  }
    -
    -  ( *d )[ names::record_from ] = ad_record_from;
    -  ( *d )[ names::targets ] = new NodeCollectionDatum( targets_ );
    +  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 ] );
    +  ///  }
    +
    +  d[ names::record_from ] = record_from_;
    +  d[ names::targets ] = 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 )
     {
       if ( state.published_ == false )
       {
    -    updateValue< string >( d, names::port_name, port_name_ );
    +    d.update_value( names::port_name, port_name_ );
       }
     
    -  if ( buffers.has_targets_ and ( d->known( names::interval ) or d->known( names::record_from ) ) )
    +  if ( buffers.has_targets_ and ( d.known( names::interval ) || d.known( names::record_from ) ) )
       {
         throw BadProperty(
           "The recording interval and the list of properties to record "
    @@ -137,7 +129,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, v ) )
       {
         if ( Time( Time::ms( v ) ) < Time::get_resolution() )
         {
    @@ -155,19 +147,10 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d,
             "the simulation resolution" );
         }
       }
    -  // extract data
    -  if ( d->known( names::record_from ) )
    -  {
    -    record_from_.clear();
     
    -    ArrayDatum ad = getValue< ArrayDatum >( d, names::record_from );
    -    for ( Token* t = ad.begin(); t != ad.end(); ++t )
    -    {
    -      record_from_.push_back( Name( getValue< std::string >( *t ) ) );
    -    }
    -  }
    +  d.update_value( names::record_from, record_from_ );
     
    -  if ( d->known( names::targets ) )
    +  if ( d.known( names::targets ) )
       {
         if ( record_from_.empty() )
         {
    @@ -176,7 +159,7 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d,
     
         if ( state.published_ == false )
         {
    -      targets_ = getValue< NodeCollectionDatum >( d, names::targets );
    +      targets_ = d.get< NodeCollectionPTR >( names::targets );
         }
         else
         {
    @@ -186,10 +169,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 ] = published_;
    +  d[ names::port_width ] = port_width_;
     }
     
     /* ----------------------------------------------------------------
    @@ -246,7 +229,7 @@ nest::music_cont_out_proxy::pre_run_hook()
         const size_t synmodel_id = kernel().model_manager.get_synapse_model_id( "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 size_t tnode_id = ( *P_.targets_ )[ i ];
    @@ -310,7 +293,7 @@ nest::music_cont_out_proxy::pre_run_hook()
     }
     
     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 );
    @@ -334,7 +317,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 020575c4c5..b5610a9c8e 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
     {
    @@ -151,8 +149,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,25 +178,25 @@ 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( 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 331d195f46..a80740c35f 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"
    @@ -71,30 +64,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 ] = channel_;
    +  d[ names::port_name ] = 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, channel_ );
    +    d.update_value( names::port_name, 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 ] = registered_;
     }
     
     void
    -nest::music_event_in_proxy::State_::set( const DictionaryDatum&, const Parameters_& )
    +nest::music_event_in_proxy::State_::set( const dictionary&, const Parameters_& )
     {
     }
     
    @@ -143,14 +136,14 @@ nest::music_event_in_proxy::pre_run_hook()
     }
     
     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 de120ebdaa..02398dddc1 100644
    --- a/models/music_event_in_proxy.h
    +++ b/models/music_event_in_proxy.h
    @@ -122,8 +122,8 @@ class music_event_in_proxy : public DeviceNode
       void handle( SpikeEvent& );
       size_t send_test_event( Node&, size_t, 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_();
    @@ -144,12 +144,12 @@ class music_event_in_proxy : public DeviceNode
     
         Parameters_(); //!< Sets default parameter values
     
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         /**
          * Set values from dictionary.
          */
    -    void set( const DictionaryDatum&, State_& );
    +    void set( const dictionary&, State_& );
       };
     
       // ------------------------------------------------------------
    @@ -161,9 +161,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 7c30ccd47d..f7a243f186 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"
    @@ -68,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 ] = 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) and s.published_)
    @@ -82,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, 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 ] = published_;
    +  d[ names::port_width ] = 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_& )
     {
     }
     
    @@ -182,23 +175,23 @@ nest::music_event_out_proxy::pre_run_hook()
     }
     
     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 ] = 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::vector< long > pInd_map_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() );
    +    V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long.begin() );
     
    -  ( *d )[ names::index_map ] = IntVectorDatum( pInd_map_long );
    +  d[ names::index_map ] = 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 a3555b9d07..80034c4176 100644
    --- a/models/music_event_out_proxy.h
    +++ b/models/music_event_out_proxy.h
    @@ -128,8 +128,8 @@ class music_event_out_proxy : public DeviceNode
     
       size_t handles_test_event( SpikeEvent&, 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_();
    @@ -150,8 +150,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 dictionary
    +    void get( dictionary& ) const;          //!< Store current values in dictionary
    +    void set( const dictionary&, State_& ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -164,9 +164,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 b0b7aa4f82..38d2a6a210 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"
    @@ -68,31 +63,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 ] = port_name_;
    +  d[ names::acceptable_latency ] = 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, port_name_ );
    +    update_value_param( d, names::acceptable_latency, 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 ] = published_;
    +  d[ names::port_width ] = 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 3e777a1170..07a5e27d50 100644
    --- a/models/music_message_in_proxy.h
    +++ b/models/music_message_in_proxy.h
    @@ -45,9 +45,6 @@
     #include "device_node.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -107,8 +104,8 @@ EndUserDocs */
     
     class MsgHandler : public MUSIC::MessageHandler
     {
    -  ArrayDatum messages;                 //!< The buffer for incoming message
    -  std::vector< double > message_times; //!< The buffer 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 )
    @@ -119,13 +116,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;
    +    dictionary 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
    @@ -159,8 +156,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_();
    @@ -181,12 +178,12 @@ class music_message_in_proxy : public DeviceNode
     
         Parameters_(); //!< Sets default parameter values
     
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         /**
          * Set values from dictionary.
          */
    -    void set( const DictionaryDatum&, State_&, Node* );
    +    void set( const dictionary&, State_&, Node* );
       };
     
       // ------------------------------------------------------------
    @@ -199,9 +196,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* );
       };
     
       // ------------------------------------------------------------
    @@ -227,7 +224,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 );
    @@ -236,7 +233,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
    @@ -245,7 +242,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, nm, this ) )
       {
         if ( nm == 0 )
         {
    diff --git a/models/music_rate_in_proxy.cpp b/models/music_rate_in_proxy.cpp
    index 20f6a23dd9..53b7ebab36 100644
    --- a/models/music_rate_in_proxy.cpp
    +++ b/models/music_rate_in_proxy.cpp
    @@ -24,13 +24,6 @@
     
     #ifdef HAVE_MUSIC
     
    -// 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"
    @@ -67,13 +60,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 ] = 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) and s.registered_)
    @@ -81,19 +74,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, port_name_ );
    +    d.update_value( names::music_channel, 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 ] = registered_;
     }
     
     void
    -nest::music_rate_in_proxy::State_::set( const DictionaryDatum&, const Parameters_& )
    +nest::music_rate_in_proxy::State_::set( const dictionary&, const Parameters_& )
     {
     }
     
    @@ -142,16 +135,16 @@ nest::music_rate_in_proxy::pre_run_hook()
     }
     
     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 ] = 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 7c2a55399e..e13dd1366d 100644
    --- a/models/music_rate_in_proxy.h
    +++ b/models/music_rate_in_proxy.h
    @@ -39,8 +39,6 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
     
     /* BeginUserDocs: device, rate, MUSIC
     
    @@ -131,8 +129,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
    @@ -161,8 +159,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 dictionary
    +    void get( dictionary& ) const;          //!< Store current values in dictionary
    +    void set( const dictionary&, State_& ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -174,9 +172,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 9753421447..ee504ab888 100644
    --- a/models/music_rate_out_proxy.cpp
    +++ b/models/music_rate_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"
    @@ -78,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 ] = 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) and s.published_)
    @@ -92,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, 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 ] = published_;
    +  d[ names::port_width ] = 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_& )
     {
     }
     
    @@ -198,23 +191,23 @@ nest::music_rate_out_proxy::pre_run_hook()
     }
     
     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 ] = 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::vector< long > pInd_map_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() );
    +    V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long.begin() );
     
    -  ( *d )[ names::index_map ] = IntVectorDatum( pInd_map_long );
    +  d[ names::index_map ] = 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 b154b03dda..ebe8db5adb 100644
    --- a/models/music_rate_out_proxy.h
    +++ b/models/music_rate_out_proxy.h
    @@ -127,8 +127,8 @@ class music_rate_out_proxy : public DeviceNode
     
       size_t handles_test_event( InstantaneousRateConnectionEvent&, 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_();
    @@ -149,8 +149,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 dictionary
    +    void get( dictionary& ) const;          //!< Store current values in dictionary
    +    void set( const dictionary&, State_& ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -163,9 +163,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 7bc72369da..d268e8b61a 100644
    --- a/models/noise_generator.cpp
    +++ b/models/noise_generator.cpp
    @@ -34,10 +34,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
     
     namespace nest
     {
    @@ -53,7 +49,7 @@ template <>
     void
     RecordablesMap< noise_generator >::create()
     {
    -  insert_( Name( names::I ), &noise_generator::get_I_avg_ );
    +  insert_( names::I, &noise_generator::get_I_avg_ );
     }
     }
     
    @@ -133,33 +129,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 ] = 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( 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 ] = y_0_;
    +  d[ names::y_1 ] = 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, 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 ( updateValueParam< double >( d, names::dt, dt, node ) )
    +  if ( update_value_param( d, names::dt, dt, node ) )
       {
         dt_ = Time::ms( dt );
       }
    @@ -380,12 +376,12 @@ 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;
    +    d[ names::mean ] = input_param[ 0 ];
    +    d[ names::std ] = input_param[ 1 ];
    +    d[ names::std_mod ] = input_param[ 2 ];
    +    d[ names::frequency ] = input_param[ 3 ];
    +    d[ names::phase ] = input_param[ 4 ];
         ptmp.set( d, *this, this );
       }
     
    diff --git a/models/noise_generator.h b/models/noise_generator.h
    index 8f73511ae3..43a1540d75 100644
    --- a/models/noise_generator.h
    +++ b/models/noise_generator.h
    @@ -177,8 +177,8 @@ class noise_generator : public StimulationDevice
     
       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;
     
       void calibrate_time( const TimeConverter& tc ) override;
     
    @@ -226,9 +226,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 );
     
         Time get_default_dt();
       };
    @@ -244,7 +244,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
       };
     
       // ------------------------------------------------------------
    @@ -313,17 +313,17 @@ noise_generator::handles_test_event( DataLoggingRequest& dlr, size_t receptor_ty
     }
     
     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 ] = 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 6009758f02..0a6bc5a5ec 100644
    --- a/models/parrot_neuron.cpp
    +++ b/models/parrot_neuron.cpp
    @@ -32,8 +32,6 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -79,13 +77,13 @@ 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
     {
       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 b8988522dd..f2e67b7fb0 100644
    --- a/models/parrot_neuron.h
    +++ b/models/parrot_neuron.h
    @@ -105,8 +105,8 @@ class parrot_neuron : public ArchivingNode
       void handle( SpikeEvent& ) override;
       size_t handles_test_event( SpikeEvent&, 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;
    diff --git a/models/parrot_neuron_ps.cpp b/models/parrot_neuron_ps.cpp
    index 18140972a8..7655a32400 100644
    --- a/models/parrot_neuron_ps.cpp
    +++ b/models/parrot_neuron_ps.cpp
    @@ -31,8 +31,6 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -93,13 +91,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 06b3306335..52f5fca554 100644
    --- a/models/parrot_neuron_ps.h
    +++ b/models/parrot_neuron_ps.h
    @@ -102,8 +102,8 @@ class parrot_neuron_ps : public ArchivingNode
       size_t send_test_event( Node&, size_t, synindex, bool ) override;
       size_t handles_test_event( SpikeEvent&, 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
    diff --git a/models/poisson_generator.cpp b/models/poisson_generator.cpp
    index 516a886bca..b2f9e902a3 100644
    --- a/models/poisson_generator.cpp
    +++ b/models/poisson_generator.cpp
    @@ -31,18 +31,12 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     void
     nest::register_poisson_generator( const std::string& name )
     {
       register_node_model< poisson_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameter
      * ---------------------------------------------------------------- */
    @@ -58,15 +52,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 ] = 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, rate_, node );
       if ( rate_ < 0 )
       {
         throw BadProperty( "The rate cannot be negative." );
    @@ -170,8 +164,8 @@ 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;
    +    d[ names::rate ] = input_param[ 0 ];
         ptmp.set( d, this );
       }
     
    diff --git a/models/poisson_generator.h b/models/poisson_generator.h
    index 27f1e1bba2..7980da84a7 100644
    --- a/models/poisson_generator.h
    +++ b/models/poisson_generator.h
    @@ -104,8 +104,8 @@ class poisson_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -129,8 +129,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -166,14 +166,14 @@ poisson_generator::send_test_event( Node& target, size_t 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 7a913d15bc..2b4460a789 100644
    --- a/models/poisson_generator_ps.cpp
    +++ b/models/poisson_generator_ps.cpp
    @@ -34,18 +34,12 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     void
     nest::register_poisson_generator_ps( const std::string& name )
     {
       register_node_model< poisson_generator_ps >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameter
      * ---------------------------------------------------------------- */
    @@ -62,22 +56,22 @@ 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 ] = rate_;
    +  d[ names::dead_time ] = 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, 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, rate_, node );
     
       if ( rate_ < 0.0 )
       {
    @@ -295,9 +289,9 @@ 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;
    +    d[ names::dead_time ] = input_param[ 0 ];
    +    d[ names::rate ] = input_param[ 1 ];
         ptmp.set( d, this );
       }
     
    diff --git a/models/poisson_generator_ps.h b/models/poisson_generator_ps.h
    index 4718c4f055..75fb299bee 100644
    --- a/models/poisson_generator_ps.h
    +++ b/models/poisson_generator_ps.h
    @@ -110,8 +110,8 @@ class poisson_generator_ps : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
     
    @@ -161,8 +161,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -235,21 +235,21 @@ poisson_generator_ps::send_test_event( Node& target, size_t receptor_type, synin
     }
     
     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 ) )
       {
         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 04d58df15f..3f644363a1 100644
    --- a/models/pp_cond_exp_mc_urbanczik.cpp
    +++ b/models/pp_cond_exp_mc_urbanczik.cpp
    @@ -39,32 +39,8 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
    -/* ----------------------------------------------------------------
    - * Compartment name list
    - * ---------------------------------------------------------------- */
    -
    -/* Harold Gutch reported some static destruction problems on OSX 10.4.
    -   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 );
    -
    -/* ----------------------------------------------------------------
    - * Receptor dictionary
    - * ---------------------------------------------------------------- */
    -
    -// leads to seg fault on exit, see #328
    -// DictionaryDatum nest::pp_cond_exp_mc_urbanczik::receptor_dict_ = new
    -// Dictionary();
    -
    -/* ----------------------------------------------------------------
    - * Recordables map
    - * ---------------------------------------------------------------- */
     
    +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_;
     
     namespace nest
    @@ -81,17 +57,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 > );
     }
     }
    @@ -332,63 +308,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 ] = 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;
     
    -  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 ] = 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 )
       {
    -    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 ] = 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 ] ] = 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, 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 );
     
    -  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( 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 ] ) )
    +    if ( d.known( comp_names_[ n ] ) )
         {
    -      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 ] );
    +
    +      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 )
    @@ -411,7 +387,7 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const DictionaryDatum& 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 or urbanczik_params.tau_syn_in[ n ] <= 0 )
    @@ -422,29 +398,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 ] ) );
    +    auto dd = d.get< dictionary >( comp_names_[ n ] );
     
    -    def< double >( dd, names::V_m, y_[ idx( n, V_M ) ] ); // Membrane potential
    +    dd[ names::V_m ] = 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 ] ) )
         {
    -      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 ] );
    +      dd.update_value( names::V_m, y_[ idx( n, V_M ) ] );
         }
       }
     }
    @@ -464,8 +440,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 9a109247bb..645f918f68 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
     {
    @@ -279,8 +276,8 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u
       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;
     
     private:
       void init_buffers_() override;
    @@ -381,8 +378,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 dictionary
    +    void get( dictionary& ) const; //!< Store current values in dictionary
    +    void set( const dictionary& ); //!< Set values from dictionary
       };
     
     
    @@ -424,8 +421,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.
    @@ -528,10 +525,9 @@ 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_;
    +  // Dictionary of receptor types, leads to seg fault on exit, see #328
     
       //! Mapping of recordables names to access functions
       static RecordablesMap< pp_cond_exp_mc_urbanczik > recordablesMap_;
    @@ -613,33 +609,33 @@ pp_cond_exp_mc_urbanczik::handles_test_event( DataLoggingRequest& dlr, size_t re
     }
     
     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 ] = 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 ] = 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 ] = DEND_EXC;
    -  ( *receptor_dict_ )[ names::dendritic_inh ] = DEND_INH;
    -  ( *receptor_dict_ )[ names::dendritic_curr ] = 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_;
    +  d[ names::receptor_types ] = 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_psc_delta.cpp b/models/pp_psc_delta.cpp
    index 482fde1dff..39b5e00ca7 100644
    --- a/models/pp_psc_delta.cpp
    +++ b/models/pp_psc_delta.cpp
    @@ -39,9 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -107,71 +104,68 @@ 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 ] = 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_ );
    -    def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad );
    -
    -    ArrayDatum q_sfa_list_ad( q_sfa_ );
    -    def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad );
    +    d[ names::tau_sfa ] = tau_sfa_;
    +    d[ names::q_sfa ] = q_sfa_;
       }
       else
       {
         if ( tau_sfa_.size() == 0 )
         {
    -      def< double >( d, names::tau_sfa, 0 );
    -      def< double >( d, names::q_sfa, 0 );
    +      d[ names::tau_sfa ] = 0;
    +      d[ names::q_sfa ] = 0;
         }
         else
         {
    -      def< double >( d, names::tau_sfa, tau_sfa_[ 0 ] );
    -      def< double >( d, names::q_sfa, q_sfa_[ 0 ] );
    +      d[ names::tau_sfa ] = tau_sfa_[ 0 ];
    +      d[ names::q_sfa ] = 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, 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
       {
    -    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, tau_sfa_ );
    +    d.update_value( names::q_sfa, 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, 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_ );
       }
    @@ -226,17 +220,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 ] = y3_;  // Membrane potential
    +  d[ names::E_sfa ] = 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, 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 979f9373b3..65eea1cd28 100644
    --- a/models/pp_psc_delta.h
    +++ b/models/pp_psc_delta.h
    @@ -225,8 +225,8 @@ class pp_psc_delta : public ArchivingNode
       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_state_() override;
    @@ -259,7 +259,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_;
    @@ -291,8 +291,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
       };
     
       // ----------------------------------------------------------------
    @@ -316,8 +316,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* );
       };
     
       // ----------------------------------------------------------------
    @@ -436,16 +436,16 @@ pp_psc_delta::handles_test_event( DataLoggingRequest& dlr, size_t 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 ] = 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 32eb092145..d0c7e5f8ef 100644
    --- a/models/ppd_sup_generator.cpp
    +++ b/models/ppd_sup_generator.cpp
    @@ -34,17 +34,12 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "doubledatum.h"
    -
     void
     nest::register_ppd_sup_generator( const std::string& name )
     {
       register_node_model< ppd_sup_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Constructor of age distribution class
      * ---------------------------------------------------------------- */
    @@ -125,32 +120,32 @@ 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 ] = 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 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, 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, 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, n_proc_l, node );
       if ( n_proc_l < 1 )
       {
         throw BadProperty( "The number of component processes cannot be smaller than one" );
    @@ -160,9 +155,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, frequency_, node );
     
    -  updateValueParam< double >( d, names::relative_amplitude, 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]." );
    @@ -307,12 +302,12 @@ 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;
    +    d[ names::dead_time ] = input_param[ 0 ];
    +    d[ names::rate ] = input_param[ 1 ];
    +    d[ names::n_proc ] = input_param[ 2 ];
    +    d[ names::frequency ] = input_param[ 3 ];
    +    d[ names::relative_amplitude ] = input_param[ 4 ];
         ptmp.set( d, this );
       }
     
    diff --git a/models/ppd_sup_generator.h b/models/ppd_sup_generator.h
    index 53f5cd6755..9b8baf64f0 100644
    --- a/models/ppd_sup_generator.h
    +++ b/models/ppd_sup_generator.h
    @@ -126,8 +126,8 @@ class ppd_sup_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -178,8 +178,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 dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    @@ -267,14 +267,14 @@ ppd_sup_generator::send_test_event( Node& target, size_t 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 19b4db16c6..1940df922a 100644
    --- a/models/pulsepacket_generator.cpp
    +++ b/models/pulsepacket_generator.cpp
    @@ -35,18 +35,12 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     void
     nest::register_pulsepacket_generator( const std::string& name )
     {
       register_node_model< pulsepacket_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and variables
      * ---------------------------------------------------------------- */
    @@ -71,20 +65,20 @@ 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 ] = pulse_times_;
    +  d[ names::activity ] = a_;
    +  d[ names::sdev ] = 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, a_, node );
    +  neednewpulse = update_value_param( d, names::sdev, sdev_, node ) or neednewpulse;
       if ( a_ < 0 )
       {
         throw BadProperty( "The activity cannot be negative." );
    @@ -95,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();
    @@ -251,11 +245,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;
    +
    +    d[ names::activity ] = input_param[ 0 ];
    +    d[ names::sdev ] = input_param[ 1 ];
         input_param.erase( input_param.begin(), input_param.begin() + 2 );
    -    ( *d )[ names::pulse_times ] = DoubleVectorDatum( input_param );
    +    d[ names::pulse_times ] = input_param;
         ptmp.set( d, *this, this );
       }
     
    diff --git a/models/pulsepacket_generator.h b/models/pulsepacket_generator.h
    index 535ad34310..464841e9d3 100644
    --- a/models/pulsepacket_generator.h
    +++ b/models/pulsepacket_generator.h
    @@ -114,8 +114,8 @@ class pulsepacket_generator : public StimulationDevice
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -141,14 +141,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 dictionary.
          * @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* );
       };
     
       // ------------------------------------------------------------
    @@ -198,14 +198,14 @@ pulsepacket_generator::send_test_event( Node& target, size_t receptor_type, syni
     }
     
     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 3c866a3674..b57518e786 100644
    --- a/models/quantal_stp_synapse.h
    +++ b/models/quantal_stp_synapse.h
    @@ -143,13 +143,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 6e494313c8..94b0b9aa07 100644
    --- a/models/quantal_stp_synapse_impl.h
    +++ b/models/quantal_stp_synapse_impl.h
    @@ -30,9 +30,6 @@
     #include "connector_model.h"
     #include "nest_names.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -52,52 +49,53 @@ 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 ] = 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_;
     }
     
     
     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_ );
     
    -  updateValue< double >( d, names::dU, U_ );
    +  d.update_value( names::weight, weight_ );
    +
    +  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_ );
    +  d.update_integer_value( names::n, n_ );
    +  d.update_integer_value( names::a, a_ );
    +
       if ( U_ > 1.0 or U_ < 0.0 )
       {
         throw BadProperty( "'U' must be in [0,1]." );
       }
     
    -  updateValue< double >( d, names::u, u_ );
       if ( u_ > 1.0 or u_ < 0.0 )
       {
         throw BadProperty( "'u' must be in [0,1]." );
       }
     
    -  updateValue< double >( d, names::tau_rec, tau_rec_ );
       if ( tau_rec_ <= 0.0 )
       {
         throw BadProperty( "'tau_rec' must be > 0." );
       }
     
    -  updateValue< double >( d, names::tau_fac, tau_fac_ );
       if ( tau_fac_ < 0.0 )
       {
         throw BadProperty( "'tau_fac' must be >= 0." );
       }
    -
    -  updateValue< long >( d, names::n, n_ );
    -  updateValue< long >( d, names::a, a_ );
     }
     
     } // of namespace nest
    diff --git a/models/rate_connection_delayed.h b/models/rate_connection_delayed.h
    index 81c3f3ea40..6ac04bf723 100644
    --- a/models/rate_connection_delayed.h
    +++ b/models/rate_connection_delayed.h
    @@ -139,9 +139,9 @@ class rate_connection_delayed : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -158,19 +158,19 @@ constexpr ConnectionModelProperties rate_connection_delayed< targetidentifierT >
     
     template < typename targetidentifierT >
     void
    -rate_connection_delayed< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +rate_connection_delayed< 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
    -rate_connection_delayed< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +rate_connection_delayed< 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/rate_connection_instantaneous.h b/models/rate_connection_instantaneous.h
    index 4d32e41cc0..c3316a7998 100644
    --- a/models/rate_connection_instantaneous.h
    +++ b/models/rate_connection_instantaneous.h
    @@ -138,9 +138,9 @@ class rate_connection_instantaneous : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -151,9 +151,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:
    @@ -165,27 +163,25 @@ constexpr ConnectionModelProperties rate_connection_instantaneous< targetidentif
     
     template < typename targetidentifierT >
     void
    -rate_connection_instantaneous< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +rate_connection_instantaneous< 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
    -rate_connection_instantaneous< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +rate_connection_instantaneous< 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 ) )
       {
    -    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 );
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     }
     
     template < typename targetidentifierT >
    diff --git a/models/rate_neuron_ipn.h b/models/rate_neuron_ipn.h
    index 14c22920ac..ca1c629013 100644
    --- a/models/rate_neuron_ipn.h
    +++ b/models/rate_neuron_ipn.h
    @@ -144,8 +144,8 @@ class rate_neuron_ipn : public ArchivingNode
       {
       }
     
    -  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;
    @@ -205,9 +205,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -222,14 +222,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -353,19 +353,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 ] = 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 286c22c0af..94c7c38e8c 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
     {
    @@ -89,37 +84,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 ] = 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)
    -  def< double >( d, names::std, sigma_ );
    -  def< double >( d, names::mean, mu_ );
    +  d[ names::std ] = sigma_;
    +  d[ names::mean ] = 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, 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 ( updateValueParam< double >( d, names::mean, mu_, node ) )
    +  if ( update_value_param( d, names::mean, mu_, node ) )
       {
         LOG( M_WARNING,
           "rate_neuron_ipn< TNonlinearities >::Parameters_::set",
    @@ -127,7 +122,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, sigma_, node ) )
       {
         LOG( M_WARNING,
           "rate_neuron_ipn< TNonlinearities >::Parameters_::set",
    @@ -156,17 +151,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 ] = rate_;   // Rate
    +  d[ names::noise ] = 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, rate_, node ); // Rate
     }
     
     template < class TNonlinearities >
    diff --git a/models/rate_neuron_opn.h b/models/rate_neuron_opn.h
    index 1d4232c111..96e81e5c43 100644
    --- a/models/rate_neuron_opn.h
    +++ b/models/rate_neuron_opn.h
    @@ -147,8 +147,8 @@ class rate_neuron_opn : public ArchivingNode
       {
       }
     
    -  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;
    @@ -195,9 +195,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -213,14 +213,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -351,19 +351,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 ] = 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 2479fe8c23..fa5d29ec61 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
     {
    @@ -87,31 +82,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 ] = 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)
    -  def< double >( d, names::std, sigma_ );
    -  def< double >( d, names::mean, mu_ );
    +  d[ names::std ] = sigma_;
    +  d[ names::mean ] = 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, 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 ( updateValueParam< double >( d, names::mean, mu_, node ) )
    +  if ( update_value_param( d, names::mean, mu_, node ) )
       {
         LOG( M_WARNING,
           "rate_neuron_opn< TNonlinearities >::Parameters_::set",
    @@ -119,7 +114,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, sigma_, node ) )
       {
         LOG( M_WARNING,
           "rate_neuron_opn< TNonlinearities >::Parameters_::set",
    @@ -140,18 +135,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 ] = 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 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, rate_, node ); // Rate
     }
     
     template < class TNonlinearities >
    diff --git a/models/rate_transformer_node.h b/models/rate_transformer_node.h
    index 50383f18f7..7ae6b3ede3 100644
    --- a/models/rate_transformer_node.h
    +++ b/models/rate_transformer_node.h
    @@ -140,8 +140,8 @@ class rate_transformer_node : public ArchivingNode
       }
     
     
    -  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;
    @@ -173,9 +173,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -189,14 +189,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -295,19 +295,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 ] = 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 2809b97130..be2e37c445 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
     {
    @@ -81,30 +76,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 ] = 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, 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 ] = 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, rate_, node ); // Rate
     }
     
     template < class TNonlinearities >
    diff --git a/models/sic_connection.h b/models/sic_connection.h
    index 0cf806c2ac..403814cca9 100644
    --- a/models/sic_connection.h
    +++ b/models/sic_connection.h
    @@ -124,9 +124,9 @@ class sic_connection : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -143,14 +143,14 @@ constexpr ConnectionModelProperties sic_connection< targetidentifierT >::propert
     
     template < typename targetidentifierT >
     void
    -sic_connection< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +sic_connection< 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 ] = weight_;
    +  d[ names::size_of ] = sizeof( *this );
     }
     
     template < typename targetidentifierT >
    @@ -162,10 +162,10 @@ sic_connection< targetidentifierT >::get_secondary_event()
     
     template < typename targetidentifierT >
     void
    -sic_connection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +sic_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_ );
     }
     
     } // namespace
    diff --git a/models/siegert_neuron.cpp b/models/siegert_neuron.cpp
    index ec39ab5cec..8ad2489a9b 100644
    --- a/models/siegert_neuron.cpp
    +++ b/models/siegert_neuron.cpp
    @@ -39,9 +39,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     struct my_params
     {
    @@ -110,27 +107,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 ] = 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 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, 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,15 +156,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 ] = 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, r_, node ); // Rate
     }
     
     nest::siegert_neuron::Buffers_::Buffers_( siegert_neuron& n )
    diff --git a/models/siegert_neuron.h b/models/siegert_neuron.h
    index a96fce211f..ec5bf08338 100644
    --- a/models/siegert_neuron.h
    +++ b/models/siegert_neuron.h
    @@ -172,8 +172,8 @@ class siegert_neuron : public ArchivingNode
       {
       }
     
    -  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;
    @@ -224,9 +224,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -240,8 +240,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 );
       };
     
       // ----------------------------------------------------------------
    @@ -338,16 +338,16 @@ siegert_neuron::handles_test_event( DataLoggingRequest& dlr, size_t receptor_typ
     }
     
     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 ] = 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 b50e5b5867..c01de7e137 100644
    --- a/models/sigmoid_rate.cpp
    +++ b/models/sigmoid_rate.cpp
    @@ -43,19 +43,19 @@ register_rate_transformer_sigmoid( const std::string& name )
     
     
     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 ] = g_;
    +  d[ names::beta ] = beta_;
    +  d[ names::theta ] = 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, g_, node );
    +  update_value_param( d, names::beta, beta_, node );
    +  update_value_param( d, names::theta, theta_, node );
     }
     
     /*
    diff --git a/models/sigmoid_rate.h b/models/sigmoid_rate.h
    index 634ce53f9f..c8f7daf538 100644
    --- a/models/sigmoid_rate.h
    +++ b/models/sigmoid_rate.h
    @@ -148,8 +148,8 @@ class nonlinearities_sigmoid_rate
       {
       }
     
    -  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
     
       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 2fcea61a4a..806551a9d1 100644
    --- a/models/sigmoid_rate_gg_1998.cpp
    +++ b/models/sigmoid_rate_gg_1998.cpp
    @@ -43,15 +43,15 @@ register_rate_transformer_sigmoid_gg_1998( const std::string& name )
     
     
     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 ] = 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, g_, node );
     }
     
     /*
    diff --git a/models/sigmoid_rate_gg_1998.h b/models/sigmoid_rate_gg_1998.h
    index 6039d9692b..35d9a68ab3 100644
    --- a/models/sigmoid_rate_gg_1998.h
    +++ b/models/sigmoid_rate_gg_1998.h
    @@ -143,8 +143,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 dictionary
    +  void get( dictionary& ) const;             //!< Store current values in dictionary
    +  void set( const dictionary&, Node* 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/sinusoidal_gamma_generator.cpp b/models/sinusoidal_gamma_generator.cpp
    index 30c49fe411..4caea6859f 100644
    --- a/models/sinusoidal_gamma_generator.cpp
    +++ b/models/sinusoidal_gamma_generator.cpp
    @@ -41,11 +41,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
     
     namespace nest
     {
    @@ -136,29 +131,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 ] = 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
    -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() and d->known( names::individual_spike_trains ) )
    +  if ( not n.is_model_prototype() and 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 ( updateValue< bool >( d, names::individual_spike_trains, 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_ )
    @@ -173,17 +168,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, om_, node ) )
       {
         om_ *= 2.0 * numerics::pi / 1000.0;
       }
     
    -  if ( updateValueParam< double >( d, names::phase, phi_, node ) )
    +  if ( update_value_param( d, names::phase, phi_, node ) )
       {
         phi_ *= numerics::pi / 180.0;
       }
     
    -  if ( updateValueParam< double >( d, names::order, order_, node ) )
    +  if ( update_value_param( d, names::order, order_, node ) )
       {
         if ( order_ < 1.0 )
         {
    @@ -195,13 +190,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, 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, ac_unscaled, node ) )
       {
         amplitude_ = 1e-3 * ac_unscaled; // scale to 1/ms
       }
    @@ -386,13 +381,13 @@ 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;
    +    d[ names::frequency ] = input_param[ 0 ];
    +    d[ names::phase ] = input_param[ 1 ];
    +    d[ names::order ] = input_param[ 2 ];
    +    d[ names::rate ] = input_param[ 3 ];
    +    d[ names::amplitude ] = input_param[ 4 ];
    +    d[ names::individual_spike_trains ] = input_param[ 5 ];
         ptmp.set( d, *this, this );
       }
     
    diff --git a/models/sinusoidal_gamma_generator.h b/models/sinusoidal_gamma_generator.h
    index 2a570caa6b..49f3e251ea 100644
    --- a/models/sinusoidal_gamma_generator.h
    +++ b/models/sinusoidal_gamma_generator.h
    @@ -218,8 +218,8 @@ class sinusoidal_gamma_generator : public StimulationDevice
     
       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;
     
       //! Model can be switched between proxies (single spike train) and not
       bool has_proxies() const override;
    @@ -273,14 +273,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_
    @@ -405,15 +405,15 @@ sinusoidal_gamma_generator::handles_test_event( DataLoggingRequest& dlr, size_t
     }
     
     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 ] = 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 6a24cfae5f..5576591c0d 100644
    --- a/models/sinusoidal_poisson_generator.cpp
    +++ b/models/sinusoidal_poisson_generator.cpp
    @@ -37,11 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
     
     namespace nest
     {
    @@ -57,7 +52,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_ );
     }
     }
     
    @@ -124,52 +119,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 ] = 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( 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 ] = y_0_;
    +  d[ names::y_1 ] = 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() and d->known( names::individual_spike_trains ) )
    +  if ( not n.is_model_prototype() and 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." );
       }
     
    -  updateValue< bool >( d, names::individual_spike_trains, individual_spike_trains_ );
    +  d.update_value( names::individual_spike_trains, individual_spike_trains_ );
     
    -  if ( updateValueParam< double >( d, names::rate, rate_, node ) )
    +  if ( update_value_param( d, names::rate, rate_, node ) )
       {
         rate_ /= 1000.0; // scale to ms^-1
       }
     
    -  if ( updateValueParam< double >( d, names::frequency, om_, node ) )
    +  if ( update_value_param( d, names::frequency, om_, node ) )
       {
         om_ *= 2.0 * numerics::pi / 1000.0;
       }
     
    -  if ( updateValueParam< double >( d, names::phase, phi_, node ) )
    +  if ( update_value_param( d, names::phase, phi_, node ) )
       {
         phi_ *= numerics::pi / 180.0;
       }
     
    -  if ( updateValueParam< double >( d, names::amplitude, amplitude_, node ) )
    +  if ( update_value_param( d, names::amplitude, amplitude_, node ) )
       {
         amplitude_ /= 1000.0;
       }
    @@ -323,12 +318,12 @@ 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;
    +    d[ names::rate ] = input_param[ 0 ];
    +    d[ names::frequency ] = input_param[ 1 ];
    +    d[ names::phase ] = input_param[ 2 ];
    +    d[ names::amplitude ] = input_param[ 3 ];
    +    d[ names::individual_spike_trains ] = input_param[ 4 ];
         ptmp.set( d, *this, this );
       }
     
    diff --git a/models/sinusoidal_poisson_generator.h b/models/sinusoidal_poisson_generator.h
    index ebf231901e..b8276a94e3 100644
    --- a/models/sinusoidal_poisson_generator.h
    +++ b/models/sinusoidal_poisson_generator.h
    @@ -151,8 +151,8 @@ class sinusoidal_poisson_generator : public StimulationDevice
     
       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;
     
       //! Model can be switched between proxies (single spike train) and not
       bool
    @@ -168,7 +168,7 @@ class sinusoidal_poisson_generator : public StimulationDevice
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::stimulator;
    @@ -211,14 +211,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_
    @@ -231,7 +231,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
       };
     
       // ------------------------------------------------------------
    @@ -311,16 +311,16 @@ sinusoidal_poisson_generator::handles_test_event( DataLoggingRequest& dlr, size_
     }
     
     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 ] = 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 b4d105a70d..15f02d2f66 100644
    --- a/models/spike_dilutor.cpp
    +++ b/models/spike_dilutor.cpp
    @@ -32,9 +32,6 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     void
     nest::register_spike_dilutor( const std::string& name )
    @@ -57,15 +54,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 ] = 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, p_copy_, node );
       if ( p_copy_ < 0 or 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 f2795705f1..4075ffa6b7 100644
    --- a/models/spike_dilutor.h
    +++ b/models/spike_dilutor.h
    @@ -105,7 +105,7 @@ class spike_dilutor : public DeviceNode
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::stimulator;
    @@ -119,8 +119,8 @@ class spike_dilutor : public DeviceNode
       size_t handles_test_event( SpikeEvent&, size_t ) 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;
    @@ -144,8 +144,8 @@ class spike_dilutor : public DeviceNode
         Parameters_( const Parameters_& ) = default;
         Parameters_& operator=( const Parameters_& ) = default;
     
    -    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
       };
     
       struct Buffers_
    @@ -189,14 +189,14 @@ spike_dilutor::handles_test_event( SpikeEvent&, size_t 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 c6153ede4c..049950ce22 100644
    --- a/models/spike_generator.cpp
    +++ b/models/spike_generator.cpp
    @@ -31,11 +31,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
     
     void
     nest::register_spike_generator( const std::string& name )
    @@ -43,7 +38,6 @@ nest::register_spike_generator( const std::string& name )
       register_node_model< spike_generator >( name );
     }
     
    -
     /* ----------------------------------------------------------------
      * Default constructor defining default parameters
      * ---------------------------------------------------------------- */
    @@ -65,27 +59,26 @@ nest::spike_generator::Parameters_::Parameters_()
      * ---------------------------------------------------------------- */
     
     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();
    -  auto* times_ms = new std::vector< double >();
    -  times_ms->reserve( n_spikes );
    +  std::vector< double > times_ms( n_spikes );
     
       for ( size_t n = 0; n < n_spikes; ++n )
       {
    -    times_ms->push_back( spike_stamps_[ n ].get_ms() );
    +    times_ms[ n ] = spike_stamps_[ n ].get_ms();
         if ( precise_times_ )
         {
    -      ( *times_ms )[ n ] -= spike_offsets_[ n ];
    +      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 ] = times_ms;
    +  d[ names::spike_weights ] = spike_weights_;
    +  d[ names::spike_multiplicities ] = spike_multiplicities_;
    +  d[ names::precise_times ] = precise_times_;
    +  d[ names::allow_offgrid_times ] = allow_offgrid_times_;
    +  d[ names::shift_now_spikes ] = shift_now_spikes_;
     }
     
     void
    @@ -129,10 +122,10 @@ nest::spike_generator::Parameters_::assert_valid_spike_time_and_insert_( double
           t_spike.advance();
         }
       }
    -  // t_spike is now the correct time stamp given the chosen options
    -
    -  // when we get here, we know that the spike time is valid
    +  // 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
    @@ -154,16 +147,15 @@ 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 allow_offgrid_times_changed =
    -    updateValueParam< bool >( d, names::allow_offgrid_times, 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_ and ( allow_offgrid_times_ or shift_now_spikes_ ) )
       {
    @@ -172,7 +164,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 );
       if ( flags_changed and not( updated_spike_times or spike_stamps_.empty() ) )
       {
         throw BadProperty(
    @@ -182,7 +174,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 );
         const size_t n_spikes = d_times.size();
         spike_stamps_.clear();
         spike_stamps_.reserve( n_spikes );
    @@ -216,10 +208,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 );
       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 );
     
         if ( spike_weights.empty() )
         {
    @@ -240,11 +232,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 );
       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 );
     
         if ( spike_multiplicities.empty() )
         {
    @@ -264,7 +255,7 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d,
       }
     
       // Set position to start if something changed
    -  if ( updated_spike_times or updated_spike_weights or updated_spike_multiplicities or d->known( names::origin ) )
    +  if ( updated_spike_times or updated_spike_weights or updated_spike_multiplicities or d.known( names::origin ) )
       {
         s.position_ = 0;
       }
    @@ -423,7 +414,7 @@ nest::spike_generator::set_data_from_stimulation_backend( std::vector< double >&
       if ( not input_spikes.empty() )
       {
     
    -    DictionaryDatum d = DictionaryDatum( new Dictionary );
    +    dictionary d;
         std::vector< double > times_ms;
         const size_t n_spikes = P_.spike_stamps_.size();
         times_ms.reserve( n_spikes + input_spikes.size() );
    @@ -432,7 +423,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 ] = 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 a7f5ce41c8..f3b8633e66 100644
    --- a/models/spike_generator.h
    +++ b/models/spike_generator.h
    @@ -243,8 +243,8 @@ class spike_generator : public StimulationDevice
       spike_generator( const spike_generator& );
     
       size_t send_test_event( Node&, size_t, 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;
    @@ -308,7 +308,7 @@ class spike_generator : public StimulationDevice
         Parameters_( const Parameters_& ) = default;
         Parameters_& operator=( const Parameters_& ) = default;
     
    -    void get( DictionaryDatum& ) const; //!< Store current values in dictionary
    +    void get( dictionary& ) const; //!< Store current values in dictionary
     
         /**
          * Set values from dictionary.
    @@ -316,7 +316,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.
    @@ -354,14 +354,14 @@ spike_generator::send_test_event( Node& target, size_t receptor_type, synindex s
     }
     
     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
     
    @@ -369,7 +369,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, v ) )
       {
         origin = Time::ms( v );
       }
    diff --git a/models/spike_recorder.cpp b/models/spike_recorder.cpp
    index 5769fa60e7..fb315ae670 100644
    --- a/models/spike_recorder.cpp
    +++ b/models/spike_recorder.cpp
    @@ -32,9 +32,6 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     void
     nest::register_spike_recorder( const std::string& name )
    @@ -72,7 +69,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 );
     
    @@ -94,7 +91,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 91c2b7e1b7..4ecc09f64b 100644
    --- a/models/spike_recorder.h
    +++ b/models/spike_recorder.h
    @@ -105,7 +105,7 @@ class spike_recorder : public RecordingDevice
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -127,8 +127,8 @@ class spike_recorder : public RecordingDevice
       Type get_type() const override;
       SignalType receives_signal() const 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 pre_run_hook() override;
    diff --git a/models/spike_train_injector.cpp b/models/spike_train_injector.cpp
    index 9d596a8e5a..76d876f2d1 100644
    --- a/models/spike_train_injector.cpp
    +++ b/models/spike_train_injector.cpp
    @@ -32,12 +32,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     namespace nest
     {
     void
    @@ -67,26 +61,25 @@ spike_train_injector::Parameters_::Parameters_()
      * ---------------------------------------------------------------- */
     
     void
    -spike_train_injector::Parameters_::get( DictionaryDatum& d ) const
    +spike_train_injector::Parameters_::get( dictionary& d ) const
     {
       const size_t n_spikes = spike_stamps_.size();
    -  auto* times_ms = new std::vector< double >();
    -  times_ms->reserve( n_spikes );
    +  std::vector< double > times_ms( n_spikes );
     
       for ( size_t n = 0; n < n_spikes; ++n )
       {
    -    times_ms->push_back( spike_stamps_[ n ].get_ms() );
    +    times_ms[ n ] = spike_stamps_[ n ].get_ms();
         if ( precise_times_ )
         {
    -      ( *times_ms )[ n ] -= spike_offsets_[ n ];
    +      times_ms[ n ] -= spike_offsets_[ n ];
         }
       }
     
    -  ( *d )[ names::spike_times ] = DoubleVectorDatum( times_ms );
    -  ( *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 ] = times_ms;
    +  d[ names::spike_multiplicities ] = spike_multiplicities_;
    +  d[ names::precise_times ] = precise_times_;
    +  d[ names::allow_offgrid_times ] = allow_offgrid_times_;
    +  d[ names::shift_now_spikes ] = shift_now_spikes_;
     }
     
     void
    @@ -155,17 +148,17 @@ spike_train_injector::Parameters_::assert_valid_spike_time_and_insert_( double t
     }
     
     void
    -spike_train_injector::Parameters_::set( const DictionaryDatum& d,
    +spike_train_injector::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 allow_offgrid_times_changed =
    -    updateValueParam< bool >( 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(
    @@ -173,7 +166,7 @@ spike_train_injector::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 );
       if ( flags_changed and not( updated_spike_times or spike_stamps_.empty() ) )
       {
         throw BadProperty(
    @@ -183,7 +176,7 @@ spike_train_injector::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 );
         const size_t n_spikes = d_times.size();
         spike_stamps_.clear();
         spike_stamps_.reserve( n_spikes );
    @@ -217,11 +210,10 @@ spike_train_injector::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 );
       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 );
     
         if ( spike_multiplicities.empty() )
         {
    @@ -241,7 +233,7 @@ spike_train_injector::Parameters_::set( const DictionaryDatum& d,
       }
     
       // Set position to start if something changed
    -  if ( updated_spike_times or updated_spike_multiplicities or d->known( names::origin ) )
    +  if ( updated_spike_times or updated_spike_multiplicities or d.known( names::origin ) )
       {
         s.position_ = 0;
       }
    @@ -386,4 +378,4 @@ spike_train_injector::update( Time const& sliceT0, const long from, const long t
       }
     }
     
    -} // namespace
    +} // namespace nest
    diff --git a/models/spike_train_injector.h b/models/spike_train_injector.h
    index 8d82529c1a..f3419b935b 100644
    --- a/models/spike_train_injector.h
    +++ b/models/spike_train_injector.h
    @@ -250,8 +250,8 @@ class spike_train_injector : public Node, public Device
       spike_train_injector( const spike_train_injector& );
     
       size_t send_test_event( Node&, size_t, 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;
       bool is_active( const Time& ) const override;
     
       bool
    @@ -305,7 +305,7 @@ class spike_train_injector : public Node, public Device
         Parameters_( const Parameters_& ) = default;
         Parameters_& operator=( const Parameters_& ) = default;
     
    -    void get( DictionaryDatum& ) const; //!< Store current values in dictionary
    +    void get( dictionary& ) const; //!< Store current values in dictionary
     
         /**
          * Set values from dictionary.
    @@ -313,7 +313,7 @@ class spike_train_injector : public Node, public Device
          *       spike_times_ 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.
    @@ -340,7 +340,7 @@ spike_train_injector::send_test_event( Node& target, size_t receptor_type, synin
     
     
     inline void
    -spike_train_injector::get_status( DictionaryDatum& d ) const
    +spike_train_injector::get_status( dictionary& d ) const
     {
       P_.get( d );
       Device::get_status( d );
    @@ -348,7 +348,7 @@ spike_train_injector::get_status( DictionaryDatum& d ) const
     
     
     inline void
    -spike_train_injector::set_status( const DictionaryDatum& d )
    +spike_train_injector::set_status( const dictionary& d )
     {
       Parameters_ ptmp = P_; // temporary copy in case of errors
     
    @@ -356,7 +356,7 @@ spike_train_injector::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, v ) )
       {
         origin = Time::ms( v );
       }
    @@ -378,4 +378,5 @@ spike_train_injector::set_status( const DictionaryDatum& d )
     }
     
     } // namespace
    +
     #endif // SPIKE_TRAIN_INJECTOR_H
    diff --git a/models/spin_detector.cpp b/models/spin_detector.cpp
    index 190ece15cb..43b31d398f 100644
    --- a/models/spin_detector.cpp
    +++ b/models/spin_detector.cpp
    @@ -32,9 +32,6 @@
     #include "model_manager_impl.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     void
     nest::register_spin_detector( const std::string& name )
    @@ -84,7 +81,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 );
    @@ -108,7 +105,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 2cb2ef1775..a7d9b04b65 100644
    --- a/models/spin_detector.h
    +++ b/models/spin_detector.h
    @@ -117,7 +117,7 @@ class spin_detector : public RecordingDevice
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -139,8 +139,8 @@ class spin_detector : public RecordingDevice
       Type get_type() const override;
       SignalType receives_signal() const 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;
     
    diff --git a/models/static_synapse.h b/models/static_synapse.h
    index 25ebf2ce61..400c146387 100644
    --- a/models/static_synapse.h
    +++ b/models/static_synapse.h
    @@ -168,9 +168,9 @@ class static_synapse : public Connection< targetidentifierT >
         return true;
       }
     
    -  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 )
    @@ -184,20 +184,20 @@ constexpr ConnectionModelProperties static_synapse< targetidentifierT >::propert
     
     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 ] = weight_;
    +  d[ names::size_of ] = 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, weight_ );
     }
     
     } // namespace
    diff --git a/models/static_synapse_hom_w.h b/models/static_synapse_hom_w.h
    index f6ea22c3df..3f1947cbfc 100644
    --- a/models/static_synapse_hom_w.h
    +++ b/models/static_synapse_hom_w.h
    @@ -137,7 +137,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, size_t receptor_type, const CommonPropertiesType& )
    @@ -150,9 +150,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 ) )
         {
           throw BadProperty(
             "Weight cannot be specified since it needs to be equal "
    @@ -193,10 +193,10 @@ constexpr ConnectionModelProperties static_synapse_hom_w< targetidentifierT >::p
     
     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 ] = sizeof( *this );
     }
     
     } // namespace
    diff --git a/models/stdp_dopamine_synapse.cpp b/models/stdp_dopamine_synapse.cpp
    index 1a7ba75eca..6631126096 100644
    --- a/models/stdp_dopamine_synapse.cpp
    +++ b/models/stdp_dopamine_synapse.cpp
    @@ -29,8 +29,6 @@
     #include "kernel_manager.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     void
     nest::register_stdp_dopamine_synapse( const std::string& name )
    @@ -59,38 +57,36 @@ STDPDopaCommonProperties::STDPDopaCommonProperties()
     }
     
     void
    -STDPDopaCommonProperties::get_status( DictionaryDatum& d ) const
    +STDPDopaCommonProperties::get_status( dictionary& d ) const
     {
       CommonSynapseProperties::get_status( d );
     
    -  const NodeCollectionDatum vt = NodeCollectionDatum( NodeCollection::create( volume_transmitter_ ) );
    -  def< NodeCollectionDatum >( d, names::volume_transmitter, vt );
    -
    -  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_minus ] = A_minus_;
    +  d[ names::A_plus ] = A_plus_;
    +  d[ names::Wmax ] = Wmax_;
    +  d[ names::Wmin ] = Wmin_;
    +  d[ names::b ] = b_;
    +  d[ names::tau_c ] = tau_c_;
    +  d[ names::tau_n ] = tau_n_;
    +  d[ names::tau_plus ] = tau_plus_;
    +  d[ names::volume_transmitter ] = NodeCollection::create( volume_transmitter_ );
     }
     
     void
    -STDPDopaCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +STDPDopaCommonProperties::set_status( const dictionary& d, ConnectorModel& cm )
     {
       CommonSynapseProperties::set_status( d, cm );
     
    -  NodeCollectionDatum vt_datum;
    -  if ( updateValue< NodeCollectionDatum >( d, names::volume_transmitter, vt_datum ) )
    +  NodeCollectionPTR vt_nc;
    +  if ( d.update_value( names::volume_transmitter, vt_nc ) )
       {
    -    if ( vt_datum->size() != 1 )
    +    if ( vt_nc->size() != 1 )
         {
           throw BadProperty( "Property volume_transmitter must be a single element NodeCollection" );
         }
     
         const size_t tid = kernel().vp_manager.get_thread_id();
    -    Node* vt_node = kernel().node_manager.get_node_or_proxy( ( *vt_datum )[ 0 ], tid );
    +    Node* vt_node = kernel().node_manager.get_node_or_proxy( ( *vt_nc )[ 0 ], tid );
         volume_transmitter* vt = dynamic_cast< volume_transmitter* >( vt_node );
         if ( not vt )
         {
    @@ -100,14 +96,14 @@ STDPDopaCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel&
         volume_transmitter_ = vt;
       }
     
    -  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_minus, A_minus_ );
    +  d.update_value( names::A_plus, A_plus_ );
    +  d.update_value( names::Wmax, Wmax_ );
    +  d.update_value( names::Wmin, Wmin_ );
    +  d.update_value( names::b, b_ );
    +  d.update_value( names::tau_c, tau_c_ );
    +  d.update_value( names::tau_n, tau_n_ );
    +  d.update_value( names::tau_plus, tau_plus_ );
     }
     
     } // of namespace nest
    diff --git a/models/stdp_dopamine_synapse.h b/models/stdp_dopamine_synapse.h
    index 118c0054ff..43c23e40e2 100644
    --- a/models/stdp_dopamine_synapse.h
    +++ b/models/stdp_dopamine_synapse.h
    @@ -153,12 +153,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 );
     
       long get_vt_node_id() const;
     
    @@ -229,12 +229,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.
    @@ -243,7 +243,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.
    @@ -358,31 +358,31 @@ 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 ] = weight_;
     
       // own properties, different for individual synapse
    -  def< double >( d, names::Kplus, Kplus_ );
    -  def< double >( d, names::c, c_ );
    -  def< double >( d, names::n, n_ );
    +  d[ names::Kplus ] = Kplus_;
    +  d[ names::c ] = c_;
    +  d[ names::n ] = 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, weight_ );
     
    -  updateValue< double >( d, names::Kplus, Kplus_ );
    -  updateValue< double >( d, names::c, c_ );
    -  updateValue< double >( d, names::n, n_ );
    +  d.update_value( names::c, c_ );
    +  d.update_value( names::n, n_ );
     
    +  d.update_value( names::Kplus, Kplus_ );
       if ( Kplus_ < 0 )
       {
         throw BadProperty( "Kplus must be non-negative." );
    @@ -391,19 +391,19 @@ stdp_dopamine_synapse< targetidentifierT >::set_status( const DictionaryDatum& d
     
     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
     {
       // 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 ) )
         {
           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 ) )
         {
           throw NotImplemented(
             "For multi-threading Connect doesn't support the setting "
    diff --git a/models/stdp_facetshw_synapse_hom.h b/models/stdp_facetshw_synapse_hom.h
    index 2b103eed48..1f38d41b36 100644
    --- a/models/stdp_facetshw_synapse_hom.h
    +++ b/models/stdp_facetshw_synapse_hom.h
    @@ -187,12 +187,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
    @@ -221,9 +221,7 @@ class STDPFACETSHWHomCommonProperties : public CommonSynapseProperties
       // TODO: TP: size in memory could be reduced
       std::vector< long > lookuptable_0_;
       std::vector< long > lookuptable_1_;
    -  std::vector< long > lookuptable_2_; // TODO: TP: to save memory one could
    -                                      // introduce vector<bool> &
    -                                      // BoolVectorDatum
    +  std::vector< long > lookuptable_2_;
       std::vector< long > configbit_0_;
       std::vector< long > configbit_1_;
       std::vector< long > reset_pattern_;
    @@ -271,12 +269,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_facetshw_synapse_hom_impl.h b/models/stdp_facetshw_synapse_hom_impl.h
    index 765b814715..7b8e52db3f 100644
    --- a/models/stdp_facetshw_synapse_hom_impl.h
    +++ b/models/stdp_facetshw_synapse_hom_impl.h
    @@ -30,9 +30,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     namespace nest
     {
     //
    @@ -127,61 +124,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 ] = 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 ] = lookuptable_0_;
    +  d[ names::lookuptable_1 ] = lookuptable_1_;
    +  d[ names::lookuptable_2 ] = lookuptable_2_;
    +  d[ names::configbit_0 ] = configbit_0_;
    +  d[ names::configbit_1 ] = configbit_1_;
    +  d[ names::reset_pattern ] = 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, 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 ...
    -  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, 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 ( updateValue< long >( d, names::synapses_per_driver, synapses_per_driver_ ) )
    +  if ( d.update_value( names::synapses_per_driver, 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, driver_readout_time_ ) )
       {
         calc_readout_cycle_duration_();
       }
     
    -  if ( d->known( names::lookuptable_0 ) )
    +  if ( d.known( names::lookuptable_0 ) )
       {
    -    updateValue< std::vector< long > >( d, names::lookuptable_0, lookuptable_0_ );
    +    d.update_value( names::lookuptable_0, lookuptable_0_ );
     
         // right size?
         if ( lookuptable_0_.size() != lookuptable_1_.size() )
    @@ -198,9 +195,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona
           }
         }
       }
    -  if ( d->known( names::lookuptable_1 ) )
    +  if ( d.known( names::lookuptable_1 ) )
       {
    -    updateValue< std::vector< long > >( d, names::lookuptable_1, lookuptable_1_ );
    +    d.update_value( names::lookuptable_1, lookuptable_1_ );
     
         // right size?
         if ( lookuptable_1_.size() != lookuptable_0_.size() )
    @@ -217,9 +214,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona
           }
         }
       }
    -  if ( d->known( names::lookuptable_2 ) )
    +  if ( d.known( names::lookuptable_2 ) )
       {
    -    updateValue< std::vector< long > >( d, names::lookuptable_2, lookuptable_2_ );
    +    d.update_value( names::lookuptable_2, lookuptable_2_ );
     
         // right size?
         if ( lookuptable_2_.size() != lookuptable_0_.size() )
    @@ -237,9 +234,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona
         }
       }
     
    -  if ( d->known( names::configbit_0 ) )
    +  if ( d.known( names::configbit_0 ) )
       {
    -    updateValue< std::vector< long > >( d, names::configbit_0, configbit_0_ );
    +    d.update_value( names::configbit_0, configbit_0_ );
     
         // right size?
         if ( configbit_0_.size() != 4 )
    @@ -247,9 +244,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 ) )
       {
    -    updateValue< std::vector< long > >( d, names::configbit_1, configbit_1_ );
    +    d.update_value( names::configbit_1, configbit_1_ );
     
         // right size?
         if ( configbit_1_.size() != 4 )
    @@ -257,9 +254,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 ) )
       {
    -    updateValue< std::vector< long > >( d, names::reset_pattern, reset_pattern_ );
    +    d.update_value( names::reset_pattern, reset_pattern_ );
     
         // right size?
         if ( reset_pattern_.size() != 6 )
    @@ -290,21 +287,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 ] = 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 ] = 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<unsigned int>(d, "discrete_weight",
    @@ -314,22 +311,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, 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, 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_ );
     
    -  updateValue< long >( d, names::synapse_id, synapse_id_ );
    +  d.update_value( names::synapse_id, 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, 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_nn_pre_centered_synapse.h b/models/stdp_nn_pre_centered_synapse.h
    index ec2791efbf..130f448500 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
     {
    @@ -167,12 +164,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.
    @@ -337,33 +334,33 @@ 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< double >( d, names::Kplus, Kplus_ );
    -  def< long >( d, names::size_of, 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::Kplus ] = Kplus_;
    +  d[ names::size_of ] = 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_ );
    -  updateValue< double >( d, names::Kplus, Kplus_ );
    +  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_ );
    +  d.update_value( names::Kplus, Kplus_ );
     
       // 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 7562266dc3..c7f33a5ddc 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
     {
    @@ -162,12 +159,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.
    @@ -329,31 +326,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 ] = 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 >
     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, 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 ( ( ( 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 92970ec8ec..37ac1d7833 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
     {
    @@ -164,12 +161,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.
    @@ -319,31 +316,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 ] = 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 >
     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, 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 ( std::signbit( weight_ ) != std::signbit( Wmax_ ) )
    diff --git a/models/stdp_pl_synapse_hom.cpp b/models/stdp_pl_synapse_hom.cpp
    index 3bc6a0c247..61b64a713a 100644
    --- a/models/stdp_pl_synapse_hom.cpp
    +++ b/models/stdp_pl_synapse_hom.cpp
    @@ -28,9 +28,6 @@
     #include "event.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     void
     nest::register_stdp_pl_synapse_hom( const std::string& name )
     {
    @@ -55,22 +52,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 ] = tau_plus_;
    +  d[ names::lambda ] = lambda_;
    +  d[ names::alpha ] = alpha_;
    +  d[ names::mu ] = 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, tau_plus_ );
       if ( tau_plus_ > 0. )
       {
         tau_plus_inv_ = 1. / tau_plus_;
    @@ -79,9 +76,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, 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 b01a79c79d..157e19a0d5 100644
    --- a/models/stdp_pl_synapse_hom.h
    +++ b/models/stdp_pl_synapse_hom.h
    @@ -108,12 +108,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_;
    @@ -167,12 +167,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.
    @@ -312,27 +312,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 ] = weight_;
     
       // own properties, different for individual synapse
    -  def< double >( d, names::Kplus, Kplus_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::Kplus ] = Kplus_;
    +  d[ names::size_of ] = 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, weight_ );
     
    -  updateValue< double >( d, names::Kplus, Kplus_ );
    +  d.update_value( names::Kplus, Kplus_ );
     }
     
     } // of namespace nest
    diff --git a/models/stdp_synapse.h b/models/stdp_synapse.h
    index 61b3cbcafa..14797583de 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
     {
    @@ -154,12 +151,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.
    @@ -308,33 +305,33 @@ 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< double >( d, names::Kplus, Kplus_ );
    -  def< long >( d, names::size_of, 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::Kplus ] = Kplus_;
    +  d[ names::size_of ] = 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_ );
    -  updateValue< double >( d, names::Kplus, Kplus_ );
    +  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_ );
    +  d.update_value( names::Kplus, Kplus_ );
     
       // 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_hom.cpp b/models/stdp_synapse_hom.cpp
    index fccdf1b148..1cb4c3c9cb 100644
    --- a/models/stdp_synapse_hom.cpp
    +++ b/models/stdp_synapse_hom.cpp
    @@ -27,8 +27,6 @@
     #include "connector_model.h"
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     void
     nest::register_stdp_synapse_hom( const std::string& name )
    @@ -38,9 +36,6 @@ nest::register_stdp_synapse_hom( const std::string& name )
     
     namespace nest
     {
    -//
    -// Implementation of class STDPHomCommonProperties.
    -//
     
     STDPHomCommonProperties::STDPHomCommonProperties()
       : CommonSynapseProperties()
    @@ -54,29 +49,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 ] = 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
    -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, 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 803f513585..20db9b406a 100644
    --- a/models/stdp_synapse_hom.h
    +++ b/models/stdp_synapse_hom.h
    @@ -133,12 +133,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_;
    @@ -194,12 +194,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.
    @@ -338,27 +338,27 @@ stdp_synapse_hom< targetidentifierT >::send( Event& e, size_t 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 ] = weight_;
     
       // own properties, different for individual synapse
    -  def< double >( d, names::Kplus, Kplus_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::Kplus ] = Kplus_;
    +  d[ names::size_of ] = 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, weight_ );
     
    -  updateValue< double >( d, names::Kplus, 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 f2a8f8ced3..5d6e92d9e2 100644
    --- a/models/stdp_triplet_synapse.h
    +++ b/models/stdp_triplet_synapse.h
    @@ -165,12 +165,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.
    @@ -332,36 +332,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 ] = 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 >
     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, 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 d006dc30af..6241810cc3 100644
    --- a/models/step_current_generator.cpp
    +++ b/models/step_current_generator.cpp
    @@ -28,10 +28,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -47,7 +43,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_ );
     }
     }
     
    @@ -108,17 +104,17 @@ 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() );
    +  std::vector< double > times_ms;
    +  times_ms.reserve( amp_time_stamps_.size() );
       for ( auto amp_time_stamp : amp_time_stamps_ )
       {
    -    times_ms->push_back( amp_time_stamp.get_ms() );
    +    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 ] = times_ms;
    +  d[ names::amplitude_values ] = amp_values_;
    +  d[ names::allow_offgrid_times ] = allow_offgrid_amp_times_;
     }
     
     nest::Time
    @@ -166,12 +162,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, 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 )
       {
    @@ -342,7 +338,7 @@ 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;
         std::vector< double > times_ms;
         std::vector< double > amplitudes_pA;
         const size_t n_step = P_.amp_time_stamps_.size();
    @@ -358,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 ] = times_ms;
    +    d[ names::amplitude_values ] = amplitudes_pA;
     
         ptmp.set( d, B_, this );
       }
    diff --git a/models/step_current_generator.h b/models/step_current_generator.h
    index 5d8d8fc04c..bc7c12c2f1 100644
    --- a/models/step_current_generator.h
    +++ b/models/step_current_generator.h
    @@ -124,8 +124,8 @@ class step_current_generator : public StimulationDevice
     
       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;
     
       void set_data_from_stimulation_backend( std::vector< double >& input_spikes ) override;
     
    @@ -159,9 +159,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
    @@ -237,16 +237,16 @@ step_current_generator::handles_test_event( DataLoggingRequest& dlr, size_t rece
     }
     
     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 ] = 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 dfe104987d..12a66a15da 100644
    --- a/models/step_rate_generator.cpp
    +++ b/models/step_rate_generator.cpp
    @@ -28,10 +28,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -47,7 +43,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_ );
     }
     }
     
    @@ -108,17 +104,17 @@ 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() );
    +  std::vector< double > times_ms;
    +  times_ms.reserve( amp_time_stamps_.size() );
       for ( auto amp_time_stamp : amp_time_stamps_ )
       {
    -    times_ms->push_back( amp_time_stamp.get_ms() );
    +    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 ] = times_ms;
    +  d[ names::amplitude_values ] = amp_values_;
    +  d[ names::allow_offgrid_times ] = allow_offgrid_amp_times_;
     }
     
     nest::Time
    @@ -166,12 +162,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, 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 )
       {
    @@ -355,7 +351,7 @@ 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;
         std::vector< double > times_ms;
         std::vector< double > amplitudes_Hz;
         const size_t n_step = P_.amp_time_stamps_.size();
    @@ -371,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 ] = times_ms;
    +    d[ names::amplitude_values ] = amplitudes_Hz;
     
         ptmp.set( d, B_, this );
       }
    diff --git a/models/step_rate_generator.h b/models/step_rate_generator.h
    index 4853c15f7f..9618a9cf79 100644
    --- a/models/step_rate_generator.h
    +++ b/models/step_rate_generator.h
    @@ -128,8 +128,8 @@ class step_rate_generator : public StimulationDevice
     
       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;
     
       //! Allow multimeter to connect to local instances
       bool local_receiver() const override;
    @@ -165,9 +165,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
    @@ -243,16 +243,16 @@ step_rate_generator::handles_test_event( DataLoggingRequest& dlr, size_t recepto
     }
     
     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 ] = 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 c1a41cb679..eb0fed7674 100644
    --- a/models/tanh_rate.cpp
    +++ b/models/tanh_rate.cpp
    @@ -49,17 +49,17 @@ register_rate_transformer_tanh( const std::string& name )
     
     
     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 ] = g_;
    +  d[ names::theta ] = 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, g_, node );
    +  update_value_param( d, names::theta, theta_, node );
     }
     
     /*
    diff --git a/models/tanh_rate.h b/models/tanh_rate.h
    index ce04f718b2..a8bb30422f 100644
    --- a/models/tanh_rate.h
    +++ b/models/tanh_rate.h
    @@ -141,8 +141,8 @@ class nonlinearities_tanh_rate
       {
       }
     
    -  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
     
       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 dbb877601e..30dfc9d11d 100644
    --- a/models/threshold_lin_rate.cpp
    +++ b/models/threshold_lin_rate.cpp
    @@ -49,19 +49,19 @@ register_rate_transformer_threshold_lin( const std::string& name )
     
     
     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 ] = g_;
    +  d[ names::theta ] = theta_;
    +  d[ names::alpha ] = 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, g_, node );
    +  update_value_param( d, names::theta, theta_, node );
    +  update_value_param( d, names::alpha, alpha_, node );
     }
     
     /*
    diff --git a/models/threshold_lin_rate.h b/models/threshold_lin_rate.h
    index 2329f4064a..d7a5ebebf7 100644
    --- a/models/threshold_lin_rate.h
    +++ b/models/threshold_lin_rate.h
    @@ -149,8 +149,8 @@ class nonlinearities_threshold_lin_rate
       {
       }
     
    -  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
     
       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 a57f300244..b438809dd1 100644
    --- a/models/tsodyks2_synapse.h
    +++ b/models/tsodyks2_synapse.h
    @@ -161,12 +161,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.
    @@ -263,51 +263,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 ] = 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 >
     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, weight_ );
     
    -  updateValue< double >( d, names::dU, U_ );
    +  d.update_value( names::dU, U_ );
       if ( U_ > 1.0 or U_ < 0.0 )
       {
         throw BadProperty( "'U' must be in [0,1]." );
       }
     
    -  updateValue< double >( d, names::u, u_ );
    +  d.update_value( names::u, u_ );
       if ( u_ > 1.0 or 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, 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, 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, x_ );
     }
     
     } // namespace
    diff --git a/models/tsodyks_synapse.h b/models/tsodyks_synapse.h
    index bb6c1e3938..4335564130 100644
    --- a/models/tsodyks_synapse.h
    +++ b/models/tsodyks_synapse.h
    @@ -181,12 +181,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.
    @@ -309,31 +309,31 @@ 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 ] = 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 >
     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, x );
    +  d.update_value( names::y, y );
     
       if ( x + y > 1.0 )
       {
    @@ -344,33 +344,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, weight_ );
     
    -  updateValue< double >( d, names::U, U_ );
    +  d.update_value( names::U, U_ );
       if ( U_ > 1.0 or 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, 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, 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, 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, u_ );
       if ( u_ > 1.0 or u_ < 0.0 )
       {
         throw BadProperty( "'u' must be in [0,1]." );
    diff --git a/models/tsodyks_synapse_hom.cpp b/models/tsodyks_synapse_hom.cpp
    index 65e450ba2b..c0d681e7c0 100644
    --- a/models/tsodyks_synapse_hom.cpp
    +++ b/models/tsodyks_synapse_hom.cpp
    @@ -50,40 +50,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 ] = U_;
    +  d[ names::tau_psc ] = tau_psc_;
    +  d[ names::tau_rec ] = tau_rec_;
    +  d[ names::tau_fac ] = 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, U_ );
       if ( U_ > 1.0 or 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, 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, 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, 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 e01c49f04b..71bbb45f5e 100644
    --- a/models/tsodyks_synapse_hom.h
    +++ b/models/tsodyks_synapse_hom.h
    @@ -156,12 +156,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
    @@ -214,12 +214,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.
    @@ -334,25 +334,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 ] = x_;
    +  d[ names::y ] = y_;
    +  d[ names::u ] = 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, x );
    +  d.update_value( names::y, y );
     
       if ( x + y > 1.0 )
       {
    @@ -364,7 +364,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, u_ );
     }
     
     } // namespace
    diff --git a/models/urbanczik_synapse.h b/models/urbanczik_synapse.h
    index 04fcd05d06..3aa3a330af 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
     {
    @@ -149,12 +146,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.
    @@ -304,27 +301,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 ] = 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 >
     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, 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 cf30380486..4903287787 100644
    --- a/models/vogels_sprekeler_synapse.h
    +++ b/models/vogels_sprekeler_synapse.h
    @@ -131,12 +131,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.
    @@ -284,29 +284,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 ] = 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 >
     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, 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 659838b288..9f7167ed17 100644
    --- a/models/volume_transmitter.cpp
    +++ b/models/volume_transmitter.cpp
    @@ -34,8 +34,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     void
     nest::register_volume_transmitter( const std::string& name )
    @@ -58,14 +56,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 ] = 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, deliver_interval_, node );
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/volume_transmitter.h b/models/volume_transmitter.h
    index 0b3b904da1..3dad7858db 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
     {
    @@ -130,7 +127,7 @@ class volume_transmitter : public Node
         return false;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::other;
    @@ -148,8 +145,8 @@ class volume_transmitter : public Node
     
       size_t handles_test_event( SpikeEvent&, size_t ) 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;
     
       /**
        * Since volume transmitters are duplicated on each thread, and are
    @@ -175,8 +172,8 @@ class volume_transmitter : public Node
       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
       };
     
    @@ -206,13 +203,13 @@ volume_transmitter::handles_test_event( SpikeEvent&, size_t receptor_type )
     }
     
     inline void
    -volume_transmitter::get_status( DictionaryDatum& d ) const
    +volume_transmitter::get_status( dictionary& d ) const
     {
       P_.get( 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_optimizer.cpp b/models/weight_optimizer.cpp
    index f38e81fc9e..5c21368215 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()
    @@ -54,21 +51,21 @@ 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_ );
    -  def< bool >( d, names::optimize_each_step, optimize_each_step_ );
    +  d[ names::optimizer ] = get_name();
    +  d[ names::batch_size ] = batch_size_;
    +  d[ names::eta ] = eta_;
    +  d[ names::Wmin ] = Wmin_;
    +  d[ names::Wmax ] = Wmax_;
    +  d[ names::optimize_each_step ] = optimize_each_step_;
     }
     
     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." );
    @@ -76,7 +73,7 @@ WeightOptimizerCommonProperties::set_status( const DictionaryDatum& d )
       batch_size_ = new_batch_size;
     
       double eta_new = eta_;
    -  updateValue< double >( d, names::eta, eta_new );
    +  d.update_value( names::eta, eta_new );
       if ( eta_new < 0 )
       {
         throw BadProperty( "Learning rate eta ≥ 0 required." );
    @@ -94,8 +91,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." );
    @@ -103,7 +100,7 @@ WeightOptimizerCommonProperties::set_status( const DictionaryDatum& 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()
    @@ -115,12 +112,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 )
     {
     }
     
    @@ -200,23 +197,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_ )
       {
    @@ -244,19 +241,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 3bed762225..494a34c353 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
     {
    @@ -175,10 +175,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;
    @@ -259,10 +259,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,
    @@ -349,8 +349,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;
    @@ -386,8 +386,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 33f1fef67d..0136e51d1f 100644
    --- a/models/weight_recorder.cpp
    +++ b/models/weight_recorder.cpp
    @@ -30,22 +30,15 @@
     #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"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     void
     nest::register_weight_recorder( const std::string& name )
     {
       register_node_model< weight_recorder >( name );
     }
     
    -
     // record time, node ID, weight and receiver node ID
     nest::weight_recorder::weight_recorder()
       : RecordingDevice()
    @@ -59,81 +52,42 @@ 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_()
    -  , targets_()
    +  : senders_( new NodeCollectionPrimitive() )
    +  , targets_( new NodeCollectionPrimitive() )
     {
     }
     
     void
    -nest::weight_recorder::Parameters_::get( DictionaryDatum& d ) const
    +nest::weight_recorder::Parameters_::get( dictionary& d ) const
     {
    -  if ( senders_.get() )
    -  {
    -    ( *d )[ names::senders ] = senders_;
    -  }
    -  else
    -  {
    -    ArrayDatum ad;
    -    ( *d )[ names::senders ] = ad;
    -  }
    -  if ( targets_.get() )
    -  {
    -    ( *d )[ names::targets ] = targets_;
    -  }
    -  else
    -  {
    -    ArrayDatum ad;
    -    ( *d )[ names::targets ] = ad;
    -  }
    +  d[ names::senders ] = senders_;
    +  d[ names::targets ] = targets_;
     }
     
     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 ]( NodeCollectionPTR& nc, const std::string& key )
       {
    -    const Token& tkn = d->lookup( names::senders );
    -    if ( tkn.is_a< NodeCollectionDatum >() )
    -    {
    -      senders_ = getValue< NodeCollectionDatum >( tkn );
    -    }
    -    else
    +    if ( not d.empty() and d.known( key ) )
         {
    -      if ( tkn.is_a< IntVectorDatum >() )
    +      const auto value = d.at( key );
    +      if ( is_type< NodeCollectionPTR >( value ) )
           {
    -        IntVectorDatum ivd = getValue< IntVectorDatum >( tkn );
    -        senders_ = NodeCollection::create( ivd );
    +        nc = d.get< NodeCollectionPTR >( key );
           }
    -      if ( tkn.is_a< ArrayDatum >() )
    +      else
           {
    -        ArrayDatum ad = getValue< ArrayDatum >( tkn );
    -        senders_ = NodeCollection::create( ad );
    +        throw TypeMismatch( "NodeCollection", debug_type( d.at( key ) ) );
           }
         }
    -  }
    +  };
     
    -  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 );
    +  get_or_create_nc( targets_, names::targets );
     }
     
     void
    @@ -155,7 +109,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 );
    @@ -181,7 +135,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 );
    @@ -199,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_.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;
         }
    diff --git a/models/weight_recorder.h b/models/weight_recorder.h
    index ef23ad8f6d..75556231ef 100644
    --- a/models/weight_recorder.h
    +++ b/models/weight_recorder.h
    @@ -108,7 +108,7 @@ class weight_recorder : public RecordingDevice
         return true;
       }
     
    -  Name
    +  std::string
       get_element_type() const override
       {
         return names::recorder;
    @@ -130,8 +130,8 @@ class weight_recorder : public RecordingDevice
       Type get_type() const override;
       SignalType receives_signal() const 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 pre_run_hook() override;
    @@ -139,14 +139,14 @@ class weight_recorder : public RecordingDevice
     
       struct Parameters_
       {
    -    NodeCollectionDatum senders_;
    -    NodeCollectionDatum targets_;
    +    NodeCollectionPTR senders_;
    +    NodeCollectionPTR targets_;
     
         Parameters_();
         Parameters_( const Parameters_& ) = default;
         Parameters_& operator=( const Parameters_& ) = default;
    -    void get( DictionaryDatum& ) const;
    -    void set( const DictionaryDatum& );
    +    void get( dictionary& ) const;
    +    void set( const dictionary& );
       };
     
       Parameters_ P_;
    diff --git a/modelsets/empty b/modelsets/empty
    new file mode 100644
    index 0000000000..e69de29bb2
    diff --git a/nest/CMakeLists.txt b/nest/CMakeLists.txt
    deleted file mode 100644
    index 7a21c573c0..0000000000
    --- a/nest/CMakeLists.txt
    +++ /dev/null
    @@ -1,105 +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 models
    -    OpenMP::OpenMP_CXX )
    -
    -target_link_libraries( nest_lib
    -    nestutil nestkernel sli_lib models
    -    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
    -    ${PROJECT_SOURCE_DIR}/models
    -    )
    -
    -
    -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
    -    ${PROJECT_SOURCE_DIR}/models
    -    ${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 b27ba0abc5..0000000000
    --- a/nest/neststartup.cpp
    +++ /dev/null
    @@ -1,176 +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"
    -
    -// Includes from libnestutil:
    -#include "logging_event.h"
    -
    -// Includes from nestkernel:
    -#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 );
    -  addmodule< SLIgraphics >( engine );
    -  engine.addmodule( new SLIStartup( *argc, *argv ) );
    -  addmodule< Processes >( engine );
    -  addmodule< RegexpModule >( engine );
    -  addmodule< FilesystemModule >( engine );
    -
    -  // NestModule extends SLI by commands for neuronal simulations
    -  addmodule< nest::NestModule >( engine );
    -
    -#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 );
    -  ad->push_back( new StringDatum( "(" + modulepath + "/pynest-init.sli) run" ) );
    -#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/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index ab3257a89f..2367a550df 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -18,9 +18,10 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     set ( nestkernel_sources
    -      universal_data_logger_impl.h universal_data_logger.h
    +      universal_data_logger.h universal_data_logger_impl.h
           recordables_map.h
           archiving_node.h archiving_node.cpp
    +      buffer_resize_log.h buffer_resize_log.cpp
           clopath_archiving_node.h clopath_archiving_node.cpp
           urbanczik_archiving_node.h urbanczik_archiving_node_impl.h
           eprop_archiving_node.h eprop_archiving_node_impl.h
    @@ -46,9 +47,7 @@ set ( nestkernel_sources
           histentry.h histentry.cpp
           model.h model.cpp
           model_manager.h model_manager_impl.h model_manager.cpp
    -      nest_datums.h nest_datums.cpp
    -      nest_names.cpp nest_names.h
    -      nestmodule.h nestmodule.cpp
    +      nest_names.h
           nest_time.h nest_time.cpp
           nest_timeconverter.h nest_timeconverter.cpp
           modelrange.h modelrange.cpp
    @@ -88,8 +87,7 @@ set ( nestkernel_sources
           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
    +      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
    @@ -98,20 +96,22 @@ set ( nestkernel_sources
           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
    +      target_table_devices.h target_table_devices_impl.h target_table_devices.cpp
    +      target.h
    +      target_data.h
    +      static_assert.h
           send_buffer_position.h send_buffer_position.cpp
           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
    +      connection_creator.h connection_creator_impl.h connection_creator.cpp
           free_layer.h
           grid_layer.h
           grid_mask.h
    -      layer.h layer.cpp layer_impl.h
    -      mask.h mask.cpp mask_impl.h
    +      layer.h layer_impl.h layer.cpp
    +      mask.h mask_impl.h mask.cpp
           ntree.h ntree_impl.h
           position.h
           spatial.h spatial.cpp
    @@ -121,48 +121,46 @@ set ( nestkernel_sources
           stopwatch.h stopwatch_impl.h
           )
     
    -
     if ( HAVE_SIONLIB )
       set( nestkernel_sources
    -       ${nestkernel_sources}
    -       recording_backend_sionlib.h recording_backend_sionlib.cpp
    -       )
    +    ${nestkernel_sources}
    +    recording_backend_sionlib.h recording_backend_sionlib.cpp
    +  )
     endif ()
     
     if ( HAVE_MPI )
    -  set( nestkernel_sources
    +  set(nestkernel_sources
         ${nestkernel_sources}
         recording_backend_mpi.h recording_backend_mpi.cpp
         stimulation_backend_mpi.h stimulation_backend_mpi.cpp
       )
     endif ()
     
    -
     # Prevent problems with Mamba path substitution (see #2348)
     set_source_files_properties( dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0" )
     
    -
     add_library( nestkernel STATIC ${nestkernel_sources} )
    -set_target_properties( nestkernel
    -    PROPERTIES
    -    POSITION_INDEPENDENT_CODE ON
    -    )
    +
    +if ( APPLE )
    +  set_target_properties( nestkernel PROPERTIES LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup" )
    +endif ()
    +
    +set_target_properties( nestkernel PROPERTIES POSITION_INDEPENDENT_CODE ON )
     
     target_link_libraries( nestkernel
    -    nestutil sli_lib models
    -    ${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
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/models
    -    ${PROJECT_SOURCE_DIR}/sli
    -    ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -    )
    +  ${PROJECT_SOURCE_DIR}/thirdparty
    +  ${PROJECT_SOURCE_DIR}/libnestutil
    +  ${PROJECT_BINARY_DIR}/libnestutil
    +  ${PROJECT_SOURCE_DIR}/models
    +  ${PROJECT_SOURCE_DIR}/nestkernel
    +  ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    +)
     
    -FILTER_HEADERS("${nestkernel_sources}" install_headers )
    +FILTER_HEADERS( "${nestkernel_sources}" install_headers )
     install( FILES ${install_headers}
    -    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    +  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest
    +)
    diff --git a/nestkernel/archiving_node.cpp b/nestkernel/archiving_node.cpp
    index 7ad511eb3c..5b3bd245df 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
     {
    @@ -219,14 +217,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 ] = 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
    -  def< int >( d, names::archiver_length, history_.size() );
    +  d[ names::archiver_length ] = history_.size();
     #endif
     
       // add status dict items from the parent class
    @@ -234,13 +232,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, 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 )
       {
    @@ -257,7 +255,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, clear );
       if ( clear )
       {
         clear_history();
    diff --git a/nestkernel/archiving_node.h b/nestkernel/archiving_node.h
    index 86b402ed1a..612d3eaafc 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
     
    @@ -94,8 +92,8 @@ class ArchivingNode : public StructuralPlasticityNode
        */
       void register_stdp_connection( double t_first_read, double delay ) 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;
     
     protected:
       /**
    diff --git a/nestkernel/buffer_resize_log.cpp b/nestkernel/buffer_resize_log.cpp
    index a37e383c7a..039844d21d 100644
    --- a/nestkernel/buffer_resize_log.cpp
    +++ b/nestkernel/buffer_resize_log.cpp
    @@ -53,14 +53,28 @@ BufferResizeLog::add_entry( size_t global_max_spikes_sent, size_t new_buffer_siz
     }
     
     void
    -BufferResizeLog::to_dict( DictionaryDatum& events ) const
    +BufferResizeLog::to_dict( dictionary& events ) const
     {
    -  initialize_property_intvector( events, names::times );
    -  append_property( events, names::times, time_steps_ );
    -  initialize_property_intvector( events, "global_max_spikes_sent" );
    -  append_property( events, "global_max_spikes_sent", global_max_spikes_sent_ );
    -  initialize_property_intvector( events, "new_buffer_size" );
    -  append_property( events, "new_buffer_size", new_buffer_size_ );
    +  // TODO: PyNEST-NG: Make this lambda (which is also used in
    +  // DeviceData::get_status() recording_backend_memory) available in
    +  // libnestutil/dict_util.h
    +  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& times = init_intvector( names::times );
    +  times.insert( times.end(), time_steps_.begin(), time_steps_.end() );
    +
    +  auto& gmss = init_intvector( names::global_max_spikes_sent );
    +  gmss.insert( gmss.end(), global_max_spikes_sent_.begin(), global_max_spikes_sent_.end() );
    +
    +  auto& nbs = init_intvector( names::new_buffer_size );
    +  nbs.insert( nbs.end(), new_buffer_size_.begin(), new_buffer_size_.end() );
     }
     
     }
    diff --git a/nestkernel/buffer_resize_log.h b/nestkernel/buffer_resize_log.h
    index 1e3caed454..38904e8940 100644
    --- a/nestkernel/buffer_resize_log.h
    +++ b/nestkernel/buffer_resize_log.h
    @@ -26,8 +26,8 @@
     // C++ includes:
     #include <vector>
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +// Includes from libnestutil:
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -41,7 +41,7 @@ class BufferResizeLog
       BufferResizeLog();
       void clear();
       void add_entry( size_t global_max_spikes_sent, size_t new_buffer_size );
    -  void to_dict( DictionaryDatum& ) const;
    +  void to_dict( dictionary& ) const;
     
     private:
       std::vector< long > time_steps_;             //!< Time of resize event in steps
    diff --git a/nestkernel/clopath_archiving_node.cpp b/nestkernel/clopath_archiving_node.cpp
    index 42bb957ea2..03d796a9dd 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
     {
    @@ -76,21 +74,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 ] = 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
    -nest::ClopathArchivingNode::set_status( const DictionaryDatum& d )
    +nest::ClopathArchivingNode::set_status( const dictionary& d )
     {
       ArchivingNode::set_status( d );
     
    @@ -102,13 +100,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, 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;
    diff --git a/nestkernel/clopath_archiving_node.h b/nestkernel/clopath_archiving_node.h
    index 64b5b82eca..c2d2b7c4d8 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
     {
    @@ -105,8 +103,8 @@ class ClopathArchivingNode : public ArchivingNode
        * into the buffer before we read from it, we have to add 1 to the size of the buffers.
        */
       void init_clopath_buffers();
    -  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:
       std::vector< histentry_extended > ltd_history_;
    diff --git a/nestkernel/common_properties_hom_w.h b/nestkernel/common_properties_hom_w.h
    index b5b8d16879..46d7bf3cfd 100644
    --- a/nestkernel/common_properties_hom_w.h
    +++ b/nestkernel/common_properties_hom_w.h
    @@ -42,10 +42,10 @@ class CommonPropertiesHomW : public CommonSynapseProperties
       }
     
       void
    -  get_status( DictionaryDatum& d ) const
    +  get_status( dictionary& d ) const
       {
         CommonSynapseProperties::get_status( d );
    -    def< double >( d, names::weight, weight_ );
    +    d[ names::weight ] = weight_;
       }
     
       double
    @@ -58,10 +58,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, weight_ );
       }
     
     private:
    diff --git a/nestkernel/common_synapse_properties.cpp b/nestkernel/common_synapse_properties.cpp
    index 2a5053c0c3..25fcd9e3b5 100644
    --- a/nestkernel/common_synapse_properties.cpp
    +++ b/nestkernel/common_synapse_properties.cpp
    @@ -31,9 +31,6 @@
     // Includes from models:
     #include "weight_recorder.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     namespace nest
     {
     
    @@ -47,25 +44,24 @@ CommonSynapseProperties::~CommonSynapseProperties()
     }
     
     void
    -CommonSynapseProperties::get_status( DictionaryDatum& d ) const
    +CommonSynapseProperties::get_status( dictionary& d ) const
     {
    -  const NodeCollectionDatum wr = NodeCollectionDatum( NodeCollection::create( weight_recorder_ ) );
    -  def< NodeCollectionDatum >( d, names::weight_recorder, wr );
    +  d[ names::weight_recorder ] = NodeCollection::create( weight_recorder_ );
     }
     
     void
    -CommonSynapseProperties::set_status( const DictionaryDatum& d, ConnectorModel& )
    +CommonSynapseProperties::set_status( const dictionary& d, ConnectorModel& )
     {
    -  NodeCollectionDatum wr_datum;
    -  if ( updateValue< NodeCollectionDatum >( d, names::weight_recorder, wr_datum ) )
    +  NodeCollectionPTR wr_nc;
    +  if ( d.update_value( names::weight_recorder, wr_nc ) )
       {
    -    if ( wr_datum->size() != 1 )
    +    if ( wr_nc->size() != 1 )
         {
           throw BadProperty( "Property weight_recorder must be a single element NodeCollection" );
         }
     
         const size_t tid = kernel().vp_manager.get_thread_id();
    -    Node* wr_node = kernel().node_manager.get_node_or_proxy( ( *wr_datum )[ 0 ], tid );
    +    Node* wr_node = kernel().node_manager.get_node_or_proxy( ( *wr_nc )[ 0 ], tid );
         weight_recorder* wr = dynamic_cast< weight_recorder* >( wr_node );
         if ( not wr )
         {
    diff --git a/nestkernel/common_synapse_properties.h b/nestkernel/common_synapse_properties.h
    index fab02945c6..f26aec05af 100644
    --- a/nestkernel/common_synapse_properties.h
    +++ b/nestkernel/common_synapse_properties.h
    @@ -25,13 +25,9 @@
     
     // Includes from nestkernel:
     #include "connector_model.h"
    -#include "nest_datums.h"
     #include "nest_types.h"
     #include "node.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     
     namespace nest
     {
    @@ -64,12 +60,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 );
     
     
       /**
    @@ -104,7 +100,6 @@ CommonSynapseProperties::get_weight_recorder() const
       return weight_recorder_;
     }
     
    -
     } // of namespace nest
     
    -#endif
    +#endif /* #ifndef COMMON_SYNAPSE_PROPERTIES_H */
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index f70f00f0b4..36ec12551e 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -35,11 +35,6 @@
     #include "node.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "fdstream.h"
    -#include "name.h"
    -
     // Includes from C++:
     #include <algorithm>
     
    @@ -47,8 +42,8 @@
     nest::ConnBuilder::ConnBuilder( const std::string& primary_rule,
       NodeCollectionPTR sources,
       NodeCollectionPTR targets,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : third_in_builder_( nullptr )
       , third_out_builder_( nullptr )
       , primary_builder_( kernel().connection_manager.get_conn_builder( primary_rule,
    @@ -65,26 +60,26 @@ nest::ConnBuilder::ConnBuilder( const std::string& primary_rule,
       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 )
       : third_in_builder_( new ThirdInBuilder( sources,
         third,
         third_conn_spec,
    -    const_cast< std::map< Name, std::vector< DictionaryDatum > >& >( 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< DictionaryDatum > >& >( 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< DictionaryDatum > >& >( syn_specs )[ names::primary ] ) )
    +      const_cast< std::map< std::string, std::vector< dictionary > >& >( syn_specs )[ names::primary ] ) )
     {
     }
     
    @@ -119,8 +114,8 @@ nest::ConnBuilder::disconnect()
     nest::BipartiteConnBuilder::BipartiteConnBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : sources_( sources )
       , targets_( targets )
       , third_out_( third_out )
    @@ -136,9 +131,9 @@ nest::BipartiteConnBuilder::BipartiteConnBuilder( NodeCollectionPTR sources,
       // We only read a subset of rule-related parameters here. The property 'rule'
       // has already been taken care of in ConnectionManager::get_conn_builder() and
       // rule-specific parameters are handled by the subclass constructors.
    -  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, allow_autapses_ );
    +  conn_spec.update_value< bool >( names::allow_multapses, allow_multapses_ );
    +  conn_spec.update_value< bool >( names::make_symmetric, make_symmetric_ );
     
       if ( make_symmetric_ and third_out_ )
       {
    @@ -157,22 +152,21 @@ nest::BipartiteConnBuilder::BipartiteConnBuilder( 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_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 )
       {
    -    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 );
     
    -    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 connection setup
    -    ( *syn_defaults )[ names::music_channel ] = 0;
    +    syn_defaults[ names::music_channel ] = 0;
     #endif
     
         set_synapse_params( syn_defaults, syn_params, synapse_indx );
    @@ -326,11 +320,11 @@ nest::BipartiteConnBuilder::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 );
         }
       }
     }
    @@ -348,11 +342,11 @@ nest::BipartiteConnBuilder::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 );
         }
       }
     }
    @@ -370,17 +364,13 @@ nest::BipartiteConnBuilder::update_param_dict_( size_t 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 ] =
    +        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 ] =
    +        synapse_parameter.second->value_double( target_thread, rng, snode_id, &target );
         }
       }
     }
    @@ -499,13 +489,11 @@ nest::BipartiteConnBuilder::loop_over_targets_() const
     }
     
     void
    -nest::BipartiteConnBuilder::set_synapse_model_( DictionaryDatum syn_params, size_t synapse_indx )
    +nest::BipartiteConnBuilder::set_synapse_model_( const dictionary& syn_params, 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 )[ 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 size_t synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name );
    @@ -517,15 +505,14 @@ nest::BipartiteConnBuilder::set_synapse_model_( DictionaryDatum syn_params, size
     }
     
     void
    -nest::BipartiteConnBuilder::set_default_weight_or_delay_( DictionaryDatum syn_params, size_t synapse_indx )
    +nest::BipartiteConnBuilder::set_default_weight_or_delay_( const 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 );
    +  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
    @@ -534,41 +521,41 @@ nest::BipartiteConnBuilder::set_default_weight_or_delay_( DictionaryDatum syn_pa
     
       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 )
    +      ? 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_defaults )[ names::delay ], kernel().vp_manager.get_num_threads() );
    +    delays_[ synapse_indx ] = syn_params.known( names::delay )
    +      ? 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_defaults )[ names::delay ], kernel().vp_manager.get_num_threads() );
    +    delays_[ synapse_indx ] = syn_params.known( names::delay )
    +      ? 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::BipartiteConnBuilder::set_synapse_params( DictionaryDatum syn_defaults,
    -  DictionaryDatum syn_params,
    +nest::BipartiteConnBuilder::set_synapse_params( const dictionary& syn_defaults,
    +  const 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.at( param_name ), kernel().vp_manager.get_num_threads() );
           register_parameters_requiring_skipping_( *synapse_params_[ synapse_indx ][ param_name ] );
         }
       }
    @@ -577,52 +564,58 @@ nest::BipartiteConnBuilder::set_synapse_params( DictionaryDatum syn_defaults,
       // create it here once to avoid re-creating the object over and over again.
       for ( size_t 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 ] = 0;
           }
           else
           {
    -        ( *param_dicts_[ synapse_indx ][ tid ] )[ param.first ] = Token( new DoubleDatum( 0.0 ) );
    +        param_dicts_[ synapse_indx ][ tid ][ param.first ] = 0.0;
           }
         }
       }
     }
     
     void
    -nest::BipartiteConnBuilder::set_structural_plasticity_parameters( std::vector< DictionaryDatum > syn_specs )
    +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 ) )
    +    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." );
       }
     
    -  const DictionaryDatum syn_spec = syn_specs[ 0 ];
    -  if ( syn_spec->known( names::pre_synaptic_element ) xor syn_spec->known( names::post_synaptic_element ) )
    +  // 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_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." );
       }
     
    -  pre_synaptic_element_name_ = getValue< std::string >( syn_spec, names::pre_synaptic_element );
    -  post_synaptic_element_name_ = getValue< std::string >( syn_spec, names::post_synaptic_element );
    +  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;
     }
     
    @@ -652,8 +645,8 @@ nest::BipartiteConnBuilder::reset_delays_()
     
     nest::ThirdInBuilder::ThirdInBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR third,
    -  const DictionaryDatum& third_conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& third_conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, third, nullptr, third_conn_spec, syn_specs )
       , source_third_gids_( kernel().vp_manager.get_num_threads(), nullptr )
       , source_third_counts_( kernel().vp_manager.get_num_threads(), nullptr )
    @@ -782,8 +775,8 @@ nest::ThirdInBuilder::connect_()
     nest::ThirdOutBuilder::ThirdOutBuilder( const NodeCollectionPTR third,
       const NodeCollectionPTR targets,
       ThirdInBuilder* third_in,
    -  const DictionaryDatum& third_conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& third_conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( third, targets, nullptr, third_conn_spec, syn_specs )
       , third_in_( third_in )
     {
    @@ -792,8 +785,8 @@ nest::ThirdOutBuilder::ThirdOutBuilder( const NodeCollectionPTR third,
     nest::ThirdBernoulliWithPoolBuilder::ThirdBernoulliWithPoolBuilder( const NodeCollectionPTR third,
       const NodeCollectionPTR targets,
       ThirdInBuilder* third_in,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : ThirdOutBuilder( third, targets, third_in, conn_spec, syn_specs )
       , p_( 1.0 )
       , random_pool_( true )
    @@ -801,10 +794,19 @@ 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_ );
    +
    +  // 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 )
    +  {
    +    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 ( updateValue< std::string >( conn_spec, names::pool_type, pool_type ) )
    +  if ( conn_spec.update_value( names::pool_type, pool_type ) )
       {
         if ( pool_type == "random" )
         {
    @@ -825,11 +827,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 ) ) )
       {
    @@ -948,8 +945,8 @@ nest::ThirdBernoulliWithPoolBuilder::get_first_pool_index_( const size_t target_
     nest::OneToOneBuilder::OneToOneBuilder( const NodeCollectionPTR sources,
       const NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
       // make sure that target and source population have the same size
    @@ -1029,11 +1026,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();
         }
       }
     }
    @@ -1077,11 +1073,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();
         }
       }
     }
    @@ -1124,11 +1119,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();
         }
       }
     }
    @@ -1164,11 +1158,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();
         }
       }
     }
    @@ -1220,11 +1213,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();
         }
       }
     }
    @@ -1299,11 +1291,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();
         }
       }
     }
    @@ -1349,11 +1340,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();
         }
       }
     }
    @@ -1389,11 +1379,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();
         }
       }
     }
    @@ -1401,27 +1390,27 @@ nest::AllToAllBuilder::sp_disconnect_()
     nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : 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." );
       }
    -  ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::indegree ].datum() );
    -  if ( pd )
    +  auto indegree = conn_spec.at( names::indegree );
    +  if ( is_type< std::shared_ptr< nest::Parameter > >( indegree ) )
       {
    -    indegree_ = *pd;
    +    indegree_ = boost::any_cast< ParameterPTR >( indegree );
         // TODO: Checks of parameter range
       }
       else
       {
         // Assume indegree is a scalar
    -    const long value = ( *conn_spec )[ names::indegree ];
    -    indegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) );
    +    const long value = conn_spec.get< long >( names::indegree );
    +    indegree_ = ParameterPTR( new ConstantParameter( value ) );
     
         // verify that indegree is not larger than source population if multapses are disabled
         if ( not allow_multapses_ )
    @@ -1506,11 +1495,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();
         }
       }
     }
    @@ -1566,8 +1554,8 @@ nest::FixedInDegreeBuilder::inner_connect_( const int tid,
     nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
       // check for potential errors
    @@ -1576,18 +1564,17 @@ 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 );
    +  if ( is_type< std::shared_ptr< nest::Parameter > >( outdegree ) )
       {
    -    outdegree_ = *pd;
    +    outdegree_ = boost::any_cast< ParameterPTR >( outdegree );
         // TODO: Checks of parameter range
       }
       else
       {
         // Assume outdegree is a scalar
    -    const long value = ( *conn_spec )[ names::outdegree ];
    -
    -    outdegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) );
    +    const long value = conn_spec.get< long >( names::outdegree );
    +    outdegree_ = ParameterPTR( new ConstantParameter( value ) );
     
         // verify that outdegree is not larger than target population if multapses
         // are disabled
    @@ -1684,11 +1671,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();
           }
         }
       }
    @@ -1697,10 +1683,10 @@ nest::FixedOutDegreeBuilder::connect_()
     nest::FixedTotalNumberBuilder::FixedTotalNumberBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
    -  , N_( ( *conn_spec )[ names::N ] )
    +  , N_( boost::any_cast< long >( conn_spec.at( names::N ) ) )
     {
     
       // check for potential errors
    @@ -1855,11 +1841,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();
         }
       }
     }
    @@ -1868,25 +1853,25 @@ nest::FixedTotalNumberBuilder::connect_()
     nest::BernoulliBuilder::BernoulliBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
    -  ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::p ].datum() );
    -  if ( pd )
    +  auto p = conn_spec.at( names::p );
    +  if ( is_type< std::shared_ptr< nest::Parameter > >( p ) )
       {
    -    p_ = *pd;
    +    p_ = boost::any_cast< ParameterPTR >( 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 );
         if ( value < 0 or 1 < value )
         {
           throw BadProperty( "Connection probability 0 <= p <= 1 required." );
         }
    -    p_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) );
    +    p_ = ParameterPTR( new ConstantParameter( value ) );
       }
     }
     
    @@ -1939,11 +1924,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
     }
    @@ -1984,28 +1968,30 @@ nest::BernoulliBuilder::inner_connect_( const int tid, RngPtr rng, Node* target,
     nest::PoissonBuilder::PoissonBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  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() );
    -  if ( pd )
    +
    +  auto p = conn_spec.at( names::pairwise_avg_num_conns );
    +  if ( is_type< std::shared_ptr< nest::Parameter > >( p ) )
       {
    -    pairwise_avg_num_conns_ = *pd;
    +    pairwise_avg_num_conns_ = boost::any_cast< ParameterPTR >( p );
       }
       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." );
         }
    -    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." );
       }
     }
     
    @@ -2055,11 +2041,9 @@ nest::PoissonBuilder::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 ) );
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // of omp parallel
     }
    @@ -2102,10 +2086,10 @@ nest::PoissonBuilder::inner_connect_( const int tid, RngPtr rng, Node* target, s
     nest::SymmetricBernoulliBuilder::SymmetricBernoulliBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  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;
    @@ -2217,11 +2201,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();
         }
       }
     }
    @@ -2230,8 +2213,8 @@ nest::SymmetricBernoulliBuilder::connect_()
     nest::SPBuilder::SPBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
       // Check that both pre and postsynaptic element are provided
    @@ -2246,8 +2229,8 @@ nest::SPBuilder::update_delay( long& 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();
       }
     }
    @@ -2258,11 +2241,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 );
         }
       }
     }
    @@ -2322,11 +2305,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 801d4bb355..7ad7f7391a 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 libnestutil
    @@ -44,9 +45,6 @@
     #include "node_collection.h"
     #include "parameter.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "sliexceptions.h"
     
     namespace nest
     {
    @@ -89,8 +87,8 @@ class BipartiteConnBuilder
       BipartiteConnBuilder( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
       virtual ~BipartiteConnBuilder();
     
       size_t
    @@ -100,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 ];
       }
     
    @@ -110,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 ];
       }
     
    @@ -226,8 +226,8 @@ class BipartiteConnBuilder
       bool make_symmetric_;
       bool creates_symmetric_connections_;
     
    -  //! Buffer for exceptions raised in threads
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_;
    +  //! buffer for exceptions raised in threads
    +  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_;
    @@ -247,10 +247,10 @@ class BipartiteConnBuilder
        *
        * @note Each thread can independently modify its dictionary to pass parameters on
        */
    -  std::vector< std::vector< DictionaryDatum > > param_dicts_;
    +  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_;
    @@ -269,7 +269,7 @@ class BipartiteConnBuilder
       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.
    @@ -283,9 +283,9 @@ class BipartiteConnBuilder
       /**
        * 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_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 );
     
       /**
        * Set structural plasticity parameters (if provided)
    @@ -302,7 +302,7 @@ class BipartiteConnBuilder
        * * multiple syn_specs are given and structural plasticity parameters
        *   are present
        */
    -  void set_structural_plasticity_parameters( std::vector< DictionaryDatum > syn_specs );
    +  void set_structural_plasticity_parameters( const std::vector< dictionary >& syn_specs );
     
       /**
        * Reset weight and delay pointers
    @@ -345,8 +345,8 @@ class ThirdInBuilder final : public BipartiteConnBuilder
        */
       ThirdInBuilder( NodeCollectionPTR sources,
         NodeCollectionPTR third,
    -    const DictionaryDatum& third_conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& third_conn_spec,
    +    const std::vector< dictionary >& syn_specs );
       ~ThirdInBuilder();
     
       /**
    @@ -419,8 +419,8 @@ class ThirdOutBuilder : public BipartiteConnBuilder
       ThirdOutBuilder( const NodeCollectionPTR third,
         const NodeCollectionPTR targets,
         ThirdInBuilder* third_in,
    -    const DictionaryDatum& third_conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& third_conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       //! Only call third_connect() on ThirdOutBuilder
       void
    @@ -463,8 +463,8 @@ class ConnBuilder
       ConnBuilder( const std::string& primary_rule,
         NodeCollectionPTR sources,
         NodeCollectionPTR targets,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       /**
        * Constructor for tripartite connection
    @@ -484,9 +484,9 @@ class ConnBuilder
         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 );
     
       ~ConnBuilder();
     
    @@ -513,8 +513,8 @@ class ThirdBernoulliWithPoolBuilder : public ThirdOutBuilder
       ThirdBernoulliWithPoolBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdInBuilder*,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
       ~ThirdBernoulliWithPoolBuilder();
     
       void third_connect( size_t source_gid, Node& target ) override;
    @@ -567,8 +567,8 @@ class OneToOneBuilder : public BipartiteConnBuilder
       OneToOneBuilder( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       bool
       supports_symmetric() const override
    @@ -615,8 +615,8 @@ class AllToAllBuilder : public BipartiteConnBuilder
       AllToAllBuilder( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs )
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs )
         : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
       {
       }
    @@ -670,15 +670,15 @@ class FixedInDegreeBuilder : public BipartiteConnBuilder
       FixedInDegreeBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_() override;
     
     private:
       void inner_connect_( const int, RngPtr, Node*, size_t, bool, long );
    -  ParameterDatum indegree_;
    +  ParameterPTR indegree_;
     };
     
     class FixedOutDegreeBuilder : public BipartiteConnBuilder
    @@ -687,14 +687,14 @@ class FixedOutDegreeBuilder : public BipartiteConnBuilder
       FixedOutDegreeBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_() override;
     
     private:
    -  ParameterDatum outdegree_;
    +  ParameterPTR outdegree_;
     };
     
     class FixedTotalNumberBuilder : public BipartiteConnBuilder
    @@ -703,8 +703,8 @@ class FixedTotalNumberBuilder : public BipartiteConnBuilder
       FixedTotalNumberBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_() override;
    @@ -719,15 +719,15 @@ class BernoulliBuilder : public BipartiteConnBuilder
       BernoulliBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_() override;
     
     private:
       void inner_connect_( const int, RngPtr, Node*, size_t );
    -  ParameterDatum p_; //!< connection probability
    +  ParameterPTR p_; //!< connection probability
     };
     
     class PoissonBuilder : public BipartiteConnBuilder
    @@ -736,15 +736,15 @@ class PoissonBuilder : public BipartiteConnBuilder
       PoissonBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_() override;
     
     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
    @@ -753,8 +753,8 @@ class SymmetricBernoulliBuilder : public BipartiteConnBuilder
       SymmetricBernoulliBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
       bool
       supports_symmetric() const override
    @@ -784,8 +784,8 @@ class SPBuilder : public BipartiteConnBuilder
       SPBuilder( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_spec );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_spec );
     
       const std::string&
       get_pre_synaptic_element_name() const
    diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp
    index 7c0547ab34..656f2cacb4 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
     {
    @@ -36,30 +34,31 @@ namespace nest
     ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
    -  , cg_( ConnectionGeneratorDatum() )
    +  , cg_()
       , params_map_()
     {
       assert( third_out == nullptr );
     
    -  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 )
    +    for ( auto& [ key, value ] : params_map_ )
         {
    -      it->second.set_access_flag();
    +      params_map_.mark_as_accessed( key );
         }
     
    -    if ( syn_specs[ 0 ]->known( names::weight ) or syn_specs[ 0 ]->known( names::delay ) )
    +    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." );
    @@ -96,13 +95,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 ) 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_ )[ names::delay ];
    -    const size_t w_idx = ( *params_map_ )[ names::weight ];
    +    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/conn_builder_conngen.h b/nestkernel/conn_builder_conngen.h
    index 87c8445846..a30ff0d914 100644
    --- a/nestkernel/conn_builder_conngen.h
    +++ b/nestkernel/conn_builder_conngen.h
    @@ -26,13 +26,15 @@
     #include "config.h"
     #ifdef HAVE_LIBNEUROSIM
     
    +// External includes:
    +#include <neurosim/connection_generator.h>
    +
     // C++ includes:
     #include <map>
     #include <vector>
     
     // Includes from nestkernel:
     #include "conn_builder.h"
    -#include "nest_datums.h"
     
     namespace nest
     {
    @@ -78,8 +80,8 @@ class ConnectionGeneratorBuilder : public BipartiteConnBuilder
       ConnectionGeneratorBuilder( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder*,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& );
    +    const dictionary&,
    +    const std::vector< dictionary >& );
     
     protected:
       void connect_();
    @@ -101,8 +103,8 @@ class ConnectionGeneratorBuilder : public BipartiteConnBuilder
       void cg_get_ranges( RangeSet& ranges, const NodeCollectionPTR nodes );
     
     private:
    -  ConnectionGeneratorDatum cg_;
    -  DictionaryDatum params_map_;
    +  std::shared_ptr< ConnectionGenerator > cg_;
    +  dictionary params_map_;
     };
     
     } // namespace nest
    diff --git a/nestkernel/conn_builder_factory.h b/nestkernel/conn_builder_factory.h
    index ccc62f0025..0d60cee18f 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
     {
    @@ -62,8 +58,8 @@ class GenericBipartiteConnBuilderFactory
       virtual BipartiteConnBuilder* create( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdOutBuilder*,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& ) const = 0;
    +    const dictionary&,
    +    const std::vector< dictionary >& ) const = 0;
     };
     
     /**
    @@ -77,8 +73,8 @@ class BipartiteConnBuilderFactory : public GenericBipartiteConnBuilderFactory
       create( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    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 ConnBuilderType( sources, targets, third_out, conn_spec, syn_specs );
       }
    @@ -104,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;
     };
     
     /**
    @@ -119,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/conn_parameter.cpp b/nestkernel/conn_parameter.cpp
    index 31d249a7c4..e0b5856c78 100644
    --- a/nestkernel/conn_parameter.cpp
    +++ b/nestkernel/conn_parameter.cpp
    @@ -26,56 +26,46 @@
     #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 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_type< 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_type< long >( value ) )
       {
    -    return new ScalarIntegerParameter( *id, nthreads );
    +    return new ScalarIntegerParameter( boost::any_cast< long >( value ), nthreads );
       }
     
       // array of doubles
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( t.datum() );
    -  if ( dvd )
    +  if ( is_type< std::vector< double > >( 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_type< std::shared_ptr< nest::Parameter > >( value ) )
       {
    -    return new ParameterConnParameterWrapper( *pd, nthreads );
    +    return new ParameterConnParameterWrapper( boost::any_cast< ParameterPTR >( value ), nthreads );
       }
     
    -  // array of integer
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( t.datum() );
    -  if ( ivd )
    +  // array of longs
    +  if ( is_type< std::vector< long > >( value ) )
       {
    -    return new ArrayIntegerParameter( **ivd, nthreads );
    +    return new ArrayLongParameter( boost::any_cast< std::vector< long > >( 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( ParameterPTR p, const size_t )
    +  : parameter_( p )
     {
     }
     
    diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h
    index 08238339ba..00713986cc 100644
    --- a/nestkernel/conn_parameter.h
    +++ b/nestkernel/conn_parameter.h
    @@ -27,14 +27,12 @@
     #include <limits>
     #include <vector>
     
    +#include <boost/any.hpp>
    +
     // Includes from nestkernel:
     #include "exceptions.h"
    -#include "nest_datums.h"
     #include "parameter.h"
     
    -// Includes from sli:
    -#include "token.h"
    -
     /**
      * Base class for parameters provided to connection routines.
      *
    @@ -116,7 +114,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 );
     };
     
     
    @@ -233,20 +231,19 @@ class ScalarIntegerParameter : public ConnParameter
      * - All parameters are  doubles, thus calling the function value_int()
      *   throws an error.
      */
    -
     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( size_t tid, size_t n_skip ) const override
       {
    -    if ( next_[ tid ] < values_->end() )
    +    if ( next_[ tid ] < values_.end() )
         {
           next_[ tid ] += n_skip;
         }
    @@ -259,13 +256,13 @@ class ArrayDoubleParameter : public ConnParameter
       size_t
       number_of_values() const override
       {
    -    return values_->size();
    +    return values_.size();
       }
     
       double
       value_double( size_t tid, RngPtr, size_t, Node* ) const override
       {
    -    if ( next_[ tid ] != values_->end() )
    +    if ( next_[ tid ] != values_.end() )
         {
           return *next_[ tid ]++;
         }
    @@ -292,12 +289,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_;
     };
     
    @@ -315,20 +312,19 @@ class ArrayDoubleParameter : public ConnParameter
      * - All parameters are integer, thus calling the function value_double()
      *   throws an error.
      */
    -
    -class ArrayIntegerParameter : public ConnParameter
    +class ArrayLongParameter : public ConnParameter
     {
     public:
    -  ArrayIntegerParameter( const std::vector< long >& 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( size_t tid, size_t n_skip ) const override
       {
    -    if ( next_[ tid ] < values_->end() )
    +    if ( next_[ tid ] < values_.end() )
         {
           next_[ tid ] += n_skip;
         }
    @@ -341,13 +337,13 @@ class ArrayIntegerParameter : public ConnParameter
       size_t
       number_of_values() const override
       {
    -    return values_->size();
    +    return values_.size();
       }
     
       long
       value_int( size_t tid, RngPtr, size_t, Node* ) const override
       {
    -    if ( next_[ tid ] != values_->end() )
    +    if ( next_[ tid ] != values_.end() )
         {
           return *next_[ tid ]++;
         }
    @@ -360,7 +356,7 @@ class ArrayIntegerParameter : public ConnParameter
       double
       value_double( size_t tid, RngPtr, size_t, Node* ) const override
       {
    -    if ( next_[ tid ] != values_->end() )
    +    if ( next_[ tid ] != values_.end() )
         {
           return static_cast< double >( *next_[ tid ]++ );
         }
    @@ -387,19 +383,19 @@ class ArrayIntegerParameter : public ConnParameter
       {
         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< long >* values_;
    +  const std::vector< long > values_;
       mutable std::vector< std::vector< long >::const_iterator > next_;
     };
     
     class ParameterConnParameterWrapper : public ConnParameter
     {
     public:
    -  ParameterConnParameterWrapper( const ParameterDatum&, const size_t );
    +  ParameterConnParameterWrapper( ParameterPTR, const size_t );
     
       double value_double( size_t target_thread, RngPtr rng, size_t snode_id, Node* target ) const override;
     
    @@ -422,7 +418,7 @@ class ParameterConnParameterWrapper : public ConnParameter
       }
     
     private:
    -  Parameter* parameter_;
    +  ParameterPTR parameter_;
     };
     
     } // namespace nest
    diff --git a/nestkernel/connection.h b/nestkernel/connection.h
    index 4a90eb2f0f..28e850e56f 100644
    --- a/nestkernel/connection.h
    +++ b/nestkernel/connection.h
    @@ -39,12 +39,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
     {
     
    @@ -80,11 +74,11 @@ class ConnTestDummyNodeBase : public Node
       {
       }
       void
    -  set_status( const DictionaryDatum& ) override
    +  set_status( const dictionary& ) override
       {
       }
       void
    -  get_status( DictionaryDatum& ) const override
    +  get_status( dictionary& ) const override
       {
       }
       void
    @@ -139,7 +133,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.
    @@ -147,7 +141,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
    @@ -161,7 +155,7 @@ class Connection
        *
        * @see ConnectorModel::check_synapse_params
        */
    -  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.
    @@ -350,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 ] = 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, delay ) )
       {
         kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay );
         syn_id_delay_.set_delay_ms( delay );
    @@ -371,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 21b94e3153..40726a7a6b 100644
    --- a/nestkernel/connection_creator.cpp
    +++ b/nestkernel/connection_creator.cpp
    @@ -21,12 +21,14 @@
      */
     
     #include "connection_creator.h"
    -#include "dictutils.h"
    +
    +#include "nest.h"
    +#include "spatial.h"
     
     namespace nest
     {
     
    -ConnectionCreator::ConnectionCreator( DictionaryDatum dict )
    +ConnectionCreator::ConnectionCreator( const dictionary& dict )
       : allow_autapses_( true )
       , allow_multapses_( true )
       , allow_oversized_( false )
    @@ -37,58 +39,61 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict )
       , weight_()
       , delay_()
     {
    -  Name connection_type;
    +  std::string connection_type;
     
    -  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, 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->known( names::number_of_connections ) )
    +  if ( dict.known( names::number_of_connections ) )
       {
    -    ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *dict )[ names::number_of_connections ].datum() );
    -    if ( pd )
    +    if ( is_type< ParameterPTR >( dict.at( names::number_of_connections ) ) )
         {
    -      number_of_connections_ = *pd;
    +      dict.update_value< ParameterPTR >( names::number_of_connections, number_of_connections_ );
         }
         else
         {
           // Assume indegree is a scalar.
    -      const long value = ( *dict )[ names::number_of_connections ];
    +      const long value = dict.get< long >( names::number_of_connections );
           if ( value < 0 )
           {
             throw BadProperty( "Number of connections cannot be less than zero." );
           }
    -      number_of_connections_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) );
    +      number_of_connections_ = ParameterPTR( new ConstantParameter( value ) );
         }
       }
    -
    -  if ( dict->known( names::mask ) )
    +  if ( dict.known( names::mask ) )
       {
    -    mask_ = NestModule::create_mask( ( *dict )[ names::mask ] );
    +    mask_ = create_mask( dict.get< dictionary >( names::mask ) );
       }
    -  if ( dict->known( names::kernel ) )
    +  if ( dict.known( names::kernel ) )
       {
    -    kernel_ = NestModule::create_parameter( ( *dict )[ names::kernel ] );
    +    kernel_ = create_parameter( dict.at( names::kernel ) );
       }
    -  if ( dict->known( names::synapse_parameters ) )
    +
    +  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 )
    +    std::vector< dictionary > 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" );
         }
     
    -    param_dicts_.resize( syn_params_dvd->size() );
    +    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 )
    +    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< DictionaryDatum* >( synapse_datum->datum() );
    -      extract_params_( *syn_param, *param_dict );
    +      extract_params_( *syn_param_it, *param_dict );
         }
       }
       else
    @@ -99,34 +104,31 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict )
         extract_params_( dict, param_dicts_[ 0 ] );
       }
     
    -  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_synapse_model_id( "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 ] ) };
       }
       if ( delay_.empty() )
       {
    -    if ( not getValue< bool >( ( *syn_defaults )[ names::has_delay ] ) )
    +    if ( not syn_defaults.get< bool >( names::has_delay ) )
         {
    -      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 ] ) };
         }
       }
     
       if ( connection_type == names::pairwise_bernoulli_on_source )
       {
    -
    -    if ( dict->known( names::number_of_connections ) )
    +    if ( dict.known( names::number_of_connections ) )
         {
           type_ = Fixed_indegree;
         }
    @@ -141,8 +143,7 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict )
       }
       else if ( connection_type == names::pairwise_bernoulli_on_target )
       {
    -
    -    if ( dict->known( names::number_of_connections ) )
    +    if ( dict.known( names::number_of_connections ) )
         {
           type_ = Fixed_outdegree;
         }
    @@ -158,52 +159,49 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict )
     }
     
     void
    -ConnectionCreator::extract_params_( const DictionaryDatum& dict_datum, std::vector< DictionaryDatum >& params )
    +ConnectionCreator::extract_params_( const dictionary& dict, std::vector< dictionary >& params )
     {
    -  if ( not dict_datum->known( names::synapse_model ) )
    -  {
    -    dict_datum->insert( names::synapse_model, "static_synapse" );
    -  }
    -  std::string syn_name = ( *dict_datum )[ names::synapse_model ];
    +  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 size_t synapse_model_id = kernel().model_manager.get_synapse_model_id( 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.known( names::weight ) )
       {
    -    weight_.push_back( NestModule::create_parameter( ( *dict_datum )[ names::weight ] ) );
    +    weight_.push_back( create_parameter( dict.at( names::weight ) ) );
       }
       else
       {
    -    weight_.push_back( NestModule::create_parameter( ( *syn_defaults )[ names::weight ] ) );
    +    weight_.push_back( create_parameter( syn_defaults[ names::weight ] ) );
       }
     
    -  if ( dict_datum->known( names::delay ) )
    +  if ( dict.known( names::delay ) )
       {
    -    delay_.push_back( NestModule::create_parameter( ( *dict_datum )[ names::delay ] ) );
    +    delay_.push_back( create_parameter( dict.at( names::delay ) ) );
       }
       else
       {
    -    if ( not getValue< bool >( ( *syn_defaults )[ names::has_delay ] ) )
    +    if ( not syn_defaults.get< bool >( names::has_delay ) )
         {
    -      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 ] ) );
         }
       }
     
    -  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 ]( const std::string& name ) -> void
       {
    -    if ( dict_datum->known( name ) )
    +    if ( dict.known( name ) )
         {
    -      ( *syn_dict )[ name ] = getValue< long >( dict_datum, name );
    +      syn_dict[ name ] = dict.get< long >( name );
         }
       };
       copy_long_if_known( names::synapse_label );
    diff --git a/nestkernel/connection_creator.h b/nestkernel/connection_creator.h
    index 62d2671344..513dd0b566 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
    @@ -93,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( const dictionary& dict );
     
       /**
        * Connect two layers.
    @@ -133,7 +131,7 @@ class ConnectionCreator
         std::vector< std::pair< Position< D >, size_t > >* positions_;
       };
     
    -  void extract_params_( const DictionaryDatum& dict_datum, std::vector< DictionaryDatum >& params );
    +  void extract_params_( const dictionary&, std::vector< dictionary >& );
     
       template < typename Iterator, int D >
       void connect_to_target_( Iterator from,
    @@ -179,13 +177,13 @@ class ConnectionCreator
       bool allow_autapses_;
       bool allow_multapses_;
       bool allow_oversized_;
    -  std::shared_ptr< Parameter > number_of_connections_;
    -  std::shared_ptr< AbstractMask > mask_;
    -  std::shared_ptr< Parameter > kernel_;
    +  ParameterPTR number_of_connections_;
    +  MaskPTR mask_;
    +  ParameterPTR kernel_;
       std::vector< size_t > synapse_model_;
    -  std::vector< std::vector< DictionaryDatum > > param_dicts_;
    -  std::vector< std::shared_ptr< Parameter > > weight_;
    -  std::vector< std::shared_ptr< Parameter > > delay_;
    +  std::vector< std::vector< dictionary > > param_dicts_;
    +  std::vector< ParameterPTR > weight_;
    +  std::vector< ParameterPTR > delay_;
     };
     
     } // namespace nest
    diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h
    index e094ab59d5..3660f14d42 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
     {
    @@ -248,11 +247,11 @@ 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() );
     
     #pragma omp parallel
       {
    -    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();
    @@ -260,7 +259,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() )
             {
    @@ -268,30 +267,28 @@ 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
         }
    -    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 );
         }
       }
     }
    @@ -325,7 +322,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 ) );
    @@ -336,7 +333,7 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
     
     #pragma omp parallel
       {
    -    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->thread_local_begin();
    @@ -344,7 +341,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() );
     
    @@ -354,30 +351,30 @@ 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
         }
    -    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 );
         }
       }
     }
    @@ -407,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
       {
    @@ -437,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/connection_id.cpp b/nestkernel/connection_id.cpp
    index bba8b60123..e30eab4474 100644
    --- a/nestkernel/connection_id.cpp
    +++ b/nestkernel/connection_id.cpp
    @@ -25,8 +25,7 @@
     // Includes from nestkernel:
     #include "nest_names.h"
     
    -// Includes from sli:
    -#include "integerdatum.h"
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -53,37 +52,25 @@ 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 ] = source_node_id_;
       // The node ID of the postsynaptic node
    -  def< long >( dict, nest::names::target, target_node_id_ );
    +  dict[ nest::names::target ] = target_node_id_;
       // The id of the synapse model
    -  def< long >( dict, nest::names::synapse_modelid, synapse_modelid_ );
    +  dict[ nest::names::synapse_modelid ] = synapse_modelid_;
       // The thread of the postsynaptic node
    -  def< long >( dict, nest::names::target_thread, target_thread_ );
    +  dict[ nest::names::target_thread ] = target_thread_;
       // The index in the list
    -  def< long >( dict, nest::names::port, port_ );
    +  dict[ nest::names::port ] = port_;
     
       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 44d26c89e3..2e651e165d 100644
    --- a/nestkernel/connection_id.h
    +++ b/nestkernel/connection_id.h
    @@ -23,9 +23,8 @@
     #ifndef CONNECTION_ID_H
     #define CONNECTION_ID_H
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictutils.h"
    +#include "dictionary.h"
    +
     
     namespace nest
     {
    @@ -36,10 +35,9 @@ 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;
     
    -  DictionaryDatum get_dict() const;
    -  ArrayDatum to_ArrayDatum() const;
    +  dictionary get_dict() const;
       bool operator==( const ConnectionID& c ) const;
       void print_me( std::ostream& out ) const;
       long get_source_node_id() const;
    @@ -65,15 +63,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_label.h b/nestkernel/connection_label.h
    index a20b55f850..17c99aaa36 100644
    --- a/nestkernel/connection_label.h
    +++ b/nestkernel/connection_label.h
    @@ -23,9 +23,6 @@
     #ifndef CONNECTION_LABEL_H
     #define CONNECTION_LABEL_H
     
    -#include "dictdatum.h"
    -#include "dictutils.h"
    -#include "nest.h"
     #include "nest_names.h"
     
     namespace nest
    @@ -61,7 +58,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.
    @@ -69,7 +66,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;
     
    @@ -86,22 +83,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 ] = 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 ] = 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_integer_value( names::synapse_label, lbl ) )
       {
         if ( lbl >= 0 )
         {
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 0924fb73e2..3c88c47fe9 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -43,6 +43,7 @@
     #include "conn_builder.h"
     #include "conn_builder_conngen.h"
     #include "conn_builder_factory.h"
    +#include "connection_id.h"
     #include "connection_label.h"
     #include "connection_manager_impl.h"
     #include "connector_base.h"
    @@ -61,17 +62,11 @@
     #include "target_table_devices_impl.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -#include "sliexceptions.h"
    -#include "token.h"
    -#include "tokenutils.h"
    -
     
     nest::ConnectionManager::ConnectionManager()
    -  : connruledict_( new Dictionary() )
    +  : connruledict_()
       , connbuilder_factories_()
    -  , thirdconnruledict_( new Dictionary() )
    +  , thirdconnruledict_()
       , thirdconnbuilder_factories_()
       , min_delay_( 1 )
       , max_delay_( 1 )
    @@ -175,26 +170,26 @@ 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();
       }
     }
     
     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, keep_source_table_ );
       if ( not keep_source_table_ and kernel().sp_manager.is_structural_plasticity_enabled() )
       {
         throw KernelException(
    @@ -202,10 +197,10 @@ nest::ConnectionManager::set_status( const DictionaryDatum& d )
           "to false." );
       }
     
    -  updateValue< bool >( d, names::use_compressed_spikes, use_compressed_spikes_ );
    +  d.update_value( names::use_compressed_spikes, use_compressed_spikes_ );
     
       //  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 ) or d.known( names::max_delay ) )
       {
         update_delay_extrema_();
       }
    @@ -218,28 +213,28 @@ 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 ] = 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();
    -  def< long >( dict, names::num_connections, n );
    -  def< bool >( dict, names::keep_source_table, keep_source_table_ );
    -  def< bool >( dict, names::use_compressed_spikes, use_compressed_spikes_ );
    +  dict[ names::num_connections ] = n;
    +  dict[ names::keep_source_table ] = keep_source_table_;
    +  dict[ names::use_compressed_spikes ] = use_compressed_spikes_;
     
       sw_construction_connect.get_status( dict, names::time_construction_connect, names::time_construction_connect_cpu );
     
    -  ArrayDatum connection_rules;
    -  for ( auto const& element : *connruledict_ )
    +  std::vector< std::string > connection_rules;
    +  for ( auto const& element : connruledict_ )
       {
    -    connection_rules.push_back( new LiteralDatum( element.first ) );
    +    connection_rules.push_back( element.first );
       }
    -  def< ArrayDatum >( dict, names::connection_rules, connection_rules );
    +  dict[ names::connection_rules ] = connection_rules;
     }
     
    -DictionaryDatum
    +dictionary
     nest::ConnectionManager::get_synapse_status( const size_t source_node_id,
       const size_t target_node_id,
       const size_t tid,
    @@ -248,13 +243,12 @@ nest::ConnectionManager::get_synapse_status( const size_t source_node_id,
     {
       kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() );
     
    -  DictionaryDatum dict( new Dictionary );
    -  ( *dict )[ names::source ] = source_node_id;
    -  ( *dict )[ names::synapse_model ] =
    -    LiteralDatum( kernel().model_manager.get_connection_model( syn_id, /* thread */ 0 ).get_name() );
    -  ( *dict )[ names::target_thread ] = tid;
    -  ( *dict )[ names::synapse_id ] = syn_id;
    -  ( *dict )[ names::port ] = lcid;
    +  dictionary dict;
    +  dict[ names::source ] = source_node_id;
    +  dict[ names::synapse_model ] = kernel().model_manager.get_connection_model( syn_id, /* thread */ 0 ).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 );
    @@ -290,7 +284,7 @@ nest::ConnectionManager::set_synapse_status( const size_t source_node_id,
       const size_t tid,
       const synindex syn_id,
       const size_t lcid,
    -  const DictionaryDatum& dict )
    +  const dictionary& dict )
     {
       kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() );
     
    @@ -330,7 +324,7 @@ nest::ConnectionManager::set_synapse_status( const size_t source_node_id,
             source_node_id,
             target_node_id,
             lcid,
    -        e.message() ) );
    +        e.what() ) );
       }
     }
     
    @@ -393,15 +387,15 @@ nest::ConnectionManager::get_conn_builder( const std::string& name,
       NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdOutBuilder* third_out,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
     {
    -  if ( not connruledict_->known( name ) )
    +  if ( not connruledict_.known( name ) )
       {
         throw IllegalConnection( String::compose( "Unknown connection rule '%1'.", name ) );
       }
     
    -  const size_t rule_id = connruledict_->lookup( 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 );
    @@ -413,15 +407,15 @@ nest::ConnectionManager::get_third_conn_builder( const std::string& name,
       NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       ThirdInBuilder* third_in,
    -  const DictionaryDatum& conn_spec,
    -  const std::vector< DictionaryDatum >& syn_specs )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
     {
    -  if ( not thirdconnruledict_->known( name ) )
    +  if ( not thirdconnruledict_.known( name ) )
       {
         throw IllegalConnection( String::compose( "Unknown third-factor connection rule '%1'.", name ) );
       }
     
    -  const size_t rule_id = thirdconnruledict_->lookup( 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 );
    @@ -440,8 +434,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() )
       {
    @@ -452,31 +446,31 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
         throw IllegalConnection( "Postsynaptic nodes cannot be an empty NodeCollection" );
       }
     
    -  conn_spec->clear_access_flags();
    -
    -  for ( auto syn_params : syn_specs )
    +  conn_spec.init_access_flags();
    +  for ( auto& syn_param : syn_specs )
       {
    -    syn_params->clear_access_flags();
    +    syn_param.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." );
       }
    -  const std::string rule = static_cast< const std::string >( ( *conn_spec )[ names::rule ] );
     
    -  if ( not connruledict_->known( rule ) )
    +  const std::string rule_name = conn_spec.get< std::string >( names::rule );
    +
    +  if ( not connruledict_.known( rule_name ) )
       {
    -    throw BadProperty( String::compose( "Unknown connection rule: %1", rule ) );
    +    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
    -  ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries in conn_spec: " );
    -  for ( auto syn_params : syn_specs )
    +  conn_spec.all_entries_accessed( "Connect", "conn_spec" );
    +  for ( auto& syn_param : syn_specs )
       {
    -    ALL_ENTRIES_ACCESSED( *syn_params, "Connect", "Unread dictionary entries in syn_spec: " );
    +    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.
    @@ -485,33 +479,6 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
       cb.connect();
     }
     
    -
    -void
    -nest::ConnectionManager::connect( TokenArray sources, TokenArray targets, const DictionaryDatum& syn_spec )
    -{
    -  // Get synapse id
    -  size_t syn_id = 0;
    -  auto synmodel = syn_spec->lookup( names::model );
    -  if ( not synmodel.empty() )
    -  {
    -    const std::string synmodel_name = getValue< std::string >( synmodel );
    -    // 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_()
     {
    @@ -564,7 +531,7 @@ nest::ConnectionManager::connect( const size_t snode_id,
       Node* target,
       size_t target_thread,
       const synindex syn_id,
    -  const DictionaryDatum& params,
    +  const dictionary& params,
       const double delay,
       const double weight )
     {
    @@ -594,7 +561,7 @@ nest::ConnectionManager::connect( const size_t snode_id,
     bool
     nest::ConnectionManager::connect( const size_t snode_id,
       const size_t tnode_id,
    -  const DictionaryDatum& params,
    +  const dictionary& params,
       const synindex syn_id )
     {
       kernel().model_manager.assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() );
    @@ -637,24 +604,26 @@ 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();
     
       // Mapping pointers to the first parameter value of each parameter to their respective names.
       // The bool indicates whether the value is an integer or not, and is determined at a later point.
    -  std::map< Name, std::pair< double*, bool > > param_pointers;
    +  std::map< std::string, std::pair< double*, bool > > param_pointers;
       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 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, false );
    +      param_pointers[ key ] = std::make_pair( p_values + i * n, is_int );
           ++i;
         }
       }
    @@ -663,30 +632,29 @@ nest::ConnectionManager::connect_arrays( long* sources,
       const auto syn_model_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
     
       // 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 ( size_t i = 0; i < kernel().vp_manager.get_num_threads(); ++i )
       {
    -    param_dicts.emplace_back( new Dictionary );
    +    param_dicts.emplace_back(); // Adds empty dict for thread i, filled below
         for ( auto& param_key : p_keys )
         {
    -      const Name param_name = param_key; // Convert string to Name
           // Check that the parameter exists for the synapse model.
    -      const auto syn_model_default_it = syn_model_defaults->find( param_name );
    -      if ( syn_model_default_it == syn_model_defaults->end() )
    +      const auto syn_model_default_it = syn_model_defaults.find( param_key );
    +      if ( syn_model_default_it == syn_model_defaults.end() )
           {
             throw BadParameter( syn_model + " does not have parameter " + param_key );
           }
     
           // If the default value is an integer, the synapse parameter must also be an integer.
    -      if ( dynamic_cast< IntegerDatum* >( syn_model_default_it->second.datum() ) )
    +      if ( is_type< long >( syn_model_default_it->second.item ) )
           {
             param_pointers[ param_key ].second = true;
    -        ( *param_dicts[ i ] )[ param_key ] = Token( new IntegerDatum( 0 ) );
    +        param_dicts[ i ][ param_key ] = 0;
           }
           else
           {
    -        ( *param_dicts[ i ] )[ param_key ] = Token( new DoubleDatum( 0.0 ) );
    +        param_dicts[ i ][ param_key ] = 0.0;
           }
         }
       }
    @@ -708,7 +676,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
       {
    @@ -759,48 +727,49 @@ nest::ConnectionManager::connect_arrays( long* sources,
               const auto is_int = param_pointer_pair.second.second;
               auto* param = param_pointer + index_counter;
     
    -          // 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.toString()
    -                + ", but got double.";
    +              const std::string msg =
    +                String::compose( "Expected integer value for %1, but got double.", param_pointer_pair.first );
                   throw BadParameter( msg );
                 }
     
    -            // 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 ] = 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 ] = *param;
               }
             }
     
    +        // 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 );
     
    -        ALL_ENTRIES_ACCESSED( *param_dicts[ tid ], "connect_arrays", "Unread dictionary entries: " );
    +        // PYNEST-NG: Possible performance bottleneck
    +        param_dicts[ tid ].all_entries_accessed( "connect_arrays", "params", /* thread_local_dict */ true );
     
             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 );
         }
       }
     
    @@ -808,7 +777,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
     }
     
     void
    -nest::ConnectionManager::connect_sonata( const DictionaryDatum& graph_specs, const long hyberslab_size )
    +nest::ConnectionManager::connect_sonata( const dictionary& graph_specs, const long hyberslab_size )
     {
     #ifdef HAVE_HDF5
       SonataConnector sonata_connector( graph_specs, hyberslab_size );
    @@ -826,9 +795,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() )
       {
    @@ -843,36 +812,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: " );
         }
       }
     
    @@ -889,7 +858,7 @@ nest::ConnectionManager::connect_( Node& source,
       const size_t s_node_id,
       const size_t tid,
       const synindex syn_id,
    -  const DictionaryDatum& params,
    +  const dictionary& params,
       const double delay,
       const double weight )
     {
    @@ -945,7 +914,7 @@ nest::ConnectionManager::connect_to_device_( Node& source,
       const size_t s_node_id,
       const size_t tid,
       const synindex syn_id,
    -  const DictionaryDatum& params,
    +  const dictionary& params,
       const double delay,
       const double weight )
     {
    @@ -960,7 +929,7 @@ nest::ConnectionManager::connect_from_device_( Node& source,
       Node& target,
       const size_t tid,
       const synindex syn_id,
    -  const DictionaryDatum& params,
    +  const dictionary& params,
       const double delay,
       const double weight )
     {
    @@ -1097,30 +1066,27 @@ nest::ConnectionManager::get_num_connections( const synindex syn_id ) const
       return num_connections;
     }
     
    -ArrayDatum
    -nest::ConnectionManager::get_connections( const DictionaryDatum& params )
    +std::deque< nest::ConnectionID >
    +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( nullptr );
       NodeCollectionPTR target_a = NodeCollectionPTR( nullptr );
     
       long synapse_label = UNLABELED_CONNECTION;
    -  updateValue< long >( params, names::synapse_label, synapse_label );
    +  params.update_value( names::synapse_label, synapse_label );
     
    -  if ( not source_t.empty() )
    +  if ( params.known( names::source ) )
       {
    -    source_a = getValue< NodeCollectionDatum >( source_t );
    +    source_a = params.get< NodeCollectionPTR >( names::source );
         if ( not source_a->valid() )
         {
           throw KernelException( "GetConnection requires valid source NodeCollection." );
         }
       }
    -  if ( not target_t.empty() )
    +  if ( params.known( names::target ) )
       {
    -    target_a = getValue< NodeCollectionDatum >( target_t );
    +    target_a = params.get< NodeCollectionPTR >( names::target );
         if ( not target_a->valid() )
         {
           throw KernelException( "GetConnection requires valid target NodeCollection." );
    @@ -1148,34 +1114,24 @@ nest::ConnectionManager::get_connections( const DictionaryDatum& params )
       }
     
       // We check, whether a synapse model is given. If not, we will iterate all.
    -  size_t syn_id = 0;
    -  if ( not syn_model_t.empty() )
    +  if ( params.known( names::synapse_model ) )
       {
    -    const std::string synmodel_name = getValue< std::string >( syn_model_t );
    +    const std::string synmodel_name = params.get< std::string >( names::synapse_model );
         // The following throws UnknownSynapseType for invalid synmodel_name
    -    syn_id = kernel().model_manager.get_synapse_model_id( synmodel_name );
    +    size_t syn_id = kernel().model_manager.get_synapse_model_id( synmodel_name );
         get_connections( connectome, source_a, target_a, syn_id, synapse_label );
       }
       else
       {
    -    for ( syn_id = 0; syn_id < kernel().model_manager.get_num_connection_models(); ++syn_id )
    +    for ( size_t syn_id = 0; syn_id < kernel().model_manager.get_num_connection_models(); ++syn_id )
         {
           get_connections( connectome, source_a, target_a, syn_id, synapse_label );
         }
       }
     
    -  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 ca0c07d11d..0cdd7bb2b3 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -45,10 +45,6 @@
     #include "target_table.h"
     #include "target_table_devices.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictdatum.h"
     
     namespace nest
     {
    @@ -79,8 +75,8 @@ class ConnectionManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       bool valid_connection_rule( std::string );
     
    @@ -106,26 +102,24 @@ class ConnectionManager : public ManagerInterface
         NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdOutBuilder* third_out,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       //! Obtain builder for bipartite connections
       ThirdOutBuilder* get_third_conn_builder( const std::string& name,
         NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdInBuilder* third_in,
    -    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 sources,
         NodeCollectionPTR targets,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs );
    -
    -  void connect( TokenArray sources, TokenArray targets, const DictionaryDatum& syn_spec );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       /**
        * Connect two nodes.
    @@ -152,7 +146,7 @@ class ConnectionManager : public ManagerInterface
         Node* target,
         size_t target_thread,
         const synindex syn_id,
    -    const DictionaryDatum& params,
    +    const dictionary& params,
         const double delay = numerics::nan,
         const double weight = numerics::nan );
     
    @@ -168,16 +162,16 @@ class ConnectionManager : public ManagerInterface
        * \param params Parameter dictionary to configure the synapse.
        * \param syn_id The synapse model to use.
        */
    -  bool connect( const size_t snode_id, const size_t target, const DictionaryDatum& params, const synindex syn_id );
    +  bool connect( const size_t snode_id, const size_t target, const dictionary& params, const synindex syn_id );
     
       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 );
     
       /**
        * @brief Connect nodes from SONATA specification.
    @@ -188,7 +182,7 @@ class ConnectionManager : public ManagerInterface
        * @param graph_specs Specification dictionary, see PyNEST `SonataNetwork._create_graph_specs` for details.
        * @param hyberslab_size Size of the hyperslab to read in one read operation, applies to all HDF5 datasets.
        */
    -  void connect_sonata( const DictionaryDatum& graph_specs, const long hyberslab_size );
    +  void connect_sonata( const dictionary& graph_specs, const long hyberslab_size );
     
       /**
        * @brief Create tripartite connections
    @@ -199,9 +193,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 );
     
    @@ -217,7 +211,7 @@ class ConnectionManager : public ManagerInterface
       ConnectionType connection_required( Node*& source, Node*& target, size_t tid );
     
       // aka conndatum GetStatus
    -  DictionaryDatum get_synapse_status( const size_t source_node_id,
    +  dictionary get_synapse_status( const size_t source_node_id,
         const size_t target_node_id,
         const size_t tid,
         const synindex syn_id,
    @@ -229,7 +223,7 @@ class ConnectionManager : public ManagerInterface
         const size_t tid,
         const synindex syn_id,
         const size_t lcid,
    -    const DictionaryDatum& dict );
    +    const dictionary& dict );
     
       /**
        * Return connections between pairs of neurons.
    @@ -246,7 +240,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 );
    +  std::deque< ConnectionID > get_connections( const dictionary& params );
     
       void get_connections( std::deque< ConnectionID >& connectome,
         NodeCollectionPTR source,
    @@ -555,7 +549,7 @@ class ConnectionManager : public ManagerInterface
         const size_t s_node_id,
         const size_t tid,
         const synindex syn_id,
    -    const DictionaryDatum& params,
    +    const dictionary& params,
         const double delay = numerics::nan,
         const double weight = numerics::nan );
     
    @@ -582,7 +576,7 @@ class ConnectionManager : public ManagerInterface
         const size_t s_node_id,
         const size_t tid,
         const synindex syn_id,
    -    const DictionaryDatum& params,
    +    const dictionary& params,
         const double delay = NAN,
         const double weight = NAN );
     
    @@ -608,7 +602,7 @@ class ConnectionManager : public ManagerInterface
         Node& target,
         const size_t tid,
         const synindex syn_id,
    -    const DictionaryDatum& params,
    +    const dictionary& params,
         const double delay = NAN,
         const double weight = NAN );
     
    @@ -664,12 +658,12 @@ class ConnectionManager : public ManagerInterface
        */
       std::vector< std::vector< size_t > > num_connections_;
     
    -  DictionaryDatum connruledict_; //!< Dictionary for connection rules.
    +  dictionary connruledict_; //!< Dictionary for connection rules.
     
       //! 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_;
    @@ -722,7 +716,7 @@ class ConnectionManager : public ManagerInterface
     inline bool
     ConnectionManager::valid_connection_rule( std::string rule_name )
     {
    -  return connruledict_->known( rule_name );
    +  return connruledict_.known( rule_name );
     }
     
     inline long
    diff --git a/nestkernel/connection_manager_impl.h b/nestkernel/connection_manager_impl.h
    index 3c8d74034c..0306d8da0f 100644
    --- a/nestkernel/connection_manager_impl.h
    +++ b/nestkernel/connection_manager_impl.h
    @@ -42,24 +42,25 @@ template < typename ConnBuilder >
     void
     ConnectionManager::register_conn_builder( const std::string& name )
     {
    -  assert( not connruledict_->known( name ) );
    +  assert( not connruledict_.known( 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_->insert( name, id );
    +  connruledict_[ name ] = idx;
     }
     
     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();
    +  const size_t idx = thirdconnbuilder_factories_.size();
       thirdconnbuilder_factories_.push_back( cb );
    -  thirdconnruledict_->insert( name, id );
    +  thirdconnruledict_[ name ] = idx;
     }
     
     inline void
    diff --git a/nestkernel/connector_base.h b/nestkernel/connector_base.h
    index 7cdd91b1e8..33392332be 100644
    --- a/nestkernel/connector_base.h
    +++ b/nestkernel/connector_base.h
    @@ -37,18 +37,15 @@
     
     // Includes from nestkernel:
     #include "common_synapse_properties.h"
    +#include "connection_id.h"
     #include "connection_label.h"
     #include "connector_model.h"
     #include "event.h"
    -#include "nest_datums.h"
     #include "nest_names.h"
     #include "node.h"
     #include "source.h"
     #include "spikecounter.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -71,7 +68,7 @@ class ConnectorBase
       virtual ~ConnectorBase() {};
     
       /**
    -   * Return syn_id_ of the synapse type of this Connector (index in
    +   * Return syn_id_ of the synapse type of this Connector (size_t in
        * list of synapse prototypes).
        */
       virtual synindex get_syn_id() const = 0;
    @@ -85,13 +82,13 @@ class ConnectorBase
        * Write status of the connection at position lcid to the dictionary
        * dict.
        */
    -  virtual void get_synapse_status( const size_t tid, const size_t lcid, DictionaryDatum& dict ) const = 0;
    +  virtual void get_synapse_status( const size_t tid, const size_t lcid, dictionary& dict ) const = 0;
     
       /**
        * Set status of the connection at position lcid according to the
        * dictionary dict.
        */
    -  virtual void set_synapse_status( const size_t lcid, const DictionaryDatum& dict, ConnectorModel& cm ) = 0;
    +  virtual void set_synapse_status( const size_t tid, const dictionary& dict, ConnectorModel& cm ) = 0;
     
       /**
        * Add ConnectionID with given source_node_id and lcid to conns. If
    @@ -247,7 +244,7 @@ class Connector : public ConnectorBase
       }
     
       void
    -  get_synapse_status( const size_t tid, const size_t lcid, DictionaryDatum& dict ) const override
    +  get_synapse_status( const size_t tid, const size_t lcid, dictionary& dict ) const override
       {
         assert( lcid < C_.size() );
     
    @@ -255,11 +252,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 ] = C_[ lcid ].get_target( tid )->get_node_id();
       }
     
       void
    -  set_synapse_status( const size_t lcid, const DictionaryDatum& dict, ConnectorModel& cm ) override
    +  set_synapse_status( const size_t lcid, const dictionary& dict, ConnectorModel& cm ) override
       {
         assert( lcid < C_.size() );
     
    @@ -293,8 +290,7 @@ class Connector : public ConnectorBase
             const size_t 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 ) );
             }
           }
         }
    @@ -316,8 +312,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 0a7f83ce8e..d8dfd1e8a0 100644
    --- a/nestkernel/connector_model.h
    +++ b/nestkernel/connector_model.h
    @@ -37,8 +37,6 @@
     #include "nest_types.h"
     #include "secondary_event.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -97,7 +95,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;
     
    @@ -105,8 +103,8 @@ 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;
     
    @@ -117,7 +115,7 @@ class ConnectorModel
        * Any further checks need to be implemented by the connection model class by overriding
        * Connection::check_synapse_params().
        */
    -  virtual void check_synapse_params( const DictionaryDatum& ) const = 0;
    +  virtual void check_synapse_params( const dictionary& ) const = 0;
     
       virtual SecondaryEvent* get_secondary_event() = 0;
     
    @@ -177,7 +175,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 ) override;
     
    @@ -185,8 +183,8 @@ class GenericConnectorModel : public ConnectorModel
     
       void calibrate( const TimeConverter& tc ) 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;
     
       typename ConnectionT::CommonPropertiesType const&
       get_common_properties() const override
    @@ -197,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 fc831cb916..032293296c 100644
    --- a/nestkernel/connector_model_impl.h
    +++ b/nestkernel/connector_model_impl.h
    @@ -40,15 +40,13 @@
     #include "nest_timeconverter.h"
     #include "secondary_event_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
     
     // standard implementation to obtain the default delay
     // synapse types with homogeneous delays must provide a specialization
    -// that returns the default delay from CommonProperties (or from else where)
    +// that returns the default delay from CommonProperties (or from elsewhere)
     // template<typename ConnectionT>
     // double get_default_delay(const GenericConnectorModel<ConnectionT> &cm)
     // {
    @@ -94,7 +92,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)
    @@ -103,21 +101,21 @@ 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::synapse_modelid ] = kernel().model_manager.get_synapse_model_id( name_ );
    -  ( *d )[ names::requires_symmetric ] = has_property( ConnectionModelProperties::REQUIRES_SYMMETRIC );
    -  ( *d )[ names::has_delay ] = has_property( ConnectionModelProperties::HAS_DELAY );
    +  d[ names::receptor_type ] = receptor_type_;
    +  d[ names::synapse_model ] = name_;
    +  d[ names::synapse_modelid ] = kernel().model_manager.get_synapse_model_id( name_ );
    +  d[ names::requires_symmetric ] = has_property( ConnectionModelProperties::REQUIRES_SYMMETRIC );
    +  d[ names::has_delay ] = has_property( ConnectionModelProperties::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_integer_value( names::receptor_type, 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_integer_value( names::music_channel, receptor_type_ );
     #endif
     
       // If the parameter dict d contains /delay, this should set the delay
    @@ -140,16 +138,16 @@ GenericConnectorModel< ConnectionT >::set_status( const DictionaryDatum& 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 ) );
    @@ -223,7 +221,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 )
     {
    @@ -234,7 +232,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 ) )
         {
           throw BadParameter(
             "Parameter dictionary must not contain delay if delay is given "
    @@ -246,7 +244,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, delay ) )
         {
           if ( has_property( ConnectionModelProperties::HAS_DELAY ) )
           {
    @@ -272,7 +270,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?).
    @@ -285,9 +283,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
    -  updateValue< long >( p, names::music_channel, actual_receptor_type );
    +  p.update_integer_value( names::music_channel, actual_receptor_type );
     #endif
    -  updateValue< long >( p, 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/delay_checker.cpp b/nestkernel/delay_checker.cpp
    index 8a1776c98e..f4581dc33c 100644
    --- a/nestkernel/delay_checker.cpp
    +++ b/nestkernel/delay_checker.cpp
    @@ -108,20 +108,20 @@ nest::DelayChecker::set_min_max_delay_( const double min_d, const double max_d )
     }
     
     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 ] = get_min_delay().get_ms();
    +  d[ names::max_delay ] = get_max_delay().get_ms();
     }
     
     void
    -nest::DelayChecker::set_status( const DictionaryDatum& d )
    +nest::DelayChecker::set_status( const dictionary& d )
     {
       double min_d_tmp = 0.0;
    -  bool min_delay_updated = updateValue< double >( d, names::min_delay, min_d_tmp );
    +  bool min_delay_updated = d.update_value( names::min_delay, min_d_tmp );
     
       double max_d_tmp = 0.0;
    -  bool max_delay_updated = updateValue< double >( d, names::max_delay, max_d_tmp );
    +  bool max_delay_updated = d.update_value( names::max_delay, max_d_tmp );
     
       if ( min_delay_updated xor max_delay_updated )
       {
    diff --git a/nestkernel/delay_checker.h b/nestkernel/delay_checker.h
    index 294378a8c7..f14d3c5470 100644
    --- a/nestkernel/delay_checker.h
    +++ b/nestkernel/delay_checker.h
    @@ -26,8 +26,8 @@
     // Includes from nestkernel:
     #include "nest_time.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +#include "dictionary.h"
    +
     
     namespace nest
     {
    @@ -86,8 +86,8 @@ class DelayChecker
     
       void calibrate( const TimeConverter& tc );
     
    -  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:
       Time min_delay_;              //!< Minimal delay of all created synapses.
    diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp
    index d844381cdd..5d2069c222 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
    @@ -74,15 +72,15 @@ nest::Device::Parameters_::operator=( const Parameters_& p )
      * ---------------------------------------------------------------- */
     
     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 ] = origin_.get_ms();
    +  d[ names::start ] = start_.get_ms();
    +  d[ names::stop ] = stop_.get_ms();
     }
     
     void
    -nest::Device::Parameters_::update_( const DictionaryDatum& 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
    @@ -93,20 +91,19 @@ nest::Device::Parameters_::update_( const DictionaryDatum& d, const Name& name,
       // or be infinite. Infinite values are handled gracefully.
     
       double val;
    -  if ( updateValue< double >( d, name, 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 "
    -                                 "of the simulation resolution." );
    +      throw BadProperty( name + " must be a multiple of the simulation resolution." );
         }
         value = t;
       }
     }
     
     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_ );
    diff --git a/nestkernel/device.h b/nestkernel/device.h
    index 6d22482d0d..ef346e8925 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
     {
    @@ -82,8 +80,8 @@ class Device
       /** Set internal variables before calls to SimulationManager::run() */
       virtual void pre_run_hook();
     
    -  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,12 +131,12 @@ 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
    -    static void update_( const DictionaryDatum&, const Name&, Time& );
    +    static void update_( const dictionary&, const std::string&, Time& );
       };
     
     
    @@ -180,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/eprop_archiving_node.h b/nestkernel/eprop_archiving_node.h
    index 04cfc2d3ba..9527750833 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 7c4c60a52e..aa304bd7fc 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/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/event.h b/nestkernel/event.h
    index 780234b4d5..e9ca7ee624 100644
    --- a/nestkernel/event.h
    +++ b/nestkernel/event.h
    @@ -27,6 +27,7 @@
     #include <algorithm>
     #include <cassert>
     #include <cstring>
    +#include <memory>
     #include <vector>
     
     // Includes from nestkernel:
    @@ -36,9 +37,6 @@
     #include "spike_data.h"
     #include "vp_manager.h"
     
    -// Includes from sli:
    -#include "name.h"
    -
     namespace nest
     {
     
    @@ -630,11 +628,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 override;
     
    @@ -647,7 +645,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
    @@ -660,18 +658,18 @@ class DataLoggingRequest : public Event
        * @note This pointer shall be nullptr 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()
       : Event()
       , recording_interval_( Time::neg_inf() )
       , recording_offset_( Time::ms( 0. ) )
    -  , record_from_( nullptr )
    +  , record_from_( 0 )
     {
     }
     
    -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 )
    @@ -680,7 +678,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 )
    @@ -712,7 +710,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 8ba790b740..03d4d17d57 100644
    --- a/nestkernel/event_delivery_manager.cpp
    +++ b/nestkernel/event_delivery_manager.cpp
    @@ -38,8 +38,6 @@
     #include "vp_manager.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -140,13 +138,14 @@ EventDeliveryManager::finalize( const bool )
       recv_buffer_off_grid_spike_data_.clear();
     }
     
    +
     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, off_grid_spiking_ );
     
       double bsl = send_recv_buffer_shrink_limit_;
    -  if ( updateValue< double >( dict, names::spike_buffer_shrink_limit, bsl ) )
    +  if ( dict.update_value( names::spike_buffer_shrink_limit, bsl ) )
       {
         if ( bsl < 0 )
         {
    @@ -156,7 +155,7 @@ EventDeliveryManager::set_status( const DictionaryDatum& dict )
       }
     
       double bss = send_recv_buffer_shrink_spare_;
    -  if ( updateValue< double >( dict, names::spike_buffer_shrink_spare, bss ) )
    +  if ( dict.update_value( names::spike_buffer_shrink_spare, bss ) )
       {
         if ( bss < 0 or bss > 1 )
         {
    @@ -166,7 +165,7 @@ EventDeliveryManager::set_status( const DictionaryDatum& dict )
       }
     
       double bge = send_recv_buffer_grow_extra_;
    -  if ( updateValue< double >( dict, names::spike_buffer_grow_extra, bge ) )
    +  if ( dict.update_value( names::spike_buffer_grow_extra, bge ) )
       {
         if ( bge < 0 )
         {
    @@ -177,17 +176,16 @@ 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 ) );
    -  def< double >( dict, names::spike_buffer_shrink_limit, send_recv_buffer_shrink_limit_ );
    -  def< double >( dict, names::spike_buffer_shrink_spare, send_recv_buffer_shrink_spare_ );
    -  def< double >( dict, names::spike_buffer_grow_extra, send_recv_buffer_grow_extra_ );
    -
    -  DictionaryDatum log_events = DictionaryDatum( new Dictionary );
    -  ( *dict )[ names::spike_buffer_resize_log ] = log_events;
    +  dict[ names::off_grid_spiking ] = off_grid_spiking_;
    +  dict[ names::local_spike_counter ] = std::accumulate( local_spike_counter_.begin(), local_spike_counter_.end(), 0 );
    +  dict[ names::spike_buffer_shrink_limit ] = send_recv_buffer_shrink_limit_;
    +  dict[ names::spike_buffer_shrink_spare ] = send_recv_buffer_shrink_spare_;
    +  dict[ names::spike_buffer_grow_extra ] = send_recv_buffer_grow_extra_;
    +
    +  dictionary log_events;
    +  dict[ names::spike_buffer_resize_log ] = log_events;
       send_recv_buffer_resize_log_.to_dict( log_events );
     
       sw_collocate_spike_data_.get_status( dict, names::time_collocate_spike_data, names::time_collocate_spike_data_cpu );
    diff --git a/nestkernel/event_delivery_manager.h b/nestkernel/event_delivery_manager.h
    index dbdbe1483b..41bd907af9 100644
    --- a/nestkernel/event_delivery_manager.h
    +++ b/nestkernel/event_delivery_manager.h
    @@ -45,8 +45,6 @@
     #include "target_table.h"
     #include "vp_manager.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     namespace nest
     {
    @@ -65,8 +63,8 @@ class EventDeliveryManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Standard routine for sending events.
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index e4da14eaa8..9284c45056 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -28,487 +28,137 @@
     // Generated includes:
     #include "config.h"
     
    -// Includes from sli:
    -#include "interpret.h"
    +// Includes from thirdparty:
    +#include "compose.hpp"
     
    -// Include MPI for MPI error string
    -#ifdef HAVE_MPI
    -#include <mpi.h>
    -#endif
     
     std::string
    -nest::UnknownModelName::message() const
    +nest::UnknownModelName::compose_msg_( const std::string& model_name ) const
     {
    -  std::ostringstream msg;
    -  msg << "/" << n_.toString() + " 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::message() const
    +nest::UnknownComponent::compose_msg_( const std::string& component_name ) const
     {
    -  std::ostringstream msg;
    -  msg << "/" << n_.toString() + " 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();
    -}
    -
    -std::string
    -nest::NewModelNameExists::message() const
    -{
    -  std::ostringstream msg;
    -  msg << "/" << n_.toString() + " is the name of an existing model and cannot be re-used.";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::ModelInUse::message() const
    -{
    -  std::string str = "Model " + modelname_ + " is in use and cannot be unloaded/uninstalled.";
    -  return str.c_str();
    -}
    -
    -std::string
    -nest::UnknownSynapseType::message() const
    -{
    -  std::ostringstream out;
    -  if ( synapsename_.empty() )
    -  {
    -    out << "Synapse with id " << synapseid_ << " does not exist.";
    -  }
    -  else
    -  {
    -    out << "Synapse with name " << synapsename_ << " does not exist.";
    -  }
    -  return out.str();
    -}
    -
    -std::string
    -nest::UnknownNode::message() const
    -{
    -  std::ostringstream out;
    -
    -  if ( id_ >= 0 )
    -  {
    -    out << "Node with id " << id_ << " doesn't exist.";
    -  }
    -  else
    -  {
    -    // Empty message
    -  }
    -
    -  return out.str();
    -}
    -
    -std::string
    -nest::NoThreadSiblingsAvailable::message() const
    -{
    -  std::ostringstream out;
    -
    -  if ( id_ >= 0 )
    -  {
    -    out << "Node with id " << id_ << " does not have thread siblings.";
    -  }
    -  else
    -  {
    -    // Empty message
    -  }
    -
    -  return out.str();
    -}
    -
    -
    -std::string
    -nest::LocalNodeExpected::message() const
    -{
    -  std::ostringstream out;
    -  out << "Node with id " << id_ << " is not a local node.";
    -  return out.str();
    -}
    -
    -std::string
    -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.";
    -  return out.str();
    -}
    -
    -std::string
    -nest::UnknownCompartment::message() const
    -{
    -  std::ostringstream msg;
    -
    -  msg << "Compartment " << compartment_idx_ << " " << info_ << ".";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::UnknownReceptorType::message() const
    -{
    -  std::ostringstream msg;
    -
    -  msg << "Receptor type " << receptor_type_ << " is not available in " << name_ << ".";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::IncompatibleReceptorType::message() const
    -{
    -  std::ostringstream msg;
    -
    -  msg << "Receptor type " << receptor_type_ << " in " << name_ << " does not accept " << event_type_ << ".";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::UnknownPort::message() const
    -{
    -  std::ostringstream out;
    -  out << "Port with id " << id_ << " does not exist.";
    -  if ( not info_.empty() )
    -  {
    -    out << " " << info_ << ".";
    -  }
    -  return out.str();
    -}
    -
    -std::string
    -nest::IllegalConnection::message() const
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Creation of connection is not possible.";
    -  }
    -  else
    -  {
    -    return "Creation of connection is not possible because:\n" + msg_;
    -  }
    -}
    -
    -std::string
    -nest::InexistentConnection::message() const
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Deletion of connection is not possible.";
    -  }
    -  else
    -  {
    -    return "Deletion of connection is not possible because:\n" + msg_;
    -  }
    -}
    -
    -std::string
    -nest::UnknownThread::message() const
    -{
    -  std::ostringstream out;
    -  out << "Thread with id " << id_ << " is outside of range.";
    -  return out.str();
    -}
    -
    -std::string
    -nest::BadDelay::message() const
    -{
    -  std::ostringstream out;
    -  out << "Delay value " << delay_ << " is invalid: " << message_;
    -  return out.str();
    -}
    -
    -std::string
    -nest::UnexpectedEvent::message() const
    -{
    -  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) " );
    -  }
    -  else
    -  {
    -    return "UnexpectedEvent: " + msg_;
    -  }
    -}
    -
    -std::string
    -nest::UnsupportedEvent::message() const
    -{
    -  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." );
    -}
    -
    -std::string
    -nest::BadProperty::message() const
    -{
    -  return msg_;
    -}
    -
    -std::string
    -nest::BadParameter::message() const
    -{
    -  return msg_;
    -}
    -
    -std::string
    -nest::DimensionMismatch::message() const
    -{
    -  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();
    -}
    -
    -std::string
    -nest::DistributionError::message() const
    -{
    -  return std::string();
    -}
    -
    -std::string
    -nest::InvalidDefaultResolution::message() const
    -{
    -  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();
    -}
    -
    -std::string
    -nest::InvalidTimeInModel::message() const
    -{
    -  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();
    -}
    -
    -std::string
    -nest::StepMultipleRequired::message() const
    -{
    -  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;
     }
     
     std::string
    -nest::TimeMultipleRequired::message() const
    +nest::NewModelNameExists::compose_msg_( const std::string& model_name ) const
     {
    -  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();
    +  std::string msg = String::compose( "Model %1 is the name of an existing model and cannot be re-used.", model_name );
    +  return msg;
     }
     
    -#ifdef HAVE_MUSIC
     std::string
    -nest::MUSICPortUnconnected::message() const
    +nest::ModelInUse::compose_msg_( const std::string& model_name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_ << " is unconnected.";
    -  return msg.str();
    +  std::string msg = String::compose( "Model %1 is in use and cannot be unloaded/uninstalled.", model_name );
    +  return msg;
     }
     
     std::string
    -nest::MUSICPortHasNoWidth::message() const
    +nest::UnknownSynapseType::compose_msg_( const int id ) const
     {
    -  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();
    +  std::string msg = String::compose( "Synapse with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
    -nest::MUSICPortAlreadyPublished::message() const
    +nest::UnknownSynapseType::compose_msg_( const std::string& name ) const
     {
    -  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();
    +  std::string msg = String::compose( "Synapse with name %1 does not exist.", name );
    +  return msg;
     }
     
     std::string
    -nest::MUSICSimulationHasRun::message() const
    -{
    -  std::ostringstream msg;
    -  msg << "The instance of model " << model_ << " won't work, since the simulation has already been running";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::MUSICChannelUnknown::message() const
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " cannot be mapped in " << model_ << " because the channel " << channel_
    -      << " does not exists.";
    -  return msg.str();
    -}
    -
    -std::string
    -nest::MUSICPortUnknown::message() const
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " does not exist.";
    -  return msg.str();
    -}
    -
    -
    -std::string
    -nest::MUSICChannelAlreadyMapped::message() const
    -{
    -  std::ostringstream msg;
    -  msg << "The channel " << channel_ << " of port " << portname_ << " has already be mapped to another proxy in "
    -      << model_;
    -  return msg.str();
    -}
    -#endif
    -
    -#ifdef HAVE_MPI
    -std::string
    -nest::MPIPortsFileUnknown::message() const
    -{
    -  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();
    -}
    -
    -
    -std::string
    -nest::MPIPortsFileMissing::message() const
    -{
    -  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();
    -}
    -
    -std::string
    -nest::MPIErrorCode::message() const
    -{
    -
    -  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();
    -}
    -#endif
    -
    -std::string
    -nest::GSLSolverFailure::message() const
    +nest::UnknownNode::compose_msg_( const int id ) const
     {
    -  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();
    +  std::string msg = String::compose( "Node with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
    -nest::NumericalInstability::message() const
    +nest::NoThreadSiblingsAvailable::compose_msg_( const int id ) const
     {
    -  std::ostringstream msg;
    -  msg << "NEST detected a numerical instability while "
    -      << "updating " << model_ << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Node with id %1 does not have thread siblings.", id );
    +  return msg;
     }
     
     std::string
    -nest::UnmatchedSteps::message() const
    +nest::LocalNodeExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream msg;
    -  msg << "Steps for backend device don't match NEST steps: "
    -      << "steps expected: " << total_steps_ << " "
    -      << "steps executed: " << current_step_ << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Node with id %1 is not a local node.", id );
    +  return msg;
     }
     
     std::string
    -nest::BackendPrepared::message() const
    +nest::NodeWithProxiesExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be prepare()'d multiple times.";
    -  return msg.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::BackendNotPrepared::message() const
    +nest::UnknownCompartment::compose_msg_( const long compartment_idx, const std::string info ) const
     {
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be cleanup()'d without preparation (multiple cleanups?).";
    -  return msg.str();
    +  std::string msg = String::compose( "Compartment %1 %2.", compartment_idx, info );
    +  return msg;
     }
     
     std::string
    -nest::BackendAlreadyRegistered::message() const
    +nest::UnknownReceptorType::compose_msg_( const long receptor_type, const std::string name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " has already been registered.";
    -  return msg.str();
    +  std::string msg = String::compose( "Receptor type %1 is not available in %2.", receptor_type, name );
    +  return msg;
     }
     
     std::string
    -nest::KeyError::message() const
    +nest::IncompatibleReceptorType::compose_msg( const long receptor_type,
    +  const std::string name,
    +  const std::string event_type )
     {
    -  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();
    +  std::string msg = String::compose( "Receptor type %1 in %2 does not accept %3.", receptor_type, name, event_type );
    +  return msg;
     }
     
     std::string
    -nest::InternalError::message() const
    +nest::UnknownPort::compose_msg_( const int id ) const
     {
    -  return msg_;
    +  std::string msg = String::compose( "Port with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
    -nest::LayerExpected::message() const
    +nest::UnknownPort::compose_msg_( const int id, const std::string msg ) const
     {
    -  return std::string();
    +  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::LayerNodeExpected::message() const
    +nest::UnsupportedEvent::compose_msg_() const
     {
    -  return std::string();
    +  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 838f8e28b2..fe3d3cce47 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -23,14 +23,21 @@
     #ifndef EXCEPTIONS_H
     #define EXCEPTIONS_H
     
    +#include <exception>
    +
    +// C++ includes:
    +#include <sstream>
    +
     // Includes from nestkernel:
     #include "nest_time.h"
     
    -// Includes from sli:
    -#include "name.h"
    -#include "sliexceptions.h"
    +// Includes from thirdparty:
    +#include "compose.hpp"
     
    -class SLIInterpreter;
    +// Include MPI for MPI error string
    +#ifdef HAVE_MPI
    +#include <mpi.h>
    +#endif
     
     namespace nest
     {
    @@ -39,12 +46,17 @@ class Event;
     
     /**
      * @addtogroup Exceptions Exception classes
    - * Exception classes that are thrown to indicate
    - * an error.
    + *
    + * Exception classes that are thrown to indicate a user error.
    + *
    + * Programmatic errors or deviations from the expected behavior of
    + * internal API conventions should never be handles by using
    + * exceptions, but C++ `assert`s should be used for such cases.
      */
     
     /**
      * @defgroup KernelExceptions NEST kernel exception classes
    + *
      * Exception classes that are thrown by the NEST kernel to indicate
      * an error.
      */
    @@ -53,32 +65,116 @@ class Event;
      * Base class for all Kernel exceptions.
      * @ingroup KernelExceptions
      */
    -class KernelException : public SLIException
    +class KernelException : public std::runtime_error
    +{
    +public:
    +  explicit KernelException()
    +    : std::runtime_error( "" )
    +  {
    +  }
    +
    +  explicit KernelException( const std::string& msg )
    +    : std::runtime_error( msg )
    +  {
    +  }
    +
    +  virtual std::string
    +  exception_name() const
    +  {
    +    return "KernelException";
    +  }
    +};
    +
    +/**
    + * 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() const override
    +  {
    +    return "DynamicModuleManagementError";
    +  }
    +};
    +
    +/**
    + * Exception to be thrown if a feature is unavailable.
    + * @ingroup KernelExceptions
    + */
    +class NotImplemented : public KernelException
    +{
    +public:
    +  explicit NotImplemented( const std::string& msg )
    +    : KernelException( msg )
    +  {
    +  }
    +
    +  std::string
    +  exception_name() const override
    +  {
    +    return "NotImplemented";
    +  }
    +};
    +
    +
    +/**
    + * Exception to be thrown if a given type does not match the expected type.
    + * @ingroup KernelExceptions
    + */
    +class TypeMismatch : public KernelException
     {
    +
     public:
    -  KernelException()
    -    : SLIException( "KernelException" )
    +  explicit TypeMismatch()
    +    : KernelException( "The expected datatype is unknown in the current context." )
    +  {
    +  }
    +
    +  explicit TypeMismatch( const std::string& expected )
    +    : KernelException( "Expected datatype: " + expected )
       {
       }
     
    -  explicit KernelException( char const* const what )
    -    : SLIException( what )
    +  explicit TypeMismatch( const std::string& expected, const std::string& provided )
    +    : KernelException( "Expected datatype: " + expected + ", provided datatype: " + provided )
       {
       }
     
    -  explicit KernelException( const std::string& what )
    -    : SLIException( what )
    +  std::string
    +  exception_name() const override
       {
    +    return "TypeMismatch";
       }
    +};
     
    -  ~KernelException() throw() override
    +
    +/**
    + * @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( "Unaccessed elements in " + what + ", in function " + where + ": " + missed )
       {
       }
     
       std::string
    -  message() const override
    +  exception_name() const override
       {
    -    return std::string();
    +    return "UnaccessedDictionaryEntry";
       }
     };
     
    @@ -90,90 +186,88 @@ class KernelException : public SLIException
      */
     class UnknownModelName : public KernelException
     {
    -  const Name n_;
    +  std::string compose_msg_( const std::string& model_name ) const;
     
     public:
    -  explicit UnknownModelName( const Name& n )
    -    : KernelException( "UnknownModelName" )
    -    , n_( n )
    +  UnknownModelName( const std::string& model_name )
    +    : KernelException( compose_msg_( model_name ) )
       {
       }
     
    -  ~UnknownModelName() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownModelName";
       }
    -  std::string message() const override;
     };
     
     /**
      * Exception to be thrown if a component with the the specified name
      * does not exist.
    - *
      * @see UnknownModelName
      * @ingroup KernelExceptions
      */
     class UnknownComponent : public KernelException
     {
    -  const Name n_;
    +  std::string compose_msg_( const std::string& model_name ) const;
     
     public:
    -  explicit UnknownComponent( const Name& n )
    -    : KernelException( "UnknownComponent" )
    -    , n_( n )
    +  explicit UnknownComponent( const std::string& component_name )
    +    : KernelException( compose_msg_( component_name ) )
       {
       }
     
    -  ~UnknownComponent() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownComponent";
       }
    -  std::string message() const override;
     };
     
     /**
      * Exception to be thrown if a name requested for a user-defined
      * model exist already.
    - *
      * @ingroup KernelExceptions
      */
     class NewModelNameExists : public KernelException
     {
    -  const Name n_;
    +  std::string compose_msg_( const std::string& model_name ) const;
     
     public:
    -  explicit NewModelNameExists( const Name& n )
    -    : KernelException( "NewModelNameExists" )
    -    , n_( n )
    +  NewModelNameExists( const std::string& model_name )
    +    : KernelException( compose_msg_( model_name ) )
       {
       }
    -  ~NewModelNameExists() throw() override
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "NewModelNameExists";
       }
    -  std::string message() const 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
    + * uninstalled. This exception can occur if the user tries to uninstall a
      * module.
      * @ingroup KernelExceptions
      */
     class ModelInUse : public KernelException
     {
    -  const std::string modelname_;
    +  std::string compose_msg_( const std::string& model_name ) const;
     
     public:
    -  ModelInUse( const std::string& modelname )
    -    : KernelException( "ModelInUse" )
    -    , modelname_( modelname )
    +  ModelInUse( const std::string& model_name )
    +    : KernelException( compose_msg_( model_name ) )
       {
       }
     
    -  ~ModelInUse() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "ModelInUse";
       }
    -  std::string message() const override;
     };
     
     /**
    @@ -183,203 +277,182 @@ class ModelInUse : public KernelException
      */
     class UnknownSynapseType : public KernelException
     {
    -  int synapseid_;
    -  std::string synapsename_;
    +  std::string compose_msg_( const int id ) const;
    +  std::string compose_msg_( const std::string& name ) const;
     
     public:
       UnknownSynapseType( int id )
    -    : KernelException( "UnknownSynapseType" )
    -    , synapseid_( id )
    -    , synapsename_()
    +    : KernelException( compose_msg_( id ) )
       {
       }
     
       UnknownSynapseType( std::string name )
    -    : KernelException( "UnknownSynapseType" )
    -    , synapseid_()
    -    , synapsename_( name )
    +    : KernelException( compose_msg_( name ) )
       {
       }
     
    -  ~UnknownSynapseType() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownSynapseType";
       }
    -
    -  std::string message() const override;
     };
     
     /**
    - * 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
     {
    -  long id_;
    +  std::string compose_msg_( const int id ) const;
     
     public:
       UnknownNode()
         : KernelException( "UnknownNode" )
    -    , id_( -1 )
       {
       }
    -  UnknownNode( long id )
    -    : KernelException( "UnknownNode" )
    -    , id_( id )
    +
    +  UnknownNode( int id )
    +    : KernelException( compose_msg_( id ) )
       {
       }
     
    -  ~UnknownNode() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownNode";
       }
    -
    -  std::string message() const override;
     };
     
     /**
    - * 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
     {
    -  int id_;
    +  std::string compose_msg_( const int id ) const;
     
     public:
       NoThreadSiblingsAvailable()
         : KernelException( "UnknownNode" )
    -    , id_( -1 )
       {
       }
    +
       NoThreadSiblingsAvailable( int id )
    -    : KernelException( "UnknownNode" )
    -    , id_( id )
    +    : KernelException( compose_msg_( id ) )
       {
       }
     
    -  ~NoThreadSiblingsAvailable() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "NoThreadSiblingsAvailable";
       }
    -
    -  std::string message() const override;
     };
     
    -
     class LocalNodeExpected : public KernelException
     {
    -  int id_;
    +  std::string compose_msg_( const int id ) const;
     
     public:
       LocalNodeExpected( int id )
    -    : KernelException( "LocalNodeExpected" )
    -    , id_( id )
    +    : KernelException( compose_msg_( id ) )
       {
       }
     
    -  ~LocalNodeExpected() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "LocalNodeExpected";
       }
    -
    -  std::string message() const override;
     };
     
     class NodeWithProxiesExpected : public KernelException
     {
    -  int id_;
    +  std::string compose_msg_( const int id ) const;
     
     public:
       NodeWithProxiesExpected( int id )
    -    : KernelException( "NodeWithProxiesExpected" )
    -    , id_( id )
    +    : KernelException( compose_msg_( id ) )
       {
       }
     
    -  ~NodeWithProxiesExpected() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "NodeWithProxiesExpected";
       }
    -
    -  std::string message() const override;
     };
     
    -/**
    - * 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
     {
    -  long compartment_idx_;
    -  std::string info_;
    +  std::string compose_msg_( const long compartment_idx, const std::string info ) const;
     
     public:
       UnknownCompartment( long compartment_idx, std::string info )
    -    : KernelException( "UnknownCompartment" )
    -    , compartment_idx_( compartment_idx )
    -    , info_( info )
    +    : KernelException( compose_msg_( compartment_idx, info ) )
       {
       }
     
    -  ~UnknownCompartment() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownCompartment";
       }
    -  std::string message() const override;
     };
     
    -
     /**
      * Exception to be thrown if the specified
      * receptor type does not exist in the node.
      */
    -
     class UnknownReceptorType : public KernelException
     {
    -  long receptor_type_;
    -  std::string name_;
    +  std::string compose_msg_( const long receptor_type, const std::string name ) const;
     
     public:
       UnknownReceptorType( long receptor_type, std::string name )
    -    : KernelException( "UnknownReceptorType" )
    -    , receptor_type_( receptor_type )
    -    , name_( name )
    +    : KernelException( compose_msg_( receptor_type, name ) )
       {
       }
     
    -  ~UnknownReceptorType() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownReceptorType";
       }
    -  std::string message() const override;
     };
     
     /**
      * Exception to be thrown if the specified
      * receptor type does not accept the event type.
      */
    -
     class IncompatibleReceptorType : public KernelException
     {
    -  long receptor_type_;
    -  std::string name_;
    -  std::string event_type_;
    +  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 )
    -    : KernelException( "IncompatibleReceptorType" )
    -    , receptor_type_( receptor_type )
    -    , name_( name )
    -    , event_type_( event )
    +  IncompatibleReceptorType( long receptor_type, std::string name, std::string event_type )
    +    : KernelException( compose_msg( receptor_type, name, event_type ) )
       {
       }
     
    -  ~IncompatibleReceptorType() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "IncompatibleReceptorType";
       }
    -  std::string message() const override;
     };
     
     /**
    @@ -390,33 +463,29 @@ class IncompatibleReceptorType : public KernelException
      */
     class UnknownPort : public KernelException
     {
    -  int id_;
    -  std::string info_;
    +  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( "UnknownPort" )
    -    , id_( id )
    -    , info_( "" )
    +    : KernelException( compose_msg_( id ) )
       {
       }
    -  UnknownPort( int id, std::string info )
    -    : KernelException( "UnknownPort" )
    -    , id_( id )
    -    , info_( info )
    +
    +  UnknownPort( int id, std::string msg )
    +    : KernelException( compose_msg_( id, msg ) )
       {
       }
     
    -  ~UnknownPort() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnknownPort";
       }
    -
    -  std::string message() const override;
     };
     
     /**
      * 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
    @@ -425,57 +494,59 @@ 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 )
       {
       }
     
    -  ~IllegalConnection() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "IllegalConnection";
       }
    -
    -  std::string message() const override;
    -
    -private:
    -  std::string msg_;
     };
     
     /**
    - * 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;
       }
     
    -  ~InexistentConnection() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    -
    -  std::string message() const override;
    +    return msg_.data();
    +  };
     
    -private:
    -  std::string msg_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "InexistentConnection";
    +  }
     };
     
     /**
    @@ -484,20 +555,27 @@ 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 );
       }
     
    -  ~UnknownThread() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "UnknownThread";
    +  }
     };
     
     /**
    @@ -507,53 +585,69 @@ 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 );
       }
     
    -  ~BadDelay() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BadDelay";
    +  }
     };
     
     /**
      * 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;
       }
     
    -  ~UnexpectedEvent() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    -
    -private:
    -  std::string msg_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "UnexpectedEvent";
    +  }
     };
     
     
    @@ -565,26 +659,30 @@ class UnexpectedEvent : public KernelException
      */
     class UnsupportedEvent : public KernelException
     {
    +  std::string compose_msg_() const;
    +
     public:
       UnsupportedEvent()
    -    : KernelException( "UnsupportedEvent" )
    +    : KernelException( compose_msg_() )
       {
       }
     
    -  ~UnsupportedEvent() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "UnsupportedEvent";
       }
    -  std::string message() const override;
     };
     
     /**
    - * 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:
    @@ -600,21 +698,28 @@ class BadProperty : public KernelException
       {
       }
     
    -  ~BadProperty() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BadProperty";
    +  }
     };
     
     /**
    - * 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:
    @@ -630,54 +735,93 @@ class BadParameter : public KernelException
       {
       }
     
    -  ~BadParameter() throw() override
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BadParameter";
    +  }
    +};
    +
    +/**
    + * 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 override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BadParameterValue";
    +  }
     };
     
     /**
    - * 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_ = "Dimensions of two or more variables do not match.";
       }
     
       DimensionMismatch( int expected, int provided )
         : KernelException( "DimensionMismatch" )
    -    , expected_( expected )
    -    , provided_( provided )
       {
    +    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
    +  {
    +    return msg_.data();
    +  };
     
    -  ~DimensionMismatch() throw() override
    +  std::string
    +  exception_name() const override
       {
    +    return "DimensionMismatch";
       }
    -
    -  std::string message() const override;
     };
     
     /**
    @@ -692,23 +836,26 @@ class DistributionError : public KernelException
         : KernelException( "DistributionError" )
       {
       }
    -  ~DistributionError() throw() override
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "DistributionError";
       }
    -
    -  std::string message() const override;
     };
     
     /**
    - * 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
    @@ -717,28 +864,32 @@ 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 )
    -    , val_( value )
    -  {
    -  }
    -  ~InvalidDefaultResolution() throw() override
       {
    +    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";
    +
    +    msg_ = oss.str();
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const Name prop_;
    -  const Time val_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "InvalidDefaultResolution";
    +  }
     };
     
     /**
      * 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
    @@ -746,6 +897,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
    @@ -754,23 +908,28 @@ 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 )
    -    , val_( value )
    -  {
    -  }
    -  ~InvalidTimeInModel() throw() override
       {
    +    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!";
    +
    +    msg_ = oss.str();
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const Name prop_;
    -  const Time val_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "InvalidTimeInModel";
    +  }
     };
     
     /**
    @@ -780,6 +939,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
    @@ -788,23 +950,27 @@ 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 )
    -    , val_( value )
    -  {
    -  }
    -  ~StepMultipleRequired() throw() override
       {
    +    std::ostringstream oss;
    +    oss << "The time property " << property << " = " << value << " of model " << model
    +        << " must be a multiple of the resolution " << Time::get_resolution() << ".";
    +
    +    msg_ = oss.str();
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const Name prop_;
    -  const Time val_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "StepMultipleRequired";
    +  }
     };
     
     /**
    @@ -814,6 +980,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
    @@ -825,30 +994,30 @@ 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 )
    -    , prop_a_( name_a )
    -    , val_a_( value_a )
    -    , prop_b_( name_b )
    -    , val_b_( value_b )
    -  {
    -  }
    -  ~TimeMultipleRequired() throw() override
       {
    +    std::ostringstream oss;
    +    oss << "In model " << model << ", the time property " << name_a << " = " << value_a
    +        << " must be multiple of time property " << name_b << " = " << value_b << '.';
    +
    +    msg_ = oss.str();
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const Name prop_a_;
    -  const Time val_a_;
    -  const Name prop_b_;
    -  const Time val_b_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "TimeMultipleRequired";
    +  }
     };
     
     /**
    @@ -857,6 +1026,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
    @@ -866,19 +1038,25 @@ class GSLSolverFailure : public KernelException
        */
       GSLSolverFailure( const std::string& model, const int status )
         : KernelException( "GSLSolverFailure" )
    -    , model_( model )
    -    , status_( status )
    -  {
    -  }
    -  ~GSLSolverFailure() throw() override
       {
    +    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 );
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const int status_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "GSLSolverFailure";
    +  }
     };
     
     /**
    @@ -887,6 +1065,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
    @@ -895,17 +1076,110 @@ 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 );
       }
    -  ~NumericalInstability() throw() override
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "NumericalInstability";
       }
    +};
    +
    +/**
    + * 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
    +{
    +private:
    +  std::string msg_;
    +
    +public:
    +  NamingConflict( const std::string& msg )
    +    : KernelException( "NamingConflict" )
    +    , msg_( msg )
    +  {
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
    +  {
    +    return "NamingConflict";
    +  }
    +};
    +
    +/**
    + * Exception to be thrown if a given array has the wrong size.
    + * @ingroup KernelExceptions
    + */
    +class RangeCheck : public KernelException
    +{
    +private:
    +  std::string msg_;
    +
    +public:
    +  RangeCheck( const size_t expected_size )
    +    : KernelException( "RangeCheck" )
    +    , msg_( String::compose( "Array with length %1 expected.", expected_size ) )
    +  {
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "RangeCheck";
    +  }
    +};
     
    +/**
    + * Exception to be thrown if an error occured in an I/O operation.
    + * @ingroup KernelExceptions
    + */
    +class IOError : public KernelException
    +{
     private:
    -  const std::string model_;
    +  std::string msg_;
    +
    +public:
    +  IOError()
    +    : KernelException( "IOError" )
    +  {
    +    msg_ = "";
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
    +  {
    +    return "IOError";
    +  }
     };
     
     /**
    @@ -915,23 +1189,31 @@ class NumericalInstability : public KernelException
      */
     class KeyError : public KernelException
     {
    -  const Name key_;
    -  const std::string map_type_;
    -  const std::string map_op_;
    +private:
    +  std::string msg_;
     
     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 )
    -    , 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 );
       }
     
    -  ~KeyError() throw() override
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "KeyError";
       }
    -  std::string message() const override;
     };
     
     /**
    @@ -940,29 +1222,35 @@ class KeyError : public KernelException
      */
     class InternalError : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
       //! @param detailed error message
       InternalError()
    -    : KernelException( "InternalError" )
    -    , msg_()
    +    : KernelException()
    +    , msg_( "InternalError" )
       {
       }
    +
       InternalError( std::string msg )
    -    : KernelException( "InternalError" )
    -    , msg_( msg )
    +    : KernelException( msg )
       {
       }
     
    -  ~InternalError() throw() override
    +  const char*
    +  what() const noexcept override
       {
    -  }
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "InternalError";
    +  }
     };
     
    -
     #ifdef HAVE_MUSIC
     /**
      * Exception to be thrown if a music_event_out_proxy is generated, but the music
    @@ -971,6 +1259,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
    @@ -980,21 +1271,28 @@ class MUSICPortUnconnected : public KernelException
        */
       MUSICPortUnconnected( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortUnconnected" )
    -    , model_( model )
    -    , portname_( portname )
    -  {
    -  }
    -  ~MUSICPortUnconnected() throw()
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 is unconnected.",
    +      model,
    +      portname );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICPortUnconnected";
    +  }
     };
     
    +
     /**
      * Exception to be thrown if a music_event_out_proxy is generated, but the
      * music port has no width.
    @@ -1002,31 +1300,39 @@ 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 )
    -  {
    -  }
    -  ~MUSICPortHasNoWidth() throw()
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 has no width specified in configuration file.",
    +      model,
    +      portname );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICPortHasNoWidth";
    +  }
     };
     
    -
     /**
      * Exception to be thrown if the user tries to change the name of an already
      * published port.
    @@ -1034,27 +1340,37 @@ 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 )
    -  {
    -  }
    -  ~MUSICPortAlreadyPublished() throw()
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 cannot change the MUSIC "
    +      "port / establish connections %2 since it is already published.",
    +      model,
    +      portname );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICPortAlreadyPublished";
    +  }
     };
     
     /**
    @@ -1064,6 +1380,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
    @@ -1072,20 +1391,26 @@ class MUSICSimulationHasRun : public KernelException
        */
       MUSICSimulationHasRun( const std::string& model )
         : KernelException( "MUSICSimulationHasRun" )
    -    , model_( model )
    -  {
    -  }
    -  ~MUSICSimulationHasRun() throw()
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 won't work, since the simulation "
    +      "has already been running",
    +      model );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string model_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICSimulationHasRun";
    +  }
     };
     
    -
     /**
      * Exception to be thrown if the user tries to map a channel that exceeds the
      * width of the MUSIC port.
    @@ -1093,29 +1418,39 @@ 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 )
    -  {
    -  }
    -  ~MUSICChannelUnknown() throw()
       {
    +    msg_ = String::compose(
    +      "The port %1 cannot be mapped in %2 because the channel %3 "
    +      "does not exist.",
    +      portname,
    +      model,
    +      channel );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICChannelUnknown";
    +  }
     };
     
     /**
    @@ -1125,20 +1460,30 @@ 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 )
    -  {
    -  }
    -  ~MUSICPortUnknown() throw()
       {
    +    msg_ = String::compose( "The port %1 does not exist.", portname );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string portname_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICPortUnknown";
    +  }
     };
     
     /**
    @@ -1148,152 +1493,264 @@ class MUSICPortUnknown : public KernelException
      */
     class MUSICChannelAlreadyMapped : 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
        */
       MUSICChannelAlreadyMapped( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelAlreadyMapped" )
    -    , portname_( portname )
    -    , channel_( channel )
    -    , model_( model )
    -  {
    -  }
    -  ~MUSICChannelAlreadyMapped() throw()
       {
    +    msg_ = String::compose(
    +      "The channel %1 of port %2 has already be mapped "
    +      "to another proxy in %3.",
    +      channel,
    +      portname,
    +      model );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MUSICChannelAlreadyMapped";
    +  }
     };
    -
    -#endif
    +#endif // HAVE_MUSIC
     
     #ifdef HAVE_MPI
     class MPIPortsFileUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       explicit MPIPortsFileUnknown( const size_t 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 );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const size_t node_id_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MPIPortsUnknown";
    +  }
     };
     
    -class MPIErrorCode : public KernelException
    +class MPIPortsFileMissing : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
    -  explicit MPIErrorCode( const int error_code )
    -    : error_code_( error_code )
    +  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 );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  int error_code_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MPIPortsFileMissing";
    +  }
     };
     
    -class MPIPortsFileMissing : public KernelException
    +class MPIErrorCode : public KernelException
     {
    +private:
    +  std::string msg_;
    +  std::string error_;
    +  char errmsg_[ 2 * MPI_MAX_ERROR_STRING ]; // Multiply by two for extra safety
    +  int len_;
    +
     public:
    -  explicit MPIPortsFileMissing( const size_t node_id, const std::string path )
    -    : node_id_( node_id )
    -    , path_( path )
    +  explicit MPIErrorCode( const int error_code )
       {
    +    MPI_Error_string( error_code, errmsg_, &len_ );
    +    error_.assign( errmsg_, len_ );
    +    msg_ = String::compose( "MPI Error: %1", error_ );
       }
     
    -  std::string message() const;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const size_t node_id_;
    -  const std::string path_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "MPIErrorCode";
    +  }
     };
    -#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 );
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const int current_step_;
    -  const int total_steps_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "UnmatchedSteps";
    +  }
     };
     
     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
    +  {
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BackendPrepared";
    +  }
    +};
     
    +class BackendAlreadyRegistered : public KernelException
    +{
     private:
       const std::string backend_;
    -};
    +  std::string msg_;
     
    -class BackendNotPrepared : public KernelException
    -{
     public:
    -  BackendNotPrepared( const std::string& backend )
    -    : backend_( backend )
    +  BackendAlreadyRegistered( const std::string& backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( backend )
       {
    +    msg_ = String::compose( "Backend %1 has already been registered.", backend_ );
       }
     
    -  BackendNotPrepared( std::string&& backend )
    -    : backend_( std::move( backend ) )
    +  BackendAlreadyRegistered( std::string&& backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( std::move( backend ) )
       {
    +    msg_ = String::compose( "Backend %1 has already been registered.", backend_ );
       }
     
    -  std::string message() const override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     
    -private:
    -  const std::string backend_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BackendAlreadyRegistered";
    +  }
     };
     
    -class BackendAlreadyRegistered : public KernelException
    +
    +class BackendNotPrepared : public KernelException
     {
    +private:
    +  const std::string backend_;
    +  std::string msg_;
    +
     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
    +  {
    +    return msg_.data();
    +  };
     
    -  std::string message() const override;
    -
    -private:
    -  const std::string backend_;
    +  std::string
    +  exception_name() const override
    +  {
    +    return "BackendNotPrepared";
    +  }
     };
     
     class LayerExpected : public KernelException
    @@ -1303,11 +1760,12 @@ class LayerExpected : public KernelException
         : KernelException( "LayerExpected" )
       {
       }
    -  ~LayerExpected() throw() override
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "LayerExpected";
       }
    -
    -  std::string message() const override;
     };
     
     class LayerNodeExpected : public KernelException
    @@ -1317,13 +1775,38 @@ class LayerNodeExpected : public KernelException
         : KernelException( "LayerNodeExpected" )
       {
       }
    -  ~LayerNodeExpected() throw() override
    +
    +  std::string
    +  exception_name() const override
       {
    +    return "LayerNodeExpected";
       }
    +};
     
    -  std::string message() const override;
    +class UndefinedName : public KernelException
    +{
    +private:
    +  std::string msg_;
    +
    +public:
    +  UndefinedName( std::string name )
    +    : KernelException( "UndefinedName" )
    +  {
    +    msg_ = String::compose( "The name %1 is not defined.", name );
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +
    +  std::string
    +  exception_name() const override
    +  {
    +    return "UndefinedName";
    +  }
     };
     
     } // namespace nest
    -
    -#endif
    +#endif // EXCEPTIONS_H
    diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h
    index 40b1c972cc..9ed5f16004 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"
    @@ -49,8 +47,8 @@ class FreeLayer : public Layer< D >
     {
     public:
       Position< D > get_position( size_t sind ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum&, NodeCollection const* ) const override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary&, NodeCollection const* const ) const override;
     
     protected:
       /**
    @@ -113,7 +111,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 );
     
    @@ -135,21 +133,20 @@ FreeLayer< D >::set_status( const DictionaryDatum& d )
         } );
     
       // Read positions from dictionary
    -  if ( d->known( names::positions ) )
    +  if ( d.known( names::positions ) )
       {
    -    const Token& tkn = d->lookup( names::positions );
    -    if ( tkn.is_a< TokenArray >() )
    +    const auto positions = d.at( names::positions );
    +    if ( is_type< std::vector< std::vector< double > > >( positions ) )
         {
    -      TokenArray pos = getValue< TokenArray >( tkn );
    -
           positions_.clear();
           positions_.reserve( num_local_nodes_ );
     
           auto nc_it = this->node_collection_->begin();
    -      for ( Token* it = pos.begin(); it != pos.end(); ++it, ++nc_it )
    +      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() );
    -        Position< D > point = getValue< std::vector< double > >( *it );
    +        Position< D > point = *it;
             const auto node = kernel().node_manager.get_mpi_local_node_or_device_head( ( *nc_it ).node_id );
             assert( node );
             if ( not node->is_proxy() )
    @@ -172,11 +169,10 @@ FreeLayer< D >::set_status( const DictionaryDatum& d )
           }
           assert( positions_.size() == num_local_nodes_ );
         }
    -    else if ( tkn.is_a< ParameterDatum >() )
    +    else if ( is_type< std::shared_ptr< nest::Parameter > >( positions ) )
         {
    -      auto pd = dynamic_cast< ParameterDatum* >( tkn.datum() );
    -      auto pos = dynamic_cast< DimensionParameter* >( pd->get() );
    -
    +      auto pd = d.get< ParameterPTR >( names::positions );
    +      auto pos = dynamic_cast< DimensionParameter* >( pd.get() );
           positions_.clear();
           positions_.reserve( num_local_nodes_ );
     
    @@ -215,9 +211,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 ) )
       {
    -    this->extent_ = getValue< std::vector< double > >( d, names::extent );
    +    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
    @@ -255,18 +251,18 @@ FreeLayer< D >::set_status( const DictionaryDatum& d )
     
     template < int D >
     void
    -FreeLayer< D >::get_status( DictionaryDatum& d, NodeCollection const* nc ) const
    +FreeLayer< D >::get_status( dictionary& d, NodeCollection const* const nc ) const
     {
       Layer< D >::get_status( d, nc );
     
    -  TokenArray points;
    +  std::vector< std::vector< double > > points;
     
       if ( not nc )
       {
         // This is needed by NodeCollectionMetadata::operator==() which does not have access to the node collection
         for ( const auto& pos : positions_ )
         {
    -      points.push_back( pos.getToken() );
    +      points.emplace_back( pos.get_vector() );
         }
       }
       else
    @@ -286,16 +282,16 @@ FreeLayer< D >::get_status( DictionaryDatum& d, NodeCollection const* nc ) const
           // to get right indices into positions_, which has only rank-local data.
           const size_t n_procs = kernel().mpi_manager.get_num_processes();
           size_t pos_idx = ( *nc_it ).nc_index / n_procs;
    -      size_t step = nc_it.get_step_size() / n_procs;
    +      const size_t step = nc_it.get_step_size() / n_procs;
     
           for ( ; nc_it < nc->end(); pos_idx += step, ++nc_it )
           {
    -        points.push_back( positions_.at( pos_idx ).getToken() );
    +        points.emplace_back( positions_.at( pos_idx ).get_vector() );
           }
         }
       }
     
    -  def2< TokenArray, ArrayDatum >( d, names::positions, points );
    +  d[ names::positions ] = points;
     }
     
     template < int D >
    @@ -365,7 +361,7 @@ void
     FreeLayer< D >::insert_global_positions_ntree_( Ntree< D, size_t >& tree, NodeCollectionPTR node_collection )
     {
     
    -  communicate_positions_( std::inserter( tree, tree.end() ), node_collection );
    +  communicate_positions_( std::back_inserter( tree ), node_collection );
     }
     
     // Helper function to compare node IDs used for sorting (Position,node ID) pairs
    diff --git a/nestkernel/generic_factory.h b/nestkernel/generic_factory.h
    index 1df0f1483f..32ea4151d6 100644
    --- a/nestkernel/generic_factory.h
    +++ b/nestkernel/generic_factory.h
    @@ -27,10 +27,12 @@
     #include <map>
     
     // Includes from nestkernel:
    +#include "generic_factory.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +// Includes from nestutil:
    +#include "dictionary.h"
    +
     
     namespace nest
     {
    @@ -49,8 +51,8 @@ template < class BaseT >
     class GenericFactory
     {
     public:
    -  typedef BaseT* ( *CreatorFunction )( const DictionaryDatum& d );
    -  typedef std::map< Name, CreatorFunction > AssocMap;
    +  typedef BaseT* ( *CreatorFunction )( const dictionary& d );
    +  typedef std::map< std::string, CreatorFunction > AssocMap;
     
       /**
        * Factory function.
    @@ -58,68 +60,68 @@ 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 std::string& name, const dictionary& d ) const;
     
       /**
        * 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.
        */
       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.
        * @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 );
    +  bool register_subtype( const std::string& name, CreatorFunction creator );
     
     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 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 >
     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 a6f5ddc9cb..6041d03a3e 100644
    --- a/nestkernel/genericmodel.h
    +++ b/nestkernel/genericmodel.h
    @@ -94,8 +94,8 @@ class GenericModel : public Model
       void deprecation_warning( const std::string& ) override;
     
     private:
    -  void set_status_( DictionaryDatum ) override;
    -  DictionaryDatum get_status_() override;
    +  void set_status_( const dictionary& ) override;
    +  dictionary get_status_() override;
     
       size_t get_element_size() const override;
     
    @@ -240,17 +240,17 @@ GenericModel< ElementT >::sends_signal() const
     
     template < typename ElementT >
     void
    -GenericModel< ElementT >::set_status_( DictionaryDatum d )
    +GenericModel< ElementT >::set_status_( const 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 ] = sizeof( ElementT );
       return d;
     }
     
    diff --git a/nestkernel/grid_layer.h b/nestkernel/grid_layer.h
    index 75fc467fb5..42779a9f74 100644
    --- a/nestkernel/grid_layer.h
    +++ b/nestkernel/grid_layer.h
    @@ -26,6 +26,9 @@
     // Includes from spatial:
     #include "layer.h"
     
    +// Includes from C++
    +#include <iterator>
    +
     namespace nest
     {
     
    @@ -148,8 +151,8 @@ class GridLayer : public Layer< D >
     
       Position< D, size_t > get_dims() const;
     
    -  void set_status( const DictionaryDatum& d ) override;
    -  void get_status( DictionaryDatum& d, NodeCollection const* ) const override;
    +  void set_status( const dictionary& d ) override;
    +  void get_status( dictionary& d, NodeCollection const* const ) const override;
     
     protected:
       Position< D, size_t > dims_; ///< number of nodes in each direction.
    @@ -170,11 +173,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, new_dims );
     
       size_t new_size = 1;
       for ( int i = 0; i < D; ++i )
    @@ -189,15 +192,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 ) )
       {
         Position< D > center = this->get_center();
    -    this->extent_ = getValue< std::vector< double > >( d, names::extent );
    +    this->extent_ = d.get< std::vector< double > >( names::extent );
         this->lower_left_ = center - this->extent_ / 2;
       }
    -  if ( d->known( names::center ) )
    +  if ( d.known( names::center ) )
       {
    -    this->lower_left_ = getValue< std::vector< double > >( d, names::center );
    +    this->lower_left_ = d.get< std::vector< double > >( names::center );
         this->lower_left_ -= this->extent_ / 2;
       }
     
    @@ -206,11 +209,11 @@ GridLayer< D >::set_status( const DictionaryDatum& d )
     
     template < int D >
     void
    -GridLayer< D >::get_status( DictionaryDatum& d, NodeCollection const* nc ) const
    +GridLayer< D >::get_status( dictionary& d, NodeCollection const* const nc ) const
     {
       Layer< D >::get_status( d, nc );
     
    -  ( *d )[ names::shape ] = std::vector< size_t >( dims_.get_vector() );
    +  d[ names::shape ] = std::vector< size_t >( dims_.get_vector() );
     }
     
     template < int D >
    @@ -294,9 +297,15 @@ template < int D >
     void
     GridLayer< D >::insert_global_positions_ntree_( Ntree< D, size_t >& tree, NodeCollectionPTR node_collection )
     {
    -  insert_global_positions_( std::inserter( tree, tree.end() ), 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::back_inserter( tree );
    +  insert_global_positions_( ins2, node_collection );
     }
     
    +
     template < int D >
     void
     GridLayer< D >::insert_global_positions_vector_( std::vector< std::pair< Position< D >, size_t > >& vec,
    diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h
    index 7c76c0abe4..e6b2d29a04 100644
    --- a/nestkernel/grid_mask.h
    +++ b/nestkernel/grid_mask.h
    @@ -24,16 +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 sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
    -
    -// Includes from spatial:
    -#include "mask.h"
     #include "position.h"
     
     namespace nest
    @@ -51,7 +44,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 override
    @@ -61,7 +54,7 @@ class GridMask : public AbstractMask
     
       void set_anchor( const Position< D, int >& );
     
    -  DictionaryDatum get_dict() const override;
    +  dictionary get_dict() const override;
     
       GridMask< D >*
       clone() const
    @@ -72,7 +65,7 @@ class GridMask : public AbstractMask
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
       AbstractMask*
       intersect_mask( const AbstractMask& ) const override
    @@ -110,9 +103,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 );
     
       if ( D == 2 )
       {
    @@ -129,26 +122,26 @@ GridMask< D >::GridMask( const DictionaryDatum& d )
     }
     
     template <>
    -inline Name
    +inline std::string
     GridMask< 2 >::get_name()
     {
       return names::grid;
     }
     
     template <>
    -inline Name
    +inline std::string
     GridMask< 3 >::get_name()
     {
       return names::grid3d;
     }
     
     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() ] = maskd;
     
       long shape_x = lower_right_[ 0 ] - upper_left_[ 0 ];
       long shape_y = lower_right_[ 1 ] - upper_left_[ 1 ];
    @@ -159,7 +152,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 ] = shape_dim;
     
       return d;
     }
    diff --git a/nestkernel/growth_curve.cpp b/nestkernel/growth_curve.cpp
    index 549d7d98bc..5bbea81620 100644
    --- a/nestkernel/growth_curve.cpp
    +++ b/nestkernel/growth_curve.cpp
    @@ -29,8 +29,6 @@
     #include "nest_names.h"
     #include "nest_time.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * GrowthCurveLinear
    @@ -43,16 +41,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 ] = name_;
    +  d[ names::eps ] = 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, eps_ );
     }
     
     double
    @@ -82,18 +80,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 ] = name_;
    +  d[ names::eps ] = eps_;
    +  d[ names::eta ] = 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, eps_ );
    +  d.update_value( names::eta, eta_ );
       compute_local_();
     }
     
    @@ -142,18 +140,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 ] = name_;
    +  d[ names::eps ] = eps_;
    +  d[ names::psi ] = 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, eps_ );
    +  d.update_value( names::psi, 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 9671ea0023..40faf9dc15 100644
    --- a/nestkernel/growth_curve.h
    +++ b/nestkernel/growth_curve.h
    @@ -36,8 +36,8 @@
     #include "exceptions.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +// Includes from libnestutil:
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -52,27 +52,27 @@ 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
    -  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
    @@ -132,8 +132,9 @@ class GrowthCurveLinear : public GrowthCurve
     {
     public:
       GrowthCurveLinear();
    -  void get( DictionaryDatum& d ) const override;
    -  void set( const DictionaryDatum& d ) override;
    +  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 override;
     
    @@ -221,8 +222,9 @@ class GrowthCurveGaussian : public GrowthCurve
     {
     public:
       GrowthCurveGaussian();
    -  void get( DictionaryDatum& d ) const override;
    -  void set( const DictionaryDatum& d ) override;
    +  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 override;
     
    @@ -298,8 +300,9 @@ class GrowthCurveSigmoid : public GrowthCurve
     {
     public:
       GrowthCurveSigmoid();
    -  void get( DictionaryDatum& d ) const override;
    -  void set( const DictionaryDatum& d ) override;
    +  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 override;
     
    diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp
    index 2d6bdf27e5..89fbf4054f 100644
    --- a/nestkernel/io_manager.cpp
    +++ b/nestkernel/io_manager.cpp
    @@ -51,8 +51,6 @@
     #include "recording_backend_sionlib.h"
     #endif
     
    -// Includes from sli:
    -#include "dictutils.h"
     #include <string>
     
     namespace nest
    @@ -85,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 );
    @@ -142,10 +140,10 @@ IOManager::finalize( const bool adjust_number_of_threads_or_rng_only )
     }
     
     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, tmp ) )
       {
         DIR* testdir = opendir( tmp.c_str() );
         if ( testdir )
    @@ -174,7 +172,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, tmp ) )
       {
         if ( tmp.find( '/' ) == std::string::npos )
         {
    @@ -188,47 +186,48 @@ IOManager::set_data_path_prefix_( const DictionaryDatum& dict )
     }
     
     void
    -IOManager::set_recording_backend_status( std::string recording_backend, const DictionaryDatum& d )
    +IOManager::set_recording_backend_status( std::string recording_backend, const dictionary& d )
     {
       recording_backends_[ recording_backend ]->set_status( d );
     }
     
     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, overwrite_files_ );
     }
     
    -DictionaryDatum
    +dictionary
     IOManager::get_recording_backend_status( std::string recording_backend )
     {
    -  DictionaryDatum status( new Dictionary );
    +  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;
     }
     
     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_;
    +  d[ names::data_path ] = data_path_;
    +  d[ names::data_prefix ] = data_prefix_;
    +  d[ names::overwrite_files ] = overwrite_files_;
     
    -  ArrayDatum recording_backends;
    +  std::vector< std::string > recording_backends;
       for ( const auto& it : recording_backends_ )
       {
    -    recording_backends.push_back( new LiteralDatum( it.first ) );
    +    recording_backends.push_back( it.first );
       }
    -  ( *d )[ names::recording_backends ] = recording_backends;
    +  d[ names::recording_backends ] = recording_backends;
     
    -  ArrayDatum stimulation_backends;
    +  std::vector< std::string > stimulation_backends;
       for ( const auto& it : stimulation_backends_ )
       {
    -    stimulation_backends.push_back( new LiteralDatum( it.first ) );
    +    stimulation_backends.push_back( it.first );
       }
    -  ( *d )[ names::stimulation_backends ] = stimulation_backends;
    +  d[ names::stimulation_backends ] = stimulation_backends;
     }
     
     void
    @@ -293,21 +292,19 @@ IOManager::cleanup()
     }
     
     bool
    -IOManager::is_valid_recording_backend( const Name backend_name ) const
    +IOManager::is_valid_recording_backend( const std::string& backend_name ) const
     {
    -  auto backend = recording_backends_.find( backend_name );
    -  return backend != recording_backends_.end();
    +  return recording_backends_.find( backend_name ) != 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();
    +  return stimulation_backends_.find( backend_name ) != 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,
    @@ -317,7 +314,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 std::string& backend_name, const RecordingDevice& device, const dictionary& params )
     {
       for ( auto& it : recording_backends_ )
       {
    @@ -333,14 +330,14 @@ IOManager::enroll_recorder( const Name backend_name, const RecordingDevice& devi
     }
     
     void
    -nest::IOManager::enroll_stimulator( const Name backend_name, StimulationDevice& device, const DictionaryDatum& params )
    +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_ )
         {
    @@ -364,30 +361,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 DictionaryDatum& 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, DictionaryDatum& 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,
    +IOManager::get_recording_backend_device_status( const std::string& backend_name,
       const RecordingDevice& device,
    -  DictionaryDatum& d )
    +  dictionary& d )
     {
       recording_backends_[ backend_name ]->get_device_status( device, d );
     }
    diff --git a/nestkernel/io_manager.h b/nestkernel/io_manager.h
    index ea4be311bd..99e71bdddb 100644
    --- a/nestkernel/io_manager.h
    +++ b/nestkernel/io_manager.h
    @@ -53,11 +53,11 @@ class IOManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
    -  void set_recording_backend_status( std::string, const DictionaryDatum& );
    -  DictionaryDatum get_recording_backend_status( std::string );
    +  void set_recording_backend_status( std::string, const dictionary& );
    +  dictionary get_recording_backend_status( std::string );
     
       /**
        * The prefix for files written by devices.
    @@ -105,13 +105,12 @@ class IOManager : public ManagerInterface
       void prepare() override;
     
       template < class RecordingBackendT >
    -  void register_recording_backend( Name );
    -
    +  void register_recording_backend( const std::string& );
       template < class StimulationBackendT >
    -  void register_stimulation_backend( const Name );
    +  void register_stimulation_backend( const 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;
     
       /**
        * Send device data to a given recording backend.
    @@ -130,26 +129,26 @@ class IOManager : public ManagerInterface
        * \param double_values a vector of doubles to be written
        * \param long_values a vector of longs to be written
        */
    -  void write( const Name backend_name,
    -    const RecordingDevice& device,
    -    const Event& event,
    -    const std::vector< double >& double_values,
    -    const std::vector< long >& long_values );
    +  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 DictionaryDatum& );
    -  void enroll_stimulator( const Name, StimulationDevice&, const DictionaryDatum& );
    +  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 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 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 DictionaryDatum& );
    +  void set_data_path_prefix_( const dictionary& );
     
       std::string data_path_;   //!< Path for all files written by devices
       std::string data_prefix_; //!< Prefix for all files written by devices
    @@ -158,12 +157,12 @@ 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/io_manager_impl.h b/nestkernel/io_manager_impl.h
    index 9c631b4345..76e0c236a1 100644
    --- a/nestkernel/io_manager_impl.h
    +++ b/nestkernel/io_manager_impl.h
    @@ -30,11 +30,11 @@ namespace nest
     
     template < class RecordingBackendT >
     void
    -IOManager::register_recording_backend( const Name name )
    +IOManager::register_recording_backend( const std::string& name )
     {
       if ( recording_backends_.find( name ) != recording_backends_.end() )
       {
    -    throw BackendAlreadyRegistered( name.toString() );
    +    throw BackendAlreadyRegistered( name );
       }
     
       RecordingBackendT* recording_backend = new RecordingBackendT();
    @@ -44,11 +44,11 @@ IOManager::register_recording_backend( const Name name )
     
     template < class StimulationBackendT >
     void
    -IOManager::register_stimulation_backend( const Name name )
    +IOManager::register_stimulation_backend( const std::string& name )
     {
       if ( stimulation_backends_.find( name ) != stimulation_backends_.end() )
       {
    -    throw BackendAlreadyRegistered( name.toString() );
    +    throw BackendAlreadyRegistered( name );
       }
     
       StimulationBackendT* stimulation_backend = new StimulationBackendT();
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index e31cea89b4..c7c83a799c 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -25,6 +25,121 @@
     
     nest::KernelManager* nest::KernelManager::kernel_manager_instance_ = nullptr;
     
    +
    +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 );
    +  build_info[ "exitcode" ] = EXIT_SUCCESS;
    +  build_info[ "built" ] = std::string( String::compose( "%1 %2", __DATE__, __TIME__ ) );
    +  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 );
    +  build_info[ "hostvendor" ] = std::string( NEST_HOSTVENDOR );
    +  build_info[ "hostcpu" ] = std::string( NEST_HOSTCPU );
    +
    +#ifdef _OPENMP
    +  build_info[ "have_threads" ] = true;
    +  build_info[ "threads_model" ] = std::string( "openmp" );
    +#else
    +  build_info[ "have_threads" ] = false;
    +#endif
    +
    +#ifdef HAVE_MPI
    +  build_info[ "have_mpi" ] = true;
    +  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 );
    +#else
    +  build_info[ "have_mpi" ] = false;
    +#endif
    +
    +#ifdef HAVE_GSL
    +  build_info[ "have_gsl" ] = true;
    +#else
    +  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
    +  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 HAVE_HDF5
    +  build_info[ "have_hdf5" ] = true;
    +#else
    +  build_info[ "have_hdf5" ] = 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()
     {
    @@ -183,7 +298,7 @@ nest::KernelManager::change_number_of_threads( size_t new_num_threads )
     }
     
     void
    -nest::KernelManager::set_status( const DictionaryDatum& dict )
    +nest::KernelManager::set_status( const dictionary& dict )
     {
       assert( is_initialized() );
     
    @@ -194,7 +309,7 @@ nest::KernelManager::set_status( const DictionaryDatum& dict )
     }
     
     void
    -nest::KernelManager::get_status( DictionaryDatum& dict )
    +nest::KernelManager::get_status( dictionary& dict )
     {
       assert( is_initialized() );
     
    @@ -203,6 +318,21 @@ nest::KernelManager::get_status( DictionaryDatum& dict )
         manager->get_status( 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;
    +  }
    +
       sw_omp_synchronization_construction_.get_status(
         dict, names::time_omp_synchronization_construction, names::time_omp_synchronization_construction_cpu );
       sw_omp_synchronization_simulation_.get_status(
    @@ -219,3 +349,80 @@ nest::KernelManager::write_to_dump( const std::string& msg )
         dump_ << msg << std::endl << std::flush;
       }
     }
    +
    +#ifdef __linux__
    +
    +#include <fstream>
    +#include <sstream>
    +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 abd225e836..a6f92dcb15 100644
    --- a/nestkernel/kernel_manager.h
    +++ b/nestkernel/kernel_manager.h
    @@ -42,9 +42,6 @@
     #include "sp_manager.h"
     #include "vp_manager.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     #include "compose.hpp"
     #include <fstream>
     
    @@ -172,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
     */
     
    @@ -201,6 +199,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.
    @@ -246,8 +246,8 @@ class KernelManager
        */
       void change_number_of_threads( size_t new_num_threads );
     
    -  void set_status( const DictionaryDatum& );
    -  void get_status( DictionaryDatum& );
    +  void set_status( const dictionary& );
    +  void get_status( dictionary& );
     
       void prepare();
       void cleanup();
    @@ -309,6 +309,9 @@ class KernelManager
       }
     
     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;
     
    @@ -322,6 +325,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( size_t tid )
    +{
    +  return kernel().random_manager.get_vp_synced_rng( tid );
    +}
    +
    +inline RngPtr
    +get_vp_specific_rng( size_t tid )
    +{
    +  return kernel().random_manager.get_vp_specific_rng( tid );
    +}
    +
     } // namespace nest
     
     inline nest::KernelManager&
    @@ -349,4 +370,5 @@ nest::KernelManager::get_fingerprint() const
       return fingerprint_;
     }
     
    +
     #endif /* KERNEL_MANAGER_H */
    diff --git a/nestkernel/layer.cpp b/nestkernel/layer.cpp
    index d8236b26a7..9e427d76d5 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"
    @@ -52,41 +49,40 @@ AbstractLayer::~AbstractLayer()
     }
     
     NodeCollectionPTR
    -AbstractLayer::create_layer( const DictionaryDatum& layer_dict )
    +AbstractLayer::create_layer( const dictionary& layer_dict )
     {
       size_t length = 0;
       AbstractLayer* layer_local = nullptr;
     
    -  auto element_name = getValue< std::string >( layer_dict, names::elements );
    +  auto element_name = layer_dict.get< std::string >( names::elements );
       auto element_id = kernel().model_manager.get_node_model_id( element_name );
     
    -  if ( layer_dict->known( names::positions ) )
    +  if ( layer_dict.known( names::positions ) )
       {
    -    if ( layer_dict->known( names::shape ) )
    +    if ( layer_dict.known( names::shape ) )
         {
           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 );
    +    if ( is_type< std::vector< std::vector< double > > >( 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 );
    +      length = pos.size();
    +      num_dimensions = pos[ 0 ].size();
         }
    -    else if ( tkn.is_a< ParameterDatum >() )
    +    else if ( is_type< std::shared_ptr< nest::Parameter > >( positions ) )
         {
    -      auto pd = dynamic_cast< ParameterDatum* >( tkn.datum() );
    -      auto positions = dynamic_cast< DimensionParameter* >( pd->get() );
    +      auto pd = layer_dict.get< ParameterPTR >( 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( *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 );
    +      num_dimensions = pos->get_num_dimensions();
         }
         else
         {
    @@ -111,9 +107,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 ) )
       {
    -    std::vector< long > shape = getValue< std::vector< long > >( layer_dict, names::shape );
    +    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; } ) )
         {
    diff --git a/nestkernel/layer.h b/nestkernel/layer.h
    index 7adf212118..8a827bdfdb 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"
    @@ -65,16 +63,16 @@ 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, 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( DictionaryDatum&, NodeCollection const* ) const = 0;
    +  virtual void get_status( dictionary&, NodeCollection const* const ) const = 0;
     
       virtual unsigned int get_num_dimensions() const = 0;
     
    @@ -133,7 +131,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.
    @@ -144,7 +142,7 @@ class AbstractLayer
        * @param node_collection NodeCollection of the layer
        * @returns nodes in layer inside mask.
        */
    -  virtual std::vector< size_t > get_global_nodes( const MaskDatum& mask,
    +  virtual std::vector< size_t > get_global_nodes( const MaskPTR mask,
         const std::vector< double >& anchor,
         bool allow_oversized,
         NodeCollectionPTR node_collection ) = 0;
    @@ -172,7 +170,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();
    @@ -234,10 +232,10 @@ class Layer : public AbstractLayer
        *
        * @param d Dictionary with named parameter settings.
        */
    -  void set_status( const DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
     
       //! Retrieve status, slice according to node collection if given
    -  void get_status( DictionaryDatum&, NodeCollection const* ) const override;
    +  void get_status( dictionary&, NodeCollection const* const ) const override;
     
       unsigned int
       get_num_dimensions() const override
    @@ -359,7 +357,7 @@ class Layer : public AbstractLayer
     
       std::vector< std::pair< Position< D >, size_t > >* get_global_positions_vector( NodeCollectionPTR node_collection );
     
    -  virtual std::vector< std::pair< Position< D >, size_t > > get_global_positions_vector( const MaskDatum& mask,
    +  virtual std::vector< std::pair< Position< D >, size_t > > get_global_positions_vector( const MaskPTR mask,
         const Position< D >& anchor,
         bool allow_oversized,
         NodeCollectionPTR node_collection );
    @@ -367,7 +365,7 @@ class Layer : public AbstractLayer
       /**
        * Return a vector with the node IDs of the nodes inside the mask.
        */
    -  std::vector< size_t > get_global_nodes( const MaskDatum& mask,
    +  std::vector< size_t > get_global_nodes( const MaskPTR mask,
         const std::vector< double >& anchor,
         bool allow_oversized,
         NodeCollectionPTR node_collection ) override;
    @@ -411,7 +409,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:
       /**
    @@ -468,7 +466,7 @@ class MaskedLayer
        *                        periodic b.c.
        * @param node_collection NodeCollection of the layer
        */
    -  MaskedLayer( Layer< D >& layer, const MaskDatum& mask, bool allow_oversized, NodeCollectionPTR node_collection );
    +  MaskedLayer( Layer< D >& layer, const MaskPTR mask, bool allow_oversized, NodeCollectionPTR node_collection );
     
       /**
        * Constructor for applying "converse" mask to layer.
    @@ -483,7 +481,7 @@ class MaskedLayer
        * @param node_collection NodeCollection of the layer
        */
       MaskedLayer( Layer< D >& layer,
    -    const MaskDatum& mask,
    +    const MaskPTR mask,
         bool allow_oversized,
         Layer< D >& target,
         NodeCollectionPTR node_collection );
    @@ -519,7 +517,7 @@ class MaskedLayer
       void check_mask_( Layer< D >& layer, bool allow_oversized );
     
       std::shared_ptr< Ntree< D, size_t > > ntree_;
    -  MaskDatum mask_;
    +  MaskPTR mask_;
     };
     
     inline void
    @@ -537,7 +535,7 @@ AbstractLayer::get_node_collection()
     
     template < int D >
     inline MaskedLayer< D >::MaskedLayer( Layer< D >& layer,
    -  const MaskDatum& maskd,
    +  const MaskPTR maskd,
       bool allow_oversized,
       NodeCollectionPTR node_collection )
       : mask_( maskd )
    @@ -549,7 +547,7 @@ inline MaskedLayer< D >::MaskedLayer( Layer< D >& layer,
     
     template < int D >
     inline MaskedLayer< D >::MaskedLayer( Layer< D >& layer,
    -  const MaskDatum& maskd,
    +  const MaskPTR maskd,
       bool allow_oversized,
       Layer< D >& target,
       NodeCollectionPTR node_collection )
    @@ -559,7 +557,7 @@ inline MaskedLayer< D >::MaskedLayer( Layer< D >& layer,
         target.get_periodic_mask(), target.get_lower_left(), target.get_extent(), node_collection );
     
       check_mask_( target, allow_oversized );
    -  mask_ = new ConverseMask< D >( dynamic_cast< const Mask< D >& >( *mask_ ) );
    +  mask_ = MaskPTR( new ConverseMask< D >( dynamic_cast< const Mask< D >& >( *mask_ ) ) );
     }
     
     template < int D >
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index e24f571d08..83195d6f09 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -26,8 +26,6 @@
     #include "layer.h"
     
     // Includes from nestkernel:
    -#include "booldatum.h"
    -#include "nest_datums.h"
     #include "node_collection.h"
     
     // Includes from spatial:
    @@ -79,11 +77,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 ) )
       {
    -    if ( getValue< bool >( d, names::edge_wrap ) )
    +    if ( d.get< bool >( names::edge_wrap ) )
         {
           periodic_ = ( 1 << D ) - 1; // All dimensions periodic
         }
    @@ -92,25 +90,25 @@ Layer< D >::set_status( const DictionaryDatum& d )
     
     template < int D >
     void
    -Layer< D >::get_status( DictionaryDatum& 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() );
    +  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 ] = BoolDatum( false );
    +    d[ names::edge_wrap ] = false;
       }
       else if ( periodic_.count() == D )
       {
    -    ( *d )[ names::edge_wrap ] = true;
    +    d[ names::edge_wrap ] = true;
       }
     
       if ( nc )
       {
         // 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();
       }
     }
     
    @@ -193,8 +191,8 @@ Layer< D >::do_get_global_positions_ntree_( NodeCollectionPTR node_collection )
       if ( cached_vector_md_ == node_collection->get_metadata() )
       {
         // Convert from vector to Ntree
    -
    -    typename std::insert_iterator< Ntree< D, size_t > > to = std::inserter( *cached_ntree_, cached_ntree_->end() );
    +    // 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();
               from != cached_vector_->end();
    @@ -256,7 +254,7 @@ Layer< D >::get_global_positions_vector( NodeCollectionPTR node_collection )
     
     template < int D >
     std::vector< std::pair< Position< D >, size_t > >
    -Layer< D >::get_global_positions_vector( const MaskDatum& mask,
    +Layer< D >::get_global_positions_vector( const MaskPTR mask,
       const Position< D >& anchor,
       bool allow_oversized,
       NodeCollectionPTR node_collection )
    @@ -275,7 +273,7 @@ Layer< D >::get_global_positions_vector( const MaskDatum& mask,
     
     template < int D >
     std::vector< size_t >
    -Layer< D >::get_global_nodes( const MaskDatum& mask,
    +Layer< D >::get_global_nodes( const MaskPTR mask,
       const std::vector< double >& anchor,
       bool allow_oversized,
       NodeCollectionPTR node_collection )
    @@ -308,14 +306,15 @@ void
     Layer< D >::dump_connections( std::ostream& out,
       NodeCollectionPTR node_collection,
       AbstractLayerPTR target_layer,
    -  const Token& syn_model )
    +  const std::string& syn_model )
     {
       // Find all connections for given sources, targets and synapse model
    -  DictionaryDatum conn_filter( new Dictionary );
    -  def( conn_filter, names::source, NodeCollectionDatum( node_collection ) );
    -  def( conn_filter, names::target, NodeCollectionDatum( target_layer->get_node_collection() ) );
    -  def( conn_filter, names::synapse_model, syn_model );
    -  ArrayDatum connectome = kernel().connection_manager.get_connections( conn_filter );
    +  dictionary conn_filter;
    +  conn_filter[ names::source ] = node_collection;
    +  conn_filter[ names::target ] = NodeCollectionPTR( target_layer->get_node_collection() );
    +  conn_filter[ names::synapse_model ] = syn_model;
    +
    +  const auto& connectome = kernel().connection_manager.get_connections( conn_filter );
     
       // Get positions of remote nodes
       std::vector< std::pair< Position< D >, size_t > >* src_vec = get_global_positions_vector( node_collection );
    @@ -323,9 +322,8 @@ Layer< D >::dump_connections( std::ostream& out,
       // Iterate over connectome and write every connection, looking up source position only if source neuron changes
       size_t previous_source_node_id = 0; // dummy initial value, cannot be node_id of any node
       Position< D > source_pos;           // dummy value
    -  for ( const auto& entry : connectome )
    +  for ( const auto& conn : connectome )
       {
    -    ConnectionDatum conn = getValue< ConnectionDatum >( entry );
         const size_t source_node_id = conn.get_source_node_id();
     
         // Search source_pos for source node only if it is a different node
    @@ -340,14 +338,16 @@ Layer< D >::dump_connections( std::ostream& out,
           previous_source_node_id = source_node_id;
         }
     
    -    DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( source_node_id,
    +    const dictionary result_dict = kernel().connection_manager.get_synapse_status( source_node_id,
           conn.get_target_node_id(),
           conn.get_target_thread(),
           conn.get_synapse_model_id(),
           conn.get_port() );
    -    const long target_node_id = getValue< long >( result_dict, names::target );
    -    const double weight = getValue< double >( result_dict, names::weight );
    -    const double delay = getValue< double >( result_dict, 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 );
    +
         const Layer< D >* const tgt_layer = dynamic_cast< Layer< D >* >( target_layer.get() );
         const long tnode_lid = tgt_layer->node_collection_->get_nc_index( target_node_id );
         assert( tnode_lid >= 0 );
    @@ -365,7 +365,7 @@ MaskedLayer< D >::check_mask_( Layer< D >& layer, bool allow_oversized )
     {
       if ( not mask_.get() )
       {
    -    mask_ = new AllMask< D >();
    +    mask_ = MaskPTR( new AllMask< D >() );
         return;
       }
     
    @@ -403,11 +403,11 @@ 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;
     
    -    mask_ = new BoxMask< D >( lower_left, upper_right );
    +    mask_ = MaskPTR( new BoxMask< D >( lower_left, upper_right ) );
       }
       catch ( std::bad_cast& )
       {
    diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp
    index 500290b54e..d56777ef3d 100644
    --- a/nestkernel/logging_manager.cpp
    +++ b/nestkernel/logging_manager.cpp
    @@ -29,10 +29,6 @@
     // Includes from libnestutil:
     #include "logging_event.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "sliexceptions.h"
     
     nest::LoggingManager::LoggingManager()
       : client_callbacks_()
    @@ -41,6 +37,10 @@ nest::LoggingManager::LoggingManager()
     {
     }
     
    +nest::LoggingManager::~LoggingManager()
    +{
    +}
    +
     void
     nest::LoggingManager::initialize( const bool adjust_number_of_threads_or_rng_only )
     {
    @@ -56,15 +56,15 @@ nest::LoggingManager::finalize( const bool )
     }
     
     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, dict_miss_is_error_ );
     }
     
     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 ] = dict_miss_is_error_;
     }
     
     
    @@ -123,49 +123,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
    -{
    -  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
    -{
    -  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 3dc44a3677..a64ff59fdc 100644
    --- a/nestkernel/logging_manager.h
    +++ b/nestkernel/logging_manager.h
    @@ -28,17 +28,14 @@
     #include <vector>
     
     // Includes from libnestutil:
    +#include "dictionary.h"
     #include "logging.h"
     #include "manager_interface.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     // Inclused from nestkernel:
     #include "nest_names.h"
     
    -class Dictionary;
    -
     namespace nest
     {
     
    @@ -48,11 +45,12 @@ class LoggingManager : public ManagerInterface
     {
     public:
       LoggingManager();
    +  ~LoggingManager() override;
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Register a logging client.
    @@ -87,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/manager_interface.h b/nestkernel/manager_interface.h
    index 34d7eabb5c..afb89de113 100644
    --- a/nestkernel/manager_interface.h
    +++ b/nestkernel/manager_interface.h
    @@ -26,8 +26,8 @@
     // Includes from nestkernel:
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +// Includes from libnestutil:
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -101,7 +101,7 @@ class ManagerInterface
        *
        * @see get_status()
        */
    -  virtual void set_status( const DictionaryDatum& ) = 0;
    +  virtual void set_status( const dictionary& ) = 0;
     
       /**
        * Retrieve the status of the manager
    @@ -115,7 +115,7 @@ class ManagerInterface
        *
        * @see set_status()
        */
    -  virtual void get_status( DictionaryDatum& ) = 0;
    +  virtual void get_status( dictionary& ) = 0;
     
       virtual void prepare() {};
       virtual void cleanup() {};
    diff --git a/nestkernel/mask.h b/nestkernel/mask.h
    index 33b4c20c3b..90262e2701 100644
    --- a/nestkernel/mask.h
    +++ b/nestkernel/mask.h
    @@ -23,18 +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 sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     // Includes from spatial:
     #include "position.h"
    @@ -42,8 +41,7 @@
     namespace nest
     {
     class AbstractMask;
    -
    -typedef sharedPtrDatum< AbstractMask, &NestModule::MaskType > MaskDatum;
    +using MaskPTR = std::shared_ptr< AbstractMask >;
     
     
     /**
    @@ -64,7 +62,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" );
    @@ -218,7 +216,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,
    @@ -248,14 +246,14 @@ class BoxMask : public Mask< D >
     
       Box< D > get_bbox() const override;
     
    -  DictionaryDatum get_dict() const override;
    +  dictionary get_dict() const override;
     
       Mask< D >* clone() const override;
     
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       /**
    @@ -324,7 +322,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() override
       {
    @@ -349,14 +347,14 @@ class BallMask : public Mask< D >
     
       Box< D > get_bbox() const override;
     
    -  DictionaryDatum get_dict() const override;
    +  dictionary get_dict() const override;
     
       Mask< D >* clone() const override;
     
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       Position< D > center_;
    @@ -429,7 +427,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() override
       {
    @@ -454,14 +452,14 @@ class EllipseMask : public Mask< D >
     
       Box< D > get_bbox() const override;
     
    -  DictionaryDatum get_dict() const override;
    +  dictionary get_dict() const override;
     
       Mask< D >* clone() const override;
     
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     private:
       void create_bbox_();
    @@ -710,7 +708,7 @@ class AnchoredMask : public Mask< D >
     
       Box< D > get_bbox() const;
     
    -  DictionaryDatum get_dict() const;
    +  dictionary get_dict() const;
     
       Mask< D >* clone() const;
     
    @@ -720,24 +718,24 @@ 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;
     }
     
     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 );
    +  upper_right_ = d.get< std::vector< double > >( names::upper_right );
     
       if ( not( lower_left_ < upper_right_ ) )
       {
    @@ -746,16 +744,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 ) )
       {
    -    azimuth_angle_ = getValue< double >( d, names::azimuth_angle );
    +    azimuth_angle_ = d.get< double >( names::azimuth_angle );
       }
       else
       {
         azimuth_angle_ = 0.0;
       }
     
    -  if ( d->known( names::polar_angle ) )
    +  if ( d.known( names::polar_angle ) )
       {
         if ( D == 2 )
         {
    @@ -763,7 +761,7 @@ BoxMask< D >::BoxMask( const DictionaryDatum& d )
             "nest::BoxMask<D>: "
             "polar_angle not defined in 2D." );
         }
    -    polar_angle_ = getValue< double >( d, names::polar_angle );
    +    polar_angle_ = d.get< double >( names::polar_angle );
       }
       else
       {
    @@ -881,23 +879,23 @@ 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;
     }
     
     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 );
       if ( radius_ <= 0 )
       {
         throw BadProperty(
    @@ -905,31 +903,31 @@ BallMask< D >::BallMask( const DictionaryDatum& d )
           "radius > 0 required." );
       }
     
    -  if ( d->known( names::anchor ) )
    +  if ( d.known( names::anchor ) )
       {
    -    center_ = getValue< std::vector< double > >( d, names::anchor );
    +    center_ = d.get< std::vector< double > >( names::anchor );
       }
     }
     
     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;
     }
     
     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 );
    +  minor_axis_ = d.get< double >( names::minor_axis );
       if ( major_axis_ <= 0 or minor_axis_ <= 0 )
       {
         throw BadProperty(
    @@ -946,7 +944,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 ) )
       {
         if ( D == 2 )
         {
    @@ -954,7 +952,7 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d )
             "nest::EllipseMask<D>: "
             "polar_axis not defined in 2D." );
         }
    -    polar_axis_ = getValue< double >( d, names::polar_axis );
    +    polar_axis_ = d.get< double >( names::polar_axis );
     
         if ( polar_axis_ <= 0 )
         {
    @@ -971,21 +969,21 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d )
         z_scale_ = 0.0;
       }
     
    -  if ( d->known( names::anchor ) )
    +  if ( d.known( names::anchor ) )
       {
    -    center_ = getValue< std::vector< double > >( d, names::anchor );
    +    center_ = d.get< std::vector< double > >( names::anchor );
       }
     
    -  if ( d->known( names::azimuth_angle ) )
    +  if ( d.known( names::azimuth_angle ) )
       {
    -    azimuth_angle_ = getValue< double >( d, names::azimuth_angle );
    +    azimuth_angle_ = d.get< double >( names::azimuth_angle );
       }
       else
       {
         azimuth_angle_ = 0.0;
       }
     
    -  if ( d->known( names::polar_angle ) )
    +  if ( d.known( names::polar_angle ) )
       {
         if ( D == 2 )
         {
    @@ -993,7 +991,7 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d )
             "nest::EllipseMask<D>: "
             "polar_angle not defined in 2D." );
         }
    -    polar_angle_ = getValue< double >( d, names::polar_angle );
    +    polar_angle_ = d.get< double >( names::polar_angle );
       }
       else
       {
    diff --git a/nestkernel/mask_impl.h b/nestkernel/mask_impl.h
    index d62bab2e58..6100df7658 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() ] = maskd;
    +  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;
     }
     
    @@ -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;
    +  maskd[ names::radius ] = radius_;
    +  maskd[ names::anchor ] = center_.get_vector();
    +  d[ get_name() ] = maskd;
       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;
    +  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;
     }
     
    @@ -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 ] = anchor_.get_vector();
       return d;
     }
     
    diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp
    index 08d2a342a3..00549b5960 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
     {
    @@ -105,7 +103,7 @@ Model::mem_capacity()
     }
     
     void
    -Model::set_status( DictionaryDatum d )
    +Model::set_status( const dictionary& d )
     {
       try
       {
    @@ -113,14 +111,14 @@ Model::set_status( DictionaryDatum 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() ) );
       }
     }
     
    -DictionaryDatum
    +dictionary
     Model::get_status()
     {
    -  DictionaryDatum d = get_status_();
    +  dictionary d = get_status_();
     
       std::vector< long > tmp( memory_.size() );
       for ( size_t t = 0; t < tmp.size(); ++t )
    @@ -128,24 +126,24 @@ Model::get_status()
         tmp[ t ] = memory_[ t ].size();
       }
     
    -  ( *d )[ names::instantiations ] = Token( tmp );
    -  ( *d )[ names::type_id ] = LiteralDatum( kernel().model_manager.get_node_model( type_id_ )->get_name() );
    +  d[ names::instantiations ] = tmp;
    +  d[ names::type_id ] = kernel().model_manager.get_node_model( type_id_ )->get_name();
     
       for ( size_t t = 0; t < tmp.size(); ++t )
       {
         tmp[ t ] = memory_[ t ].capacity();
       }
     
    -  ( *d )[ names::capacity ] = Token( tmp );
    +  d[ names::capacity ] = tmp;
     
       for ( size_t t = 0; t < tmp.size(); ++t )
       {
         tmp[ t ] = memory_[ t ].capacity() - memory_[ t ].size();
       }
     
    -  ( *d )[ names::available ] = Token( tmp );
    +  d[ names::available ] = tmp;
     
    -  ( *d )[ names::model ] = LiteralDatum( get_name() );
    +  d[ names::model ] = get_name();
       return d;
     }
     
    diff --git a/nestkernel/model.h b/nestkernel/model.h
    index 19372e9a6a..8a9b6aa2a2 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
     {
    @@ -142,7 +140,7 @@ class Model
        * @param d Dictionary with named parameter settings.
        * @ingroup status_interface
        */
    -  void set_status( DictionaryDatum );
    +  void set_status( const dictionary& );
     
       /**
        * Export properties of the prototype node by setting
    @@ -151,7 +149,7 @@ class Model
        * @param d Dictionary.
        * @ingroup status_interface
        */
    -  DictionaryDatum get_status();
    +  dictionary get_status();
     
       virtual size_t send_test_event( Node&, size_t, synindex, bool ) = 0;
     
    @@ -214,9 +212,9 @@ class Model
       }
     
     private:
    -  virtual void set_status_( DictionaryDatum ) = 0;
    +  virtual void set_status_( const 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 a656285f13..7669639582 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -24,11 +24,13 @@
     
     // C++ includes:
     #include <algorithm>
    +#include <iomanip>
     #include <iostream>
     #include <vector>
     
     // Includes from libnestutil:
     #include "compose.hpp"
    +#include "dictionary.h"
     
     // Includes from nestkernel:
     #include "connector_model_impl.h"
    @@ -48,8 +50,8 @@ namespace nest
     ModelManager::ModelManager()
       : node_models_()
       , connection_models_()
    -  , modeldict_( new Dictionary )
    -  , synapsedict_( new Dictionary )
    +  , modeldict_()
    +  , synapsedict_()
       , proxynode_model_( nullptr )
       , proxy_nodes_()
       , model_defaults_modified_( false )
    @@ -108,50 +110,47 @@ ModelManager::get_num_connection_models() const
     }
     
     void
    -ModelManager::set_status( const DictionaryDatum& )
    +ModelManager::set_status( const dictionary& )
     {
     }
     
     void
    -ModelManager::get_status( DictionaryDatum& dict )
    +ModelManager::get_status( dictionary& dict )
     {
    -  ArrayDatum node_models;
    -  for ( auto const& element : *modeldict_ )
    +  std::vector< std::string > node_models;
    +  for ( auto const& element : modeldict_ )
       {
    -    node_models.push_back( new LiteralDatum( element.first ) );
    +    node_models.push_back( element.first );
       }
    -  def< ArrayDatum >( dict, names::node_models, node_models );
    +  dict[ names::node_models ] = node_models;
     
    -  ArrayDatum synapse_models;
    -  for ( auto const& element : *synapsedict_ )
    +  std::vector< std::string > synapse_models;
    +  for ( auto const& element : synapsedict_ )
       {
    -    synapse_models.push_back( new LiteralDatum( element.first ) );
    +    synapse_models.push_back( element.first );
       }
    -  def< ArrayDatum >( dict, names::synapse_models, synapse_models );
    +  dict[ names::synapse_models ] = synapse_models;
     
       // 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 ] = MAX_SYN_ID + 1;
     }
     
     void
    -ModelManager::copy_model( Name old_name, Name new_name, DictionaryDatum 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 ) )
    +  if ( modeldict_.known( new_name ) or synapsedict_.known( new_name ) )
       {
         throw NewModelNameExists( new_name );
       }
     
    -  const Token oldnodemodel = modeldict_->lookup( old_name );
    -  const Token oldsynmodel = synapsedict_->lookup( old_name );
    -
    -  if ( not oldnodemodel.empty() )
    +  if ( modeldict_.known( old_name ) )
       {
    -    const size_t old_id = static_cast< size_t >( oldnodemodel );
    +    const size_t old_id = modeldict_.get< size_t >( old_name );
         copy_node_model_( old_id, new_name, params );
       }
    -  else if ( not oldsynmodel.empty() )
    +  else if ( synapsedict_.known( old_name ) )
       {
    -    const size_t old_id = static_cast< size_t >( oldsynmodel );
    +    const size_t old_id = synapsedict_.get< size_t >( old_name );
         copy_connection_model_( old_id, new_name, params );
       }
       else
    @@ -173,7 +172,7 @@ ModelManager::register_node_model_( Model* model )
       model->set_threads();
     
       node_models_.push_back( model );
    -  modeldict_->insert( name, id );
    +  modeldict_[ name ] = id;
     
     #pragma omp parallel
       {
    @@ -185,17 +184,17 @@ ModelManager::register_node_model_( Model* model )
     }
     
     void
    -ModelManager::copy_node_model_( const size_t old_id, Name new_name, DictionaryDatum 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" );
     
    -  Model* new_model = old_model->clone( new_name.toString() );
    +  Model* new_model = old_model->clone( new_name );
       const size_t new_id = node_models_.size();
       new_model->set_model_id( new_id );
     
       node_models_.push_back( new_model );
    -  modeldict_->insert( new_name, new_id );
    +  modeldict_[ new_name ] = new_id;
     
       set_node_defaults_( new_id, params );
     
    @@ -207,7 +206,7 @@ ModelManager::copy_node_model_( const size_t old_id, Name new_name, DictionaryDa
     }
     
     void
    -ModelManager::copy_connection_model_( const size_t old_id, Name new_name, DictionaryDatum params )
    +ModelManager::copy_connection_model_( const size_t old_id, const std::string& new_name, const dictionary& params )
     {
       kernel().vp_manager.assert_single_threaded();
     
    @@ -220,14 +219,13 @@ ModelManager::copy_connection_model_( const size_t old_id, Name new_name, Dictio
         LOG( M_ERROR, "ModelManager::copy_connection_model_", msg );
         throw KernelException( "Synapse model count exceeded" );
       }
    -  synapsedict_->insert( new_name, new_id );
     
    +  synapsedict_[ new_name ] = new_id;
     
     #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();
       }
    @@ -237,21 +235,18 @@ ModelManager::copy_connection_model_( const size_t old_id, Name new_name, Dictio
     
     
     bool
    -ModelManager::set_model_defaults( Name name, DictionaryDatum params )
    +ModelManager::set_model_defaults( const std::string& name, const dictionary& params )
     {
    -  const Token nodemodel = modeldict_->lookup( name );
    -  const Token synmodel = synapsedict_->lookup( name );
    -
       size_t id;
    -  if ( not nodemodel.empty() )
    +  if ( modeldict_.known( name ) )
       {
    -    id = static_cast< size_t >( nodemodel );
    +    id = modeldict_.get< size_t >( name );
         set_node_defaults_( id, params );
         return true;
       }
    -  else if ( not synmodel.empty() )
    +  else if ( synapsedict_.known( name ) )
       {
    -    id = static_cast< size_t >( synmodel );
    +    id = synapsedict_.get< synindex >( name );
         set_synapse_defaults_( id, params );
         return true;
       }
    @@ -263,23 +258,24 @@ ModelManager::set_model_defaults( Name name, DictionaryDatum params )
     
     
     void
    -ModelManager::set_node_defaults_( size_t model_id, const DictionaryDatum& params )
    +ModelManager::set_node_defaults_( size_t model_id, const dictionary& params )
     {
    -  params->clear_access_flags();
    +  params.init_access_flags();
     
       get_node_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" );
       model_defaults_modified_ = true;
     }
     
     void
    -ModelManager::set_synapse_defaults_( size_t model_id, const DictionaryDatum& params )
    +ModelManager::set_synapse_defaults_( size_t model_id, const dictionary& params )
     {
    -  params->clear_access_flags();
    +  params.init_access_flags();
    +
       assert_valid_syn_id( model_id, kernel().vp_manager.get_thread_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.
    @@ -291,60 +287,55 @@ ModelManager::set_synapse_defaults_( size_t model_id, const DictionaryDatum& par
         {
           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 );
         }
       }
     
    -  ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_synapse_defaults_", "Unread dictionary entries: " );
    +  params.all_entries_accessed( "ModelManager::set_synapse_defaults_", "params" );
       model_defaults_modified_ = true;
     }
     
     size_t
    -ModelManager::get_node_model_id( const Name name ) const
    +ModelManager::get_node_model_id( const std::string model_name ) const
     {
    -  const Name model_name( name );
    -  for ( int i = 0; i < static_cast< int >( node_models_.size() ); ++i )
    +  if ( modeldict_.known( model_name ) )
       {
    -    assert( node_models_[ i ] );
    -    if ( model_name == node_models_[ i ]->get_name() )
    -    {
    -      return i;
    -    }
    +    return modeldict_.get< size_t >( model_name );
       }
     
       throw UnknownModelName( model_name );
    -  return 0; // supress missing return value warning; never reached
     }
     
     size_t
     ModelManager::get_synapse_model_id( std::string model_name )
     {
    -  const Token synmodel = synapsedict_->lookup( model_name );
    -  if ( synmodel.empty() )
    +  if ( synapsedict_.known( model_name ) )
       {
    -    throw UnknownSynapseType( model_name );
    +    return synapsedict_.get< synindex >( model_name );
       }
    -  return static_cast< size_t >( synmodel );
    +
    +  throw UnknownSynapseType( model_name );
     }
     
    -DictionaryDatum
    +
    +dictionary
     ModelManager::get_connector_defaults( synindex syn_id ) const
     {
       assert_valid_syn_id( syn_id, kernel().vp_manager.get_thread_id() );
     
    -  DictionaryDatum dict( new Dictionary() );
    +  dictionary dict;
     
       for ( size_t t = 0; t < static_cast< size_t >( kernel().vp_manager.get_num_threads() ); ++t )
       {
    @@ -352,8 +343,8 @@ ModelManager::get_connector_defaults( synindex syn_id ) const
         connection_models_[ t ][ syn_id ]->get_status( dict );
       }
     
    -  ( *dict )[ names::num_connections ] = kernel().connection_manager.get_num_connections( syn_id );
    -  ( *dict )[ names::element_type ] = "synapse";
    +  dict[ names::num_connections ] = kernel().connection_manager.get_num_connections( syn_id );
    +  dict[ names::element_type ] = std::string( "synapse" );
     
       return dict;
     }
    @@ -376,7 +367,7 @@ ModelManager::clear_node_models_()
       node_models_.clear();
       proxy_nodes_.clear();
     
    -  modeldict_->clear();
    +  modeldict_.clear();
     
       model_defaults_modified_ = false;
     }
    @@ -402,7 +393,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 924535a780..0f35f7ef76 100644
    --- a/nestkernel/model_manager.h
    +++ b/nestkernel/model_manager.h
    @@ -37,8 +37,6 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -51,8 +49,8 @@ class ModelManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Resize the structures for the Connector objects if necessary.
    @@ -65,10 +63,7 @@ class ModelManager : public ManagerInterface
        */
       void calibrate( const TimeConverter& );
     
    -
       /**
    -   * Return a proxynode configured for thread tid and the given
    -   * node_id.
        */
       Node* get_proxy_node( size_t tid, size_t node_id );
     
    @@ -98,7 +93,7 @@ class ModelManager : public ManagerInterface
        * @see register_connection_model
        */
       template < class ModelT >
    -  size_t register_node_model( const Name& name, std::string deprecation_info = std::string() );
    +  size_t register_node_model( const std::string& name, std::string deprecation_info = std::string() );
     
       /**
        * Register a synape model with a custom Connector model and without any
    @@ -126,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, DictionaryDatum params );
    +  void copy_model( const std::string& old_name, const std::string& new_name, const dictionary& params );
     
       /**
        * Set the default parameters of a model.
    @@ -136,13 +131,13 @@ 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, DictionaryDatum params );
    +  bool set_model_defaults( const std::string& name, const dictionary& params );
     
       /**
        * @return The model ID for a Model with a given name
        * @throws UnknownModelName if the model is not available
        */
    -  size_t get_node_model_id( const Name ) const;
    +  size_t get_node_model_id( const std::string ) const;
     
       /**
        * @return The Model registered with the given model ID
    @@ -155,9 +150,9 @@ class ModelManager : public ManagerInterface
        */
       size_t get_synapse_model_id( std::string model_name );
     
    -  DictionaryDatum get_connector_defaults( synindex syn_id ) const;
    +  dictionary get_connector_defaults( synindex syn_id ) const;
     
    -  void set_connector_defaults( synindex syn_id, const DictionaryDatum& d );
    +  void set_connector_defaults( synindex syn_id, const dictionary& d );
     
       /**
        * Asserts validity of synapse index, otherwise throws exception.
    @@ -200,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, DictionaryDatum 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.
    @@ -209,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, DictionaryDatum 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.
    @@ -218,7 +213,7 @@ class ModelManager : public ManagerInterface
        * @param params default parameters to be set.
        * @see set_model_defaults, set_synapse_defaults_
        */
    -  void set_node_defaults_( size_t model_id, const DictionaryDatum& params );
    +  void set_node_defaults_( size_t model_id, const dictionary& params );
     
       /**
        * Set the default parameters of a model.
    @@ -227,7 +222,7 @@ class ModelManager : public ManagerInterface
        * @param params default parameters to be set.
        * @see set_model_defaults, set_node_defaults_
        */
    -  void set_synapse_defaults_( size_t model_id, const DictionaryDatum& params );
    +  void set_synapse_defaults_( size_t 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 );
    @@ -270,8 +265,8 @@ class ModelManager : public ManagerInterface
        */
       std::vector< std::vector< ConnectorModel* > > connection_models_;
     
    -  DictionaryDatum modeldict_;   //!< Dictionary of all node models
    -  DictionaryDatum synapsedict_; //!< Dictionary of all synapse models
    +  dictionary modeldict_;   //!< Dictionary of all node models
    +  dictionary synapsedict_; //!< Dictionary of all synapse models
     
       Model* proxynode_model_;
     
    diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h
    index d9e8d8e6c7..9d801c8958 100644
    --- a/nestkernel/model_manager_impl.h
    +++ b/nestkernel/model_manager_impl.h
    @@ -31,6 +31,7 @@
     
     // Includes from nestkernel:
     #include "connection_label.h"
    +#include "exceptions.h"
     #include "kernel_manager.h"
     #include "nest.h"
     #include "target_identifier.h"
    @@ -41,15 +42,16 @@ namespace nest
     
     template < class ModelT >
     size_t
    -ModelManager::register_node_model( const Name& name, std::string deprecation_info )
    +ModelManager::register_node_model( const std::string& name, std::string deprecation_info )
     {
    -  if ( modeldict_->known( name ) )
    +  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 );
       }
     
    -  Model* model = new GenericModel< ModelT >( name.toString(), deprecation_info );
    +  Model* model = new GenericModel< ModelT >( name, deprecation_info );
       return register_node_model_( model );
     }
     
    @@ -80,7 +82,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 );
    @@ -96,7 +98,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/modelrange_manager.h b/nestkernel/modelrange_manager.h
    index c25941325f..957e433408 100644
    --- a/nestkernel/modelrange_manager.h
    +++ b/nestkernel/modelrange_manager.h
    @@ -47,8 +47,8 @@ class ModelRangeManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Assign a range of node IDs for the given model
    @@ -87,12 +87,12 @@ class ModelRangeManager : public ManagerInterface
     };
     
     inline void
    -nest::ModelRangeManager::set_status( const DictionaryDatum& )
    +nest::ModelRangeManager::set_status( const dictionary& )
     {
     }
     
     inline void
    -nest::ModelRangeManager::get_status( DictionaryDatum& )
    +nest::ModelRangeManager::get_status( dictionary& )
     {
     }
     
    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 6b764c6596..0f76c3a180 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 );
     
    @@ -112,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
       {
       }
     
    diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp
    index 5da18cc3ac..869affa72e 100644
    --- a/nestkernel/mpi_manager.cpp
    +++ b/nestkernel/mpi_manager.cpp
    @@ -33,8 +33,6 @@
     #include "mpi_manager_impl.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     #ifdef HAVE_MPI
     
    @@ -221,12 +219,12 @@ nest::MPIManager::finalize( const bool )
     }
     
     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_ );
    +  dict.update_value( names::adaptive_target_buffers, adaptive_target_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, 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_ ) )
       {
    @@ -234,32 +232,31 @@ 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, new_buffer_size_spike_data );
       if ( new_buffer_size_spike_data != static_cast< long >( 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< double >( dict, names::shrink_factor_buffer_spike_data, shrink_factor_buffer_spike_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, max_buffer_size_target_data_ );
    +  dict.update_value( names::shrink_factor_buffer_spike_data, shrink_factor_buffer_spike_data_ );
     }
     
     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_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_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 ] = 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_;
    +  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_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
    @@ -346,11 +343,41 @@ nest::MPIManager::communicate( std::vector< long >& local_nodes, std::vector< lo
       const auto send_ptr = local_nodes.empty() ? nullptr : &local_nodes[ 0 ];
       MPI_Allgatherv( send_ptr,
         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 );
    +}
    +
    +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 );
     }
     
    @@ -1071,6 +1098,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 a8f4fcea7e..b411623cd5 100644
    --- a/nestkernel/mpi_manager.h
    +++ b/nestkernel/mpi_manager.h
    @@ -49,8 +49,6 @@
     #include "spike_data.h"
     #include "target_data.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     namespace nest
     {
    @@ -68,8 +66,8 @@ class MPIManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       void init_mpi( int* argc, char** argv[] );
     #ifdef HAVE_MPI
    @@ -124,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/music_manager.cpp b/nestkernel/music_manager.cpp
    index ec237eca7d..65460f9a93 100644
    --- a/nestkernel/music_manager.cpp
    +++ b/nestkernel/music_manager.cpp
    @@ -32,8 +32,6 @@
     // Includes from nestkernel:
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -58,12 +56,12 @@ MUSICManager::finalize( const bool )
     }
     
     void
    -MUSICManager::set_status( const DictionaryDatum& )
    +MUSICManager::set_status( const dictionary& )
     {
     }
     
     void
    -MUSICManager::get_status( DictionaryDatum& )
    +MUSICManager::get_status( dictionary& )
     {
     }
     
    diff --git a/nestkernel/music_manager.h b/nestkernel/music_manager.h
    index a4ce1c2f39..130324d740 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"
    @@ -53,8 +50,8 @@ class MUSICManager : public ManagerInterface
     public:
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       MUSICManager();
     
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 2add49bcb6..c1fc8d9187 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -31,19 +31,61 @@
     #include "mpi_manager_impl.h"
     #include "parameter.h"
     
    -// Includes from sli:
    -#include "sliexceptions.h"
    -#include "token.h"
    +#include "sp_manager.h"
    +#include "sp_manager_impl.h"
    +
    +#include "connector_model_impl.h"
    +
    +#include "conn_builder_conngen.h"
    +
    +#include "grid_mask.h"
    +#include "spatial.h"
    +
    +#include "connection_manager_impl.h"
    +
    +#include "genericmodel_impl.h"
    +#include "model_manager.h"
    +#include "model_manager_impl.h"
    +
    +#include "config.h"
    +#include "dictionary.h"
     
     namespace nest
     {
     
    +
    +AbstractMask* create_doughnut( const dictionary& d );
    +
     void
     init_nest( int* argc, char** argv[] )
     {
       KernelManager::create_kernel_manager();
       kernel().mpi_manager.init_mpi( argc, argv );
       kernel().initialize();
    +
    +  // TODO: register_parameter() and register_mask() should be moved, see #3149
    +  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" );
    +  register_parameter< GaborParameter >( "gabor" );
    +
    +  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
    @@ -62,90 +104,237 @@ reset_kernel()
       kernel().reset();
     }
     
    +severity_t
    +get_verbosity()
    +{
    +  return kernel().logging_manager.get_logging_level();
    +}
    +
     void
    -register_logger_client( const deliver_logging_event_ptr client_callback )
    +set_verbosity( severity_t s )
     {
    -  kernel().logging_manager.register_logging_client( client_callback );
    +  kernel().logging_manager.set_logging_level( s );
    +}
    +
    +void
    +enable_structural_plasticity()
    +{
    +  kernel().sp_manager.enable_structural_plasticity();
    +}
    +
    +
    +void
    +disable_structural_plasticity()
    +{
    +  kernel().sp_manager.disable_structural_plasticity();
     }
     
     void
    -print_nodes_to_stream( std::ostream& ostr )
    +register_logger_client( const deliver_logging_event_ptr client_callback )
     {
    -  kernel().node_manager.print( ostr );
    +  kernel().logging_manager.register_logging_client( client_callback );
     }
     
    -RngPtr
    -get_rank_synced_rng()
    +std::string
    +print_nodes_to_string()
     {
    -  return kernel().random_manager.get_rank_synced_rng();
    +  std::stringstream string_stream;
    +  kernel().node_manager.print( string_stream );
    +  return string_stream.str();
     }
     
    -RngPtr
    -get_vp_synced_rng( size_t tid )
    +std::string
    +pprint_to_string( NodeCollectionPTR nc )
     {
    -  return kernel().random_manager.get_vp_synced_rng( tid );
    +  if ( nc )
    +  {
    +    std::stringstream stream;
    +    nc->print_me( stream );
    +    return stream.str();
    +  }
    +  else
    +  {
    +    // 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 "";
    +  }
     }
     
    -RngPtr
    -get_vp_specific_rng( size_t tid )
    +size_t
    +nc_size( NodeCollectionPTR nc )
     {
    -  return kernel().random_manager.get_vp_specific_rng( tid );
    +  assert( nc && "NodeCollectionPTR must be initialized." );
    +  return nc->size();
     }
     
     void
    -set_kernel_status( const DictionaryDatum& dict )
    +set_kernel_status( const dictionary& dict )
     {
    -  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" );
     }
     
    -DictionaryDatum
    +dictionary
     get_kernel_status()
     {
       assert( kernel().is_initialized() );
     
    -  DictionaryDatum d( new Dictionary );
    +  dictionary d;
       kernel().get_status( d );
     
       return d;
     }
     
    +dictionary
    +get_nc_status( NodeCollectionPTR nc )
    +{
    +  dictionary result;
    +  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 )
    +    {
    +      auto p = result.find( kv_pair.first );
    +      if ( p != result.end() )
    +      {
    +        // key exists
    +        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.item;
    +        result[ kv_pair.first ] = new_entry;
    +      }
    +    }
    +  }
    +  return result;
    +}
    +
     void
    -set_node_status( const size_t node_id, const DictionaryDatum& dict )
    +set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
     {
    -  kernel().node_manager.set_status( node_id, dict );
    +  /*
    +   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 )
    +  {
    +    // 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" );
    +  }
    +  else if ( nc->size() == params.size() )
    +  {
    +    size_t idx = 0;
    +    for ( auto const& node : *nc )
    +    {
    +      // 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
    +  {
    +    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 );
    +  }
     }
     
    -DictionaryDatum
    -get_node_status( const size_t node_id )
    +void
    +set_connection_status( const std::deque< ConnectionID >& conns, const dictionary& dict )
     {
    -  return kernel().node_manager.get_status( node_id );
    +  dict.init_access_flags();
    +  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 );
    +  }
    +  dict.all_entries_accessed( "connection.set()", "params" );
     }
     
     void
    -set_connection_status( const ConnectionDatum& conn, const DictionaryDatum& dict )
    +set_connection_status( const std::deque< ConnectionID >& conns, const std::vector< dictionary >& dicts )
     {
    -  DictionaryDatum conn_dict = conn.get_dict();
    -  const size_t source_node_id = getValue< long >( conn_dict, nest::names::source );
    -  const size_t target_node_id = getValue< long >( conn_dict, nest::names::target );
    -  const size_t tid = getValue< long >( conn_dict, nest::names::target_thread );
    -  const synindex syn_id = getValue< long >( conn_dict, nest::names::synapse_modelid );
    -  const size_t p = getValue< long >( conn_dict, nest::names::port );
    +  // PYNEST-NG: Access checks?
    +  if ( conns.size() != dicts.size() )
    +  {
    +    throw BadParameter( "List of dictionaries must contain one dictionary per connection" );
    +  }
     
    -  dict->clear_access_flags();
    +  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 );
    +  }
    +}
     
    -  kernel().connection_manager.set_synapse_status( source_node_id, target_node_id, tid, syn_id, p, dict );
    +std::vector< dictionary >
    +get_connection_status( const std::deque< ConnectionID >& conns )
    +{
    +  std::vector< dictionary > result;
    +  result.reserve( conns.size() );
     
    -  ALL_ENTRIES_ACCESSED2( *dict,
    -    "SetStatus",
    -    "Unread dictionary entries: ",
    -    "Maybe you tried to set common synapse properties through an individual "
    -    "synapse?" );
    +  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;
     }
     
    -DictionaryDatum
    -get_connection_status( const ConnectionDatum& conn )
    +void
    +set_node_status( const size_t node_id, const dictionary& dict )
    +{
    +  kernel().node_manager.set_status( node_id, dict );
    +}
    +
    +dictionary
    +get_node_status( const size_t node_id )
    +{
    +  return kernel().node_manager.get_status( node_id );
    +}
    +
    +dictionary
    +get_connection_status( const ConnectionID& conn )
     {
       return kernel().connection_manager.get_synapse_status( conn.get_source_node_id(),
         conn.get_target_node_id(),
    @@ -155,11 +344,43 @@ get_connection_status( const ConnectionDatum& conn )
     }
     
     NodeCollectionPTR
    -create( const Name& model_name, const size_t n_nodes )
    +slice_nc( const NodeCollectionPTR nc, long start, long stop, long step )
    +{
    +  const size_t g_size = nc->size();
    +
    +  if ( step < 1 )
    +  {
    +    throw BadParameterValue( "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 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 );
    @@ -167,27 +388,80 @@ create( const Name& model_name, const size_t n_nodes )
     }
     
     NodeCollectionPTR
    -get_nodes( const DictionaryDatum& params, const bool local_only )
    +create_spatial( const dictionary& layer_dict )
    +{
    +  return create_layer( layer_dict );
    +}
    +
    +NodeCollectionPTR
    +make_nodecollection( const std::vector< size_t >& node_ids )
    +{
    +  return NodeCollection::create( node_ids );
    +}
    +
    +NodeCollectionPTR
    +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 );
    +}
    +
    +long
    +find( const NodeCollectionPTR nc, size_t node_id )
    +{
    +  return nc->get_nc_index( 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, nc );
    +    status_dict[ names::network_size ] = nc->size();
    +  }
    +  return status_dict;
    +}
    +
     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 );
     }
     
    +void
    +disconnect( NodeCollectionPTR sources,
    +  NodeCollectionPTR targets,
    +  const dictionary& connectivity,
    +  const std::vector< dictionary >& synapse_params )
    +{
    +  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 );
    @@ -198,40 +472,45 @@ 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 );
     }
     
    -ArrayDatum
    -get_connections( const DictionaryDatum& dict )
    +void
    +connect_sonata( const dictionary& graph_specs, const long hyperslab_size )
    +{
    +  kernel().connection_manager.connect_sonata( graph_specs, hyperslab_size );
    +}
    +
    +std::deque< ConnectionID >
    +get_connections( const dictionary& dict )
     {
    -  dict->clear_access_flags();
    +  dict.init_access_flags();
     
    -  ArrayDatum array = kernel().connection_manager.get_connections( dict );
    +  const auto& connectome = kernel().connection_manager.get_connections( dict );
     
    -  ALL_ENTRIES_ACCESSED( *dict, "GetConnections", "Unread dictionary entries: " );
    +  dict.all_entries_accessed( "GetConnections", "params" );
     
    -  return array;
    +  return connectome;
     }
     
     void
    -disconnect( const ArrayDatum& conns )
    +disconnect( const std::deque< ConnectionID >& conns )
     {
    -  for ( size_t conn_index = 0; conn_index < conns.size(); ++conn_index )
    +  for ( auto& conn : conns )
       {
    -    const auto conn_datum = getValue< ConnectionDatum >( conns.get( conn_index ) );
    -    const auto target_node = kernel().node_manager.get_node_or_proxy( conn_datum.get_target_node_id() );
    +    const auto target_node = kernel().node_manager.get_node_or_proxy( conn.get_target_node_id() );
         kernel().sp_manager.disconnect(
    -      conn_datum.get_source_node_id(), target_node, conn_datum.get_target_thread(), conn_datum.get_synapse_model_id() );
    +      conn.get_source_node_id(), target_node, conn.get_target_thread(), conn.get_synapse_model_id() );
       }
     }
     
     void
    -simulate( const double& t )
    +simulate( const double t )
     {
       prepare();
       run( t );
    @@ -239,7 +518,7 @@ simulate( const double& t )
     }
     
     void
    -run( const double& time )
    +run( const double time )
     {
       const Time t_sim = Time::ms( time );
     
    @@ -253,9 +532,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 );
    @@ -274,13 +551,13 @@ cleanup()
     }
     
     void
    -copy_model( const Name& oldmodname, const Name& newmodname, const DictionaryDatum& 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 std::string component, const DictionaryDatum& dict )
    +set_model_defaults( const std::string& component, const dictionary& dict )
     {
       if ( kernel().model_manager.set_model_defaults( component, dict ) )
       {
    @@ -296,8 +573,8 @@ set_model_defaults( const std::string component, const DictionaryDatum& dict )
       throw UnknownComponent( component );
     }
     
    -DictionaryDatum
    -get_model_defaults( const std::string component )
    +dictionary
    +get_model_defaults( const std::string& component )
     {
       try
       {
    @@ -325,36 +602,103 @@ get_model_defaults( const std::string component )
       }
     
       throw UnknownComponent( component );
    -  return DictionaryDatum(); // supress missing return value warning; never reached
    +  return dictionary(); // supress missing return value warning; never reached
     }
     
    -ParameterDatum
    -create_parameter( const DictionaryDatum& param_dict )
    +ParameterPTR
    +create_parameter( const boost::any& value )
     {
    -  param_dict->clear_access_flags();
    +  if ( is_type< double >( value ) )
    +  {
    +    return create_parameter( boost::any_cast< double >( value ) );
    +  }
    +  else if ( is_type< int >( value ) )
    +  {
    +    return create_parameter( static_cast< long >( boost::any_cast< int >( value ) ) );
    +  }
    +  else if ( is_type< long >( value ) )
    +  {
    +    return create_parameter( boost::any_cast< long >( value ) );
    +  }
    +  else if ( is_type< dictionary >( value ) )
    +  {
    +    return create_parameter( boost::any_cast< dictionary >( value ) );
    +  }
    +  else if ( is_type< ParameterPTR >( value ) )
    +  {
    +    return boost::any_cast< ParameterPTR >( value );
    +  }
    +  throw BadProperty(
    +    std::string( "Parameter must be parametertype, constant or dictionary, got " ) + debug_type( value ) );
    +}
     
    -  ParameterDatum datum( NestModule::create_parameter( param_dict ) );
    +ParameterPTR
    +create_parameter( const double value )
    +{
    +  const auto param = new ConstantParameter( value );
    +  return ParameterPTR( param );
    +}
     
    -  ALL_ENTRIES_ACCESSED( *param_dict, "nest::CreateParameter", "Unread dictionary entries: " );
    +ParameterPTR
    +create_parameter( const long value )
    +{
    +  const auto param = new ConstantParameter( value );
    +  return ParameterPTR( param );
    +}
     
    -  return datum;
    +ParameterPTR
    +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." );
    +  }
    +  const auto n = param_dict.begin()->first;
    +  const auto pdict = param_dict.get< dictionary >( n );
    +  pdict.init_access_flags();
    +  auto parameter = create_parameter( n, pdict );
    +  pdict.all_entries_accessed( "create_parameter", "param" );
    +  return parameter;
    +}
    +
    +ParameterPTR
    +create_parameter( const std::string& name, const dictionary& d )
    +{
    +  // The parameter factory will create the parameter
    +  return ParameterPTR( parameter_factory_().create( name, d ) );
    +}
    +
    +ParameterFactory&
    +parameter_factory_( void )
    +{
    +  static ParameterFactory factory;
    +  return factory;
    +}
    +
    +MaskFactory&
    +mask_factory_( void )
    +{
    +  static MaskFactory factory;
    +  return factory;
     }
     
     double
    -get_value( const ParameterDatum& param )
    +get_value( const ParameterPTR param )
     {
       RngPtr rng = get_rank_synced_rng();
       return param->value( rng, nullptr );
     }
     
     bool
    -is_spatial( const ParameterDatum& param )
    +is_spatial( const ParameterPTR param )
     {
       return param->is_spatial();
     }
     
     std::vector< double >
    -apply( const ParameterDatum& param, const NodeCollectionDatum& nc )
    +apply( const ParameterPTR param, const NodeCollectionPTR nc )
     {
       std::vector< double > result;
       result.reserve( nc->size() );
    @@ -368,40 +712,35 @@ apply( const ParameterDatum& param, const NodeCollectionDatum& nc )
     }
     
     std::vector< double >
    -apply( const ParameterDatum& param, const DictionaryDatum& positions )
    +apply( const ParameterPTR 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 );
    +  auto targets = positions.get< std::vector< std::vector< double > > >( names::targets );
    +  return param->apply( source_nc, targets );
     }
     
    -Datum*
    -node_collection_array_index( const Datum* datum, const long* array, unsigned long n )
    +NodeCollectionPTR
    +node_collection_array_index( NodeCollectionPTR nc, const long* array, unsigned long n )
     {
    -  const NodeCollectionDatum node_collection = *dynamic_cast< const NodeCollectionDatum* >( datum );
    -  assert( node_collection->size() >= n );
    +  assert( nc->size() >= n );
       std::vector< size_t > node_ids;
       node_ids.reserve( n );
     
       for ( auto node_ptr = array; node_ptr != array + n; ++node_ptr )
       {
    -    node_ids.push_back( node_collection->operator[]( *node_ptr ) );
    +    node_ids.push_back( nc->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 nc, const bool* array, unsigned long n )
     {
    -  const NodeCollectionDatum node_collection = *dynamic_cast< const NodeCollectionDatum* >( datum );
    -  assert( node_collection->size() == n );
    +  assert( nc->size() == n );
       std::vector< size_t > node_ids;
       node_ids.reserve( n );
     
    -  auto nc_it = node_collection->begin();
    +  auto nc_it = nc->begin();
       for ( auto node_ptr = array; node_ptr != array + n; ++node_ptr, ++nc_it )
       {
         if ( *node_ptr )
    @@ -409,7 +748,38 @@ 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 );
    +}
    +
    +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 )
    +{
    +  // 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 e49c7dcb5e..ba3a52a200 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -27,21 +27,28 @@
     #include <ostream>
     
     // Includes from libnestutil:
    +#include "dictionary.h"
     #include "enum_bitfield.h"
     #include "logging.h"
     
     // Includes from nestkernel:
    -#include "nest_datums.h"
    +#include "connection_id.h"
    +#include "mask.h"
    +#include "mask_impl.h"
     #include "nest_time.h"
     #include "nest_types.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
    +#include "parameter.h"
    +#include "random_generators.h"
     
     namespace nest
     {
     
    +/**
    + * 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 );
    +
     void init_nest( int* argc, char** argv[] );
     void fail_exit( int exitcode );
     
    @@ -49,13 +56,46 @@ void install_module( const std::string& module_name );
     
     void reset_kernel();
     
    +severity_t get_verbosity();
    +void set_verbosity( severity_t s );
    +
    +void enable_structural_plasticity();
    +void disable_structural_plasticity();
    +
     void register_logger_client( const deliver_logging_event_ptr client_callback );
     
    -/**
    - * 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 );
    +std::string print_nodes_to_string();
    +
    +std::string pprint_to_string( NodeCollectionPTR nc );
    +
    +size_t nc_size( NodeCollectionPTR nc );
    +
    +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_node_status( const size_t node_id, const dictionary& dict );
    +dictionary get_node_status( const size_t node_id );
    +
    +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 );
    +
    +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 );
     
     /**
      * Register node model (i.e. an instance of a class inheriting from `Node`).
    @@ -69,26 +109,28 @@ RngPtr get_rank_synced_rng();
     RngPtr get_vp_synced_rng( size_t tid );
     RngPtr get_vp_specific_rng( size_t tid );
     
    -void set_kernel_status( const DictionaryDatum& dict );
    -DictionaryDatum get_kernel_status();
    -
    -void set_node_status( const size_t node_id, const DictionaryDatum& dict );
    -DictionaryDatum get_node_status( const size_t node_id );
    -
    -void set_connection_status( const ConnectionDatum& conn, const DictionaryDatum& dict );
    -DictionaryDatum get_connection_status( const ConnectionDatum& conn );
    -
    -NodeCollectionPTR create( const Name& model_name, const size_t n );
    -
    -NodeCollectionPTR get_nodes( const DictionaryDatum& dict, const bool local_only );
    +void set_kernel_status( const dictionary& dict );
    +dictionary get_kernel_status();
     
     /**
      * Create bipartite connections.
      */
     void connect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
    -  const DictionaryDatum& connectivity,
    -  const std::vector< DictionaryDatum >& synapse_params );
    +  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 std::vector< dictionary >& synapse_params );
     
     /**
      * Create tripartite connections
    @@ -99,9 +141,9 @@ void connect( 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
    @@ -123,16 +165,19 @@ 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 );
    +
     
    -ArrayDatum get_connections( const DictionaryDatum& dict );
    +void connect_sonata( const dictionary& graph_specs, const long hyperslab_size );
     
    -void disconnect( const ArrayDatum& conns );
    +std::deque< ConnectionID > get_connections( const dictionary& dict );
     
    -void simulate( const double& t );
    +void disconnect( const std::deque< ConnectionID >& conns );
    +
    +void simulate( const double t );
     
     /**
      * @fn run(const double& time)
    @@ -149,7 +194,7 @@ void simulate( const double& t );
      * @see prepare()
      * @see cleanup()
      */
    -void run( const double& t );
    +void run( const double t );
     
     /**
      * @fn prepare()
    @@ -176,20 +221,70 @@ void prepare();
      */
     void cleanup();
     
    -void copy_model( const Name& oldmodname, const Name& newmodname, const DictionaryDatum& dict );
    +/**
    + * 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& );
    +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 long );
    +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;
     
    -void set_model_defaults( const std::string model_name, const DictionaryDatum& );
    -DictionaryDatum get_model_defaults( const std::string model_name );
    +ParameterFactory& parameter_factory_();
    +MaskFactory& mask_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 );
    -std::vector< double > apply( const ParameterDatum& param, const DictionaryDatum& positions );
    +double get_value( const ParameterPTR param );
    +bool is_spatial( const ParameterPTR param );
     
    -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 );
    +std::vector< double > apply( const ParameterPTR param, const NodeCollectionPTR nc );
    +std::vector< double > apply( const ParameterPTR param, const dictionary& positions );
     
    +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 )
    +{
    +  return parameter_factory_().register_subtype< T >( name );
    +}
    +
    +template < class T >
    +inline bool
    +register_mask()
    +{
    +  return mask_factory_().register_subtype< T >( T::get_name() );
    +}
    +
    +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/nest_datums.cpp b/nestkernel/nest_datums.cpp
    deleted file mode 100644
    index f7e7fc6202..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 <>
    -sli::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
    -{
    -  print_me( 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 ca0a09de93..0000000000
    --- a/nestkernel/nest_datums.h
    +++ /dev/null
    @@ -1,66 +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 "nestmodule.h"
    -#include "node_collection.h"
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "sharedptrdatum.h"
    -#include "slitype.h"
    -
    -#ifdef HAVE_LIBNEUROSIM
    -#include <neurosim/connection_generator.h>
    -typedef sharedPtrDatum< ConnectionGenerator, &nest::NestModule::ConnectionGeneratorType > ConnectionGeneratorDatum;
    -#endif
    -
    -typedef AggregateDatum< 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
    -
    -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 */
    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.cpp b/nestkernel/nest_names.cpp
    deleted file mode 100644
    index 2b1d98435e..0000000000
    --- a/nestkernel/nest_names.cpp
    +++ /dev/null
    @@ -1,704 +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 <http://www.gnu.org/licenses/>.
    - *
    - */
    -#include "nest_names.h"
    -
    -namespace nest
    -{
    -
    -namespace names
    -{
    -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 AMPA( "AMPA" );
    -const Name Aminus( "Aminus" );
    -const Name Aminus_triplet( "Aminus_triplet" );
    -const Name Aplus( "Aplus" );
    -const Name Aplus_triplet( "Aplus_triplet" );
    -const Name ASCurrents( "ASCurrents" );
    -const Name ASCurrents_sum( "ASCurrents_sum" );
    -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 adapt_beta( "adapt_beta" );
    -const Name adapt_tau( "adapt_tau" );
    -const Name adaptation( "adaptation" );
    -const Name adapting_threshold( "adapting_threshold" );
    -const Name adaptive_target_buffers( "adaptive_target_buffers" );
    -const Name add_compartments( "add_compartments" );
    -const Name add_receptors( "add_receptors" );
    -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 amp_slow( "amp_slow" );
    -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 average_gradient( "average_gradient" );
    -const Name azimuth_angle( "azimuth_angle" );
    -
    -const Name b( "b" );
    -const Name batch_size( "batch_size" );
    -const Name beta( "beta" );
    -const Name beta_1( "beta_1" );
    -const Name beta_2( "beta_2" );
    -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 Ca_astro( "Ca_astro" );
    -const Name Ca_tot( "Ca_tot" );
    -const Name c( "c" );
    -const Name c_1( "c_1" );
    -const Name c_2( "c_2" );
    -const Name c_3( "c_3" );
    -const Name c_reg( "c_reg" );
    -const Name capacity( "capacity" );
    -const Name center( "center" );
    -const Name circular( "circular" );
    -const Name clear( "clear" );
    -const Name comp_idx( "comp_idx" );
    -const Name comparator( "comparator" );
    -const Name compartments( "compartments" );
    -const Name conc_Mg2( "conc_Mg2" );
    -const Name configbit_0( "configbit_0" );
    -const Name configbit_1( "configbit_1" );
    -const Name connection_count( "connection_count" );
    -const Name connection_rules( "connection_rules" );
    -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 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_IP3( "delta_IP3" );
    -const Name delta_P( "delta_P" );
    -const Name delta_tau( "delta_tau" );
    -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 dI_syn_ex( "dI_syn_ex" );
    -const Name dI_syn_in( "dI_syn_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 dU( "U" );
    -
    -const Name E_ahp( "E_ahp" );
    -const Name E_ex( "E_ex" );
    -const Name E_in( "E_in" );
    -const Name E_K( "E_K" );
    -const Name E_L( "E_L" );
    -const Name E_Na( "E_Na" );
    -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_h( "E_rev_h" );
    -const Name E_rev_KNa( "E_rev_KNa" );
    -const Name E_rev_NaP( "E_rev_NaP" );
    -const Name E_rev_NMDA( "E_rev_NMDA" );
    -const Name E_rev_T( "E_rev_T" );
    -const Name E_rr( "E_rr" );
    -const Name E_sfa( "E_sfa" );
    -const Name e_L( "e_L" );
    -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 eprop_history_duration( "eprop_history_duration" );
    -const Name eprop_isi_trace_cutoff( "eprop_isi_trace_cutoff" );
    -const Name eprop_learning_window( "eprop_learning_window" );
    -const Name eprop_reset_neurons_on_update( "eprop_reset_neurons_on_update" );
    -const Name eprop_update_interval( "eprop_update_interval" );
    -const Name eps( "eps" );
    -const Name epsilon( "epsilon" );
    -const Name equilibrate( "equilibrate" );
    -const Name error_signal( "error_signal" );
    -const Name eta( "eta" );
    -const Name events( "events" );
    -const Name extent( "extent" );
    -
    -const Name f_target( "f_target" );
    -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( "GABA" );
    -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_ahp( "g_ahp" );
    -const Name g_C( "g_C" );
    -const Name g_ex( "g_ex" );
    -const Name g_GABA_A( "g_GABA_A" );
    -const Name g_GABA_B( "g_GABA_B" );
    -const Name g_in( "g_in" );
    -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_m( "g_m" );
    -const Name g_Na( "g_Na" );
    -const Name g_NaL( "g_NaL" );
    -const Name g_NMDA( "g_NMDA" );
    -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_h( "g_peak_h" );
    -const Name g_peak_KNa( "g_peak_KNa" );
    -const Name g_peak_NaP( "g_peak_NaP" );
    -const Name g_peak_NMDA( "g_peak_NMDA" );
    -const Name g_peak_T( "g_peak_T" );
    -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( "gamma" );
    -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_curves( "growth_curves" );
    -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 h_IP3R( "h_IP3R" );
    -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_ahp( "I_ahp" );
    -const Name I_e( "I_e" );
    -const Name I_h( "I_h" );
    -const Name I_AMPA( "I_AMPA" );
    -const Name I_GABA( "I_GABA" );
    -const Name I_KNa( "I_KNa" );
    -const Name I_NMDA( "I_NMDA" );
    -const Name I_NaP( "I_NaP" );
    -const Name I_SIC( "I_SIC" );
    -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 I_T( "I_T" );
    -const Name Inact_h( "Inact_h" );
    -const Name Inact_p( "Inact_p" );
    -const Name IP3( "IP3" );
    -const Name IP3_0( "IP3_0" );
    -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 kappa( "kappa" );
    -const Name kappa_reg( "kappa_reg" );
    -const Name Kd_act( "Kd_act" );
    -const Name Kd_IP3_1( "Kd_IP3_1" );
    -const Name Kd_IP3_2( "Kd_IP3_2" );
    -const Name Kd_inh( "Kd_inh" );
    -const Name Km_SERCA( "Km_SERCA" );
    -const Name Kplus( "Kplus" );
    -const Name Kplus_triplet( "Kplus_triplet" );
    -const Name k_IP3R( "k_IP3R" );
    -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 learning_signal( "learning_signal" );
    -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 loss( "loss" );
    -const Name lower_left( "lower_left" );
    -
    -const Name m( "m" );
    -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_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 model_id( "model_id" );
    -const Name modules( "modules" );
    -const Name mpi_address( "mpi_address" );
    -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_models( "node_models" );
    -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 optimizer( "optimizer" );
    -const Name optimize_each_step( "optimize_each_step" );
    -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 pairwise_avg_num_conns( "pairwise_avg_num_conns" );
    -const Name params( "params" );
    -const Name parent_idx( "parent_idx" );
    -const Name phase( "phase" );
    -const Name phi_max( "phi_max" );
    -const Name pairwise_poisson( "pairwise_poisson" );
    -const Name polar_angle( "polar_angle" );
    -const Name polar_axis( "polar_axis" );
    -const Name pool_size( "pool_size" );
    -const Name pool_type( "pool_type" );
    -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 prepared( "prepared" );
    -const Name primary( "primary" );
    -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_IP3R( "rate_IP3R" );
    -const Name rate_L( "rate_L" );
    -const Name rate_SERCA( "rate_SERCA" );
    -const Name rate_slope( "rate_slope" );
    -const Name rate_times( "rate_times" );
    -const Name rate_values( "rate_values" );
    -const Name ratio_ER_cyt( "ratio_ER_cyt" );
    -const Name readout_cycle_duration( "readout_cycle_duration" );
    -const Name readout_signal( "readout_signal" );
    -const Name readout_signal_unnorm( "readout_signal_unnorm" );
    -const Name receptor_idx( "receptor_idx" );
    -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 regular_spike_arrival( "regular_spike_arrival" );
    -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 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 s_NMDA( "s_NMDA" );
    -const Name s_AMPA( "s_AMPA" );
    -const Name s_GABA( "s_GABA" );
    -const Name SIC_scale( "SIC_scale" );
    -const Name SIC_th( "SIC_th" );
    -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 source( "source" );
    -const Name spherical( "spherical" );
    -const Name spike_buffer_grow_extra( "spike_buffer_grow_extra" );
    -const Name spike_buffer_resize_log( "spike_buffer_resize_log" );
    -const Name spike_buffer_shrink_limit( "spike_buffer_shrink_limit" );
    -const Name spike_buffer_shrink_spare( "spike_buffer_shrink_spare" );
    -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 stimulation_backends( "stimulation_backends" );
    -const Name stimulator( "stimulator" );
    -const Name stimulus_source( "stimulus_source" );
    -const Name stop( "stop" );
    -const Name structural_plasticity_synapses( "structural_plasticity_synapses" );
    -const Name structural_plasticity_update_interval( "structural_plasticity_update_interval" );
    -const Name surrogate_gradient( "surrogate_gradient" );
    -const Name surrogate_gradient_function( "surrogate_gradient_function" );
    -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_models( "synapse_models" );
    -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_signal( "target_signal" );
    -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_AMPA( "tau_AMPA" );
    -const Name tau_Ca( "tau_Ca" );
    -const Name tau_D_KNa( "tau_D_KNa" );
    -const Name tau_Delta( "tau_Delta" );
    -const Name tau_GABA( "tau_GABA" );
    -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_c( "tau_c" );
    -const Name tau_decay( "tau_decay" );
    -const Name tau_decay_AMPA( "tau_decay_AMPA" );
    -const Name tau_decay_ex( "tau_decay_ex" );
    -const Name tau_decay_GABA_A( "tau_decay_GABA_A" );
    -const Name tau_decay_GABA_B( "tau_decay_GABA_B" );
    -const Name tau_decay_in( "tau_decay_in" );
    -const Name tau_decay_NMDA( "tau_decay_NMDA" );
    -const Name tau_epsp( "tau_epsp" );
    -const Name tau_fac( "tau_fac" );
    -const Name tau_IP3( "tau_IP3" );
    -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_m_readout( "tau_m_readout" );
    -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_ex( "tau_rise_ex" );
    -const Name tau_rise_GABA_A( "tau_rise_GABA_A" );
    -const Name tau_rise_GABA_B( "tau_rise_GABA_B" );
    -const Name tau_rise_in( "tau_rise_in" );
    -const Name tau_rise_NMDA( "tau_rise_NMDA" );
    -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_fast( "tau_syn_fast" );
    -const Name tau_syn_in( "tau_syn_in" );
    -const Name tau_syn_slow( "tau_syn_slow" );
    -const Name tau_theta( "tau_theta" );
    -const Name tau_u_bar_bar( "tau_u_bar_bar" );
    -const Name tau_u_bar_minus( "tau_u_bar_minus" );
    -const Name tau_u_bar_plus( "tau_u_bar_plus" );
    -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 third_in( "third_in" );
    -const Name third_out( "third_out" );
    -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" );
    -const Name time_collocate_spike_data( "time_collocate_spike_data" );
    -const Name time_collocate_spike_data_cpu( "time_collocate_spike_data_cpu" );
    -const Name time_communicate_prepare( "time_communicate_prepare" );
    -const Name time_communicate_prepare_cpu( "time_communicate_prepare_cpu" );
    -const Name time_communicate_spike_data( "time_communicate_spike_data" );
    -const Name time_communicate_spike_data_cpu( "time_communicate_spike_data_cpu" );
    -const Name time_communicate_target_data( "time_communicate_target_data" );
    -const Name time_communicate_target_data_cpu( "time_communicate_target_data_cpu" );
    -const Name time_construction_connect( "time_construction_connect" );
    -const Name time_construction_connect_cpu( "time_construction_connect_cpu" );
    -const Name time_construction_create( "time_construction_create" );
    -const Name time_construction_create_cpu( "time_construction_create_cpu" );
    -const Name time_deliver_secondary_data( "time_deliver_secondary_data" );
    -const Name time_deliver_secondary_data_cpu( "time_deliver_secondary_data_cpu" );
    -const Name time_deliver_spike_data( "time_deliver_spike_data" );
    -const Name time_deliver_spike_data_cpu( "time_deliver_spike_data_cpu" );
    -const Name time_gather_secondary_data( "time_gather_secondary_data" );
    -const Name time_gather_secondary_data_cpu( "time_gather_secondary_data_cpu" );
    -const Name time_gather_spike_data( "time_gather_spike_data" );
    -const Name time_gather_spike_data_cpu( "time_gather_spike_data_cpu" );
    -const Name time_gather_target_data( "time_gather_target_data" );
    -const Name time_gather_target_data_cpu( "time_gather_target_data_cpu" );
    -const Name time_omp_synchronization_construction( "time_omp_synchronization_construction" );
    -const Name time_omp_synchronization_construction_cpu( "time_omp_synchronization_construction_cpu" );
    -const Name time_omp_synchronization_simulation( "time_omp_synchronization_simulation" );
    -const Name time_omp_synchronization_simulation_cpu( "time_omp_synchronization_simulation_cpu" );
    -const Name time_mpi_synchronization( "time_mpi_synchronization" );
    -const Name time_mpi_synchronization_cpu( "time_mpi_synchronization_cpu" );
    -const Name time_in_steps( "time_in_steps" );
    -const Name time_simulate( "time_simulate" );
    -const Name time_simulate_cpu( "time_simulate_cpu" );
    -const Name time_update( "time_update" );
    -const Name time_update_cpu( "time_update_cpu" );
    -const Name times( "times" );
    -const Name to_do( "to_do" );
    -const Name total_num_virtual_procs( "total_num_virtual_procs" );
    -const Name type( "type" );
    -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( "v" );
    -const Name V_act_NMDA( "V_act_NMDA" );
    -const Name V_clamp( "V_clamp" );
    -const Name v_comp( "v_comp" );
    -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_T( "V_T" );
    -const Name V_T_star( "V_T_star" );
    -const Name V_th( "V_th" );
    -const Name V_th_adapt( "V_th_adapt" );
    -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 voltage_clamp( "voltage_clamp" );
    -const Name voltage_reset_add( "voltage_reset_add" );
    -const Name voltage_reset_fraction( "voltage_reset_fraction" );
    -const Name volume_transmitter( "volume_transmitter" );
    -const Name vp( "vp" );
    -
    -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 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 44a75f62d0..dfa30908e9 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -26,706 +26,700 @@
     // Generated includes:
     #include "config.h"
     
    -// Includes from sli:
    -#include "name.h"
    +// C++ includes:
    +#include <string>
     
     namespace nest
     {
     
     /**
    - * This namespace contains global Name objects.
    + * This namespace contains global name std::string objects. These can be
    + * used in Node::get_status and Node::set_status.
      *
    - * 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.
    - *
    - * 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 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 AMPA;
    -extern const Name Aminus;
    -extern const Name Aminus_triplet;
    -extern const Name Aplus;
    -extern const Name Aplus_triplet;
    -extern const Name ASCurrents;
    -extern const Name ASCurrents_sum;
    -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 adapt_beta;
    -extern const Name adapt_tau;
    -extern const Name adaptation;
    -extern const Name adapting_threshold;
    -extern const Name adaptive_target_buffers;
    -extern const Name add_compartments;
    -extern const Name add_receptors;
    -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 amp_slow;
    -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 average_gradient;
    -extern const Name azimuth_angle;
    -
    -extern const Name b;
    -extern const Name batch_size;
    -extern const Name beta;
    -extern const Name beta_1;
    -extern const Name beta_2;
    -
    -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;
    -
    -extern const Name C_m;
    -extern const Name Ca;
    -extern const Name Ca_astro;
    -extern const Name Ca_tot;
    -extern const Name c;
    -extern const Name c_1;
    -extern const Name c_2;
    -extern const Name c_3;
    -extern const Name c_reg;
    -extern const Name capacity;
    -extern const Name center;
    -extern const Name circular;
    -extern const Name clear;
    -extern const Name comp_idx;
    -extern const Name comparator;
    -extern const Name compartments;
    -extern const Name conc_Mg2;
    -extern const Name configbit_0;
    -extern const Name configbit_1;
    -extern const Name connection_count;
    -extern const Name connection_rules;
    -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;
    -
    -extern const Name Delta_T;
    -extern const Name Delta_V;
    -extern const Name d;
    -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_IP3;
    -extern const Name delta_P;
    -extern const Name delta_tau;
    -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 dI_syn_ex;
    -extern const Name dI_syn_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;
    -extern const Name dU;
    -
    -extern const Name E_ahp;
    -extern const Name E_ex;
    -extern const Name E_in;
    -extern const Name E_K;
    -extern const Name E_L;
    -extern const Name E_Na;
    -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_h;
    -extern const Name E_rev_KNa;
    -extern const Name E_rev_NaP;
    -extern const Name E_rev_NMDA;
    -extern const Name E_rev_T;
    -extern const Name E_rr;
    -extern const Name E_sfa;
    -extern const Name e_L;
    -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 eprop_history_duration;
    -extern const Name eprop_isi_trace_cutoff;
    -extern const Name eprop_learning_window;
    -extern const Name eprop_reset_neurons_on_update;
    -extern const Name eprop_update_interval;
    -extern const Name eps;
    -extern const Name epsilon;
    -
    -extern const Name equilibrate;
    -extern const Name error_signal;
    -extern const Name eta;
    -extern const Name events;
    -extern const Name extent;
    -
    -extern const Name f_target;
    -extern const Name file_extension;
    -extern const Name filename;
    -extern const Name filenames;
    -extern const Name frequency;
    -extern const Name frozen;
    -
    -extern const Name GABA;
    -extern const Name GABA_A;
    -extern const Name GABA_B;
    -extern const Name g;
    -extern const Name g_AMPA;
    -extern const Name g_ahp;
    -extern const Name g_C;
    -extern const Name g_ex;
    -extern const Name g_GABA_A;
    -extern const Name g_GABA_B;
    -extern const Name g_in;
    -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_m;
    -extern const Name g_Na;
    -extern const Name g_NaL;
    -extern const Name g_NMDA;
    -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_h;
    -extern const Name g_peak_KNa;
    -extern const Name g_peak_NaP;
    -extern const Name g_peak_NMDA;
    -extern const Name g_peak_T;
    -extern const Name g_ps;
    -extern const Name g_rr;
    -extern const Name g_sfa;
    -extern const Name g_sp;
    -extern const Name gamma;
    -extern const Name gamma_shape;
    -extern const Name gaussian;
    -extern const Name global_id;
    -extern const Name grid;
    -extern const Name grid3d;
    -extern const Name growth_curve;
    -extern const Name growth_curves;
    -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;
    -
    -extern const Name h;
    -extern const Name h_IP3R;
    -extern const Name has_connections;
    -extern const Name has_delay;
    -extern const Name histogram;
    -extern const Name histogram_correction;
    -
    -extern const Name I;
    -extern const Name I_ahp;
    -extern const Name I_e;
    -extern const Name I_h;
    -extern const Name I_AMPA;
    -extern const Name I_GABA;
    -extern const Name I_KNa;
    -extern const Name I_NMDA;
    -extern const Name I_NaP;
    -extern const Name I_SIC;
    -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 I_T;
    -extern const Name Inact_h;
    -extern const Name Inact_p;
    -extern const Name IP3;
    -extern const Name IP3_0;
    -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;
    -
    -extern const Name kappa;
    -extern const Name kappa_reg;
    -extern const Name Kd_act;
    -extern const Name Kd_IP3_1;
    -extern const Name Kd_IP3_2;
    -extern const Name Kd_inh;
    -extern const Name Km_SERCA;
    -extern const Name Kplus;
    -extern const Name Kplus_triplet;
    -extern const Name k_IP3R;
    -extern const Name keep_source_table;
    -extern const Name kernel;
    -
    -extern const Name label;
    -extern const Name lambda;
    -extern const Name lambda_0;
    -extern const Name learning_signal;
    -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 loss;
    -extern const Name lower_left;
    -
    -extern const Name m;
    -extern const Name major_axis;
    -extern const Name make_symmetric;
    -extern const Name mask;
    -extern const Name max;
    -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 model_id;
    -extern const Name modules;
    -extern const Name mpi_address;
    -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;
    -
    -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_models;
    -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;
    -
    -extern const Name off_grid_spiking;
    -extern const Name offset;
    -extern const Name offsets;
    -extern const Name omega;
    -extern const Name optimizer;
    -extern const Name optimize_each_step;
    -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;
    -
    -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 pairwise_avg_num_conns;
    -extern const Name params;
    -extern const Name parent_idx;
    -extern const Name phase;
    -extern const Name phi_max;
    -extern const Name pairwise_poisson;
    -extern const Name polar_angle;
    -extern const Name polar_axis;
    -extern const Name pool_size;
    -extern const Name pool_type;
    -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 prepared;
    -extern const Name primary;
    -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;
    -
    -extern const Name q_rr;
    -extern const Name q_sfa;
    -extern const Name q_stc;
    -
    -extern const Name radius;
    -extern const Name rate;
    -extern const Name rate_IP3R;
    -extern const Name rate_L;
    -extern const Name rate_SERCA;
    -extern const Name rate_slope;
    -extern const Name rate_times;
    -extern const Name rate_values;
    -extern const Name ratio_ER_cyt;
    -extern const Name readout_cycle_duration;
    -extern const Name readout_signal;
    -extern const Name readout_signal_unnorm;
    -extern const Name receptor_idx;
    -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 regular_spike_arrival;
    -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 rng_seed;
    -extern const Name rng_type;
    -extern const Name rng_types;
    -extern const Name rport;
    -extern const Name rule;
    -
    -extern const Name S;
    -extern const Name S_act_NMDA;
    -extern const Name s_GABA;
    -extern const Name s_AMPA;
    -extern const Name s_NMDA;
    -extern const Name SIC_scale;
    -extern const Name SIC_th;
    -extern const Name sdev;
    -extern const Name send_buffer_size_secondary_events;
    -extern const Name senders;
    -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 source;
    -extern const Name spherical;
    -extern const Name spike_buffer_grow_extra;
    -extern const Name spike_buffer_resize_log;
    -extern const Name spike_buffer_shrink_limit;
    -extern const Name spike_buffer_shrink_spare;
    -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 stimulation_backends;
    -extern const Name stimulator;
    -extern const Name stimulus_source;
    -extern const Name stop;
    -extern const Name structural_plasticity_synapses;
    -extern const Name structural_plasticity_update_interval;
    -extern const Name surrogate_gradient;
    -extern const Name surrogate_gradient_function;
    -extern const Name synapse_id;
    -extern const Name synapse_label;
    -extern const Name synapse_model;
    -extern const Name synapse_modelid;
    -extern const Name synapse_models;
    -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;
    -
    -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_signal;
    -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_AMPA;
    -extern const Name tau_GABA;
    -extern const Name tau_ahp;
    -extern const Name tau_Ca;
    -extern const Name tau_c;
    -extern const Name tau_D_KNa;
    -extern const Name tau_Delta;
    -extern const Name tau_decay;
    -extern const Name tau_decay_AMPA;
    -extern const Name tau_decay_ex;
    -extern const Name tau_decay_GABA_A;
    -extern const Name tau_decay_GABA_B;
    -extern const Name tau_decay_in;
    -extern const Name tau_decay_NMDA;
    -extern const Name tau_epsp;
    -extern const Name tau_fac;
    -extern const Name tau_IP3;
    -extern const Name tau_Mg_fast_NMDA;
    -extern const Name tau_Mg_slow_NMDA;
    -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_m_readout;
    -extern const Name tau_n;
    -extern const Name tau_P;
    -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_ex;
    -extern const Name tau_rise_GABA_A;
    -extern const Name tau_rise_GABA_B;
    -extern const Name tau_rise_in;
    -extern const Name tau_rise_NMDA;
    -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_fast;
    -extern const Name tau_syn_in;
    -extern const Name tau_syn_slow;
    -extern const Name tau_theta;
    -extern const Name tau_u_bar_bar;
    -extern const Name tau_u_bar_minus;
    -extern const Name tau_u_bar_plus;
    -extern const Name tau_V_th;
    -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 third_in;
    -extern const Name third_out;
    -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;
    -extern const Name time_collocate_spike_data;
    -extern const Name time_collocate_spike_data_cpu;
    -extern const Name time_communicate_prepare;
    -extern const Name time_communicate_prepare_cpu;
    -extern const Name time_communicate_spike_data;
    -extern const Name time_communicate_spike_data_cpu;
    -extern const Name time_communicate_target_data;
    -extern const Name time_communicate_target_data_cpu;
    -extern const Name time_construction_connect;
    -extern const Name time_construction_connect_cpu;
    -extern const Name time_construction_create;
    -extern const Name time_construction_create_cpu;
    -extern const Name time_deliver_secondary_data;
    -extern const Name time_deliver_secondary_data_cpu;
    -extern const Name time_deliver_spike_data;
    -extern const Name time_deliver_spike_data_cpu;
    -extern const Name time_gather_secondary_data;
    -extern const Name time_gather_secondary_data_cpu;
    -extern const Name time_gather_spike_data;
    -extern const Name time_gather_spike_data_cpu;
    -extern const Name time_gather_target_data;
    -extern const Name time_gather_target_data_cpu;
    -extern const Name time_omp_synchronization_construction;
    -extern const Name time_omp_synchronization_construction_cpu;
    -extern const Name time_omp_synchronization_simulation;
    -extern const Name time_omp_synchronization_simulation_cpu;
    -extern const Name time_mpi_synchronization;
    -extern const Name time_mpi_synchronization_cpu;
    -extern const Name time_in_steps;
    -extern const Name time_simulate;
    -extern const Name time_simulate_cpu;
    -extern const Name time_update;
    -extern const Name time_update_cpu;
    -extern const Name times;
    -extern const Name to_do;
    -extern const Name total_num_virtual_procs;
    -extern const Name type;
    -extern const Name 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;
    -
    -extern const Name v;
    -extern const Name V_act_NMDA;
    -extern const Name V_clamp;
    -extern const Name v_comp;
    -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_T;
    -extern const Name V_T_star;
    -extern const Name V_th;
    -extern const Name V_th_adapt;
    -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 voltage_clamp;
    -extern const Name voltage_reset_add;
    -extern const Name voltage_reset_fraction;
    -extern const Name volume_transmitter;
    -extern const Name vp;
    -
    -extern const Name Wmax;
    -extern const Name Wmin;
    -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 x;
    -extern const Name x_bar;
    -
    -extern const Name y;
    -extern const Name y_0;
    -extern const Name y_1;
    -
    -extern const Name z;
    -extern const Name z_connected;
    +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 AMPA( "AMPA" );
    +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 ASCurrents( "ASCurrents" );
    +const std::string ASCurrents_sum( "ASCurrents_sum" );
    +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 adapt_beta( "adapt_beta" );
    +const std::string adapt_tau( "adapt_tau" );
    +const std::string adaptation( "adaptation" );
    +const std::string adapting_threshold( "adapting_threshold" );
    +const std::string adaptive_target_buffers( "adaptive_target_buffers" );
    +const std::string add_compartments( "add_compartments" );
    +const std::string add_receptors( "add_receptors" );
    +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 amp_slow( "amp_slow" );
    +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 average_gradient( "average_gradient" );
    +const std::string azimuth_angle( "azimuth_angle" );
    +
    +const std::string b( "b" );
    +const std::string batch_size( "batch_size" );
    +const std::string beta( "beta" );
    +const std::string beta_1( "beta_1" );
    +const std::string beta_2( "beta_2" );
    +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" );
    +
    +const std::string C_m( "C_m" );
    +const std::string Ca( "Ca" );
    +const std::string Ca_astro( "Ca_astro" );
    +const std::string Ca_tot( "Ca_tot" );
    +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 c_reg( "c_reg" );
    +const std::string capacity( "capacity" );
    +const std::string center( "center" );
    +const std::string circular( "circular" );
    +const std::string clear( "clear" );
    +const std::string comp_idx( "comp_idx" );
    +const std::string comparator( "comparator" );
    +const std::string compartments( "compartments" );
    +const std::string conc_Mg2( "conc_Mg2" );
    +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_rules( "connection_rules" );
    +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" );
    +
    +const std::string Delta_T( "Delta_T" );
    +const std::string Delta_V( "Delta_V" );
    +const std::string d( "d" );
    +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_IP3( "delta_IP3" );
    +const std::string delta_P( "delta_P" );
    +const std::string delta_tau( "delta_tau" );
    +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 dI_syn_ex( "dI_syn_ex" );
    +const std::string dI_syn_in( "dI_syn_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" );
    +const std::string dU( "U" );
    +
    +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_K( "E_K" );
    +const std::string E_L( "E_L" );
    +const std::string E_Na( "E_Na" );
    +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_h( "E_rev_h" );
    +const std::string E_rev_KNa( "E_rev_KNa" );
    +const std::string E_rev_NaP( "E_rev_NaP" );
    +const std::string E_rev_NMDA( "E_rev_NMDA" );
    +const std::string E_rev_T( "E_rev_T" );
    +const std::string E_rr( "E_rr" );
    +const std::string E_sfa( "E_sfa" );
    +const std::string e_L( "e_L" );
    +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 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" );
    +const std::string eps( "eps" );
    +const std::string epsilon( "epsilon" );
    +const std::string equilibrate( "equilibrate" );
    +const std::string error_signal( "error_signal" );
    +const std::string eta( "eta" );
    +const std::string events( "events" );
    +const std::string extent( "extent" );
    +
    +const std::string f_target( "f_target" );
    +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" );
    +
    +const std::string GABA( "GABA" );
    +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_ahp( "g_ahp" );
    +const std::string g_C( "g_C" );
    +const std::string g_ex( "g_ex" );
    +const std::string g_GABA_A( "g_GABA_A" );
    +const std::string g_GABA_B( "g_GABA_B" );
    +const std::string g_in( "g_in" );
    +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_m( "g_m" );
    +const std::string g_Na( "g_Na" );
    +const std::string g_NaL( "g_NaL" );
    +const std::string g_NMDA( "g_NMDA" );
    +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_h( "g_peak_h" );
    +const std::string g_peak_KNa( "g_peak_KNa" );
    +const std::string g_peak_NaP( "g_peak_NaP" );
    +const std::string g_peak_NMDA( "g_peak_NMDA" );
    +const std::string g_peak_T( "g_peak_T" );
    +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( "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" );
    +const std::string growth_curves( "growth_curves" );
    +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" );
    +
    +const std::string h( "h" );
    +const std::string h_IP3R( "h_IP3R" );
    +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" );
    +
    +const std::string I( "I" );
    +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_AMPA( "I_AMPA" );
    +const std::string I_GABA( "I_GABA" );
    +const std::string I_KNa( "I_KNa" );
    +const std::string I_NMDA( "I_NMDA" );
    +const std::string I_NaP( "I_NaP" );
    +const std::string I_SIC( "I_SIC" );
    +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 I_T( "I_T" );
    +const std::string Inact_h( "Inact_h" );
    +const std::string Inact_p( "Inact_p" );
    +const std::string IP3( "IP3" );
    +const std::string IP3_0( "IP3_0" );
    +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" );
    +
    +const std::string Kd_act( "Kd_act" );
    +const std::string Kd_IP3_1( "Kd_IP3_1" );
    +const std::string Kd_IP3_2( "Kd_IP3_2" );
    +const std::string Kd_inh( "Kd_inh" );
    +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" );
    +
    +const std::string label( "label" );
    +const std::string lambda( "lambda" );
    +const std::string lambda_0( "lambda_0" );
    +const std::string learning_signal( "learning_signal" );
    +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 loss( "loss" );
    +const std::string lower_left( "lower_left" );
    +
    +const std::string m( "m" );
    +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_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 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" );
    +const std::string mu_plus( "mu_plus" );
    +const std::string mult_coupling( "mult_coupling" );
    +const std::string music_channel( "music_channel" );
    +
    +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 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" );
    +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" );
    +
    +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" );
    +const std::string other( "other" );
    +const std::string outdegree( "outdegree" );
    +const std::string outer_radius( "outer_radius" );
    +const std::string overwrite_files( "overwrite_files" );
    +
    +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 pairwise_avg_num_conns( "pairwise_avg_num_conns" );
    +const std::string params( "params" );
    +const std::string parent_idx( "parent_idx" );
    +const std::string phase( "phase" );
    +const std::string phi_max( "phi_max" );
    +const std::string pairwise_poisson( "pairwise_poisson" );
    +const std::string polar_angle( "polar_angle" );
    +const std::string polar_axis( "polar_axis" );
    +const std::string pool_size( "pool_size" );
    +const std::string pool_type( "pool_type" );
    +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 prepared( "prepared" );
    +const std::string primary( "primary" );
    +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" );
    +
    +const std::string q_rr( "q_rr" );
    +const std::string q_sfa( "q_sfa" );
    +const std::string q_stc( "q_stc" );
    +
    +const std::string radius( "radius" );
    +const std::string rate( "rate" );
    +const std::string rate_IP3R( "rate_IP3R" );
    +const std::string rate_L( "rate_L" );
    +const std::string rate_SERCA( "rate_SERCA" );
    +const std::string rate_slope( "rate_slope" );
    +const std::string rate_times( "rate_times" );
    +const std::string rate_values( "rate_values" );
    +const std::string ratio_ER_cyt( "ratio_ER_cyt" );
    +const std::string readout_cycle_duration( "readout_cycle_duration" );
    +const std::string readout_signal( "readout_signal" );
    +const std::string readout_signal_unnorm( "readout_signal_unnorm" );
    +const std::string receptor_idx( "receptor_idx" );
    +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 regular_spike_arrival( "regular_spike_arrival" );
    +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 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" );
    +
    +const std::string S( "S" );
    +const std::string S_act_NMDA( "S_act_NMDA" );
    +const std::string s_NMDA( "s_NMDA" );
    +const std::string s_AMPA( "s_AMPA" );
    +const std::string s_GABA( "s_GABA" );
    +const std::string SIC_scale( "SIC_scale" );
    +const std::string SIC_th( "SIC_th" );
    +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 source( "source" );
    +const std::string spherical( "spherical" );
    +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_shrink_limit( "spike_buffer_shrink_limit" );
    +const std::string spike_buffer_shrink_spare( "spike_buffer_shrink_spare" );
    +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 stimulation_backends( "stimulation_backends" );
    +const std::string stimulator( "stimulator" );
    +const std::string stimulus_source( "stimulus_source" );
    +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 surrogate_gradient( "surrogate_gradient" );
    +const std::string surrogate_gradient_function( "surrogate_gradient_function" );
    +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_models( "synapse_models" );
    +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" );
    +
    +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_signal( "target_signal" );
    +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_AMPA( "tau_AMPA" );
    +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_GABA( "tau_GABA" );
    +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_c( "tau_c" );
    +const std::string tau_decay( "tau_decay" );
    +const std::string tau_decay_AMPA( "tau_decay_AMPA" );
    +const std::string tau_decay_ex( "tau_decay_ex" );
    +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_in( "tau_decay_in" );
    +const std::string tau_decay_NMDA( "tau_decay_NMDA" );
    +const std::string tau_epsp( "tau_epsp" );
    +const std::string tau_fac( "tau_fac" );
    +const std::string tau_IP3( "tau_IP3" );
    +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_m_readout( "tau_m_readout" );
    +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_ex( "tau_rise_ex" );
    +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_in( "tau_rise_in" );
    +const std::string tau_rise_NMDA( "tau_rise_NMDA" );
    +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_fast( "tau_syn_fast" );
    +const std::string tau_syn_in( "tau_syn_in" );
    +const std::string tau_syn_slow( "tau_syn_slow" );
    +const std::string tau_theta( "tau_theta" );
    +const std::string tau_u_bar_bar( "tau_u_bar_bar" );
    +const std::string tau_u_bar_minus( "tau_u_bar_minus" );
    +const std::string tau_u_bar_plus( "tau_u_bar_plus" );
    +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 third_in( "third_in" );
    +const std::string third_out( "third_out" );
    +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" );
    +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" );
    +const std::string type( "type" );
    +const std::string type_id( "type_id" );
    +
    +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" );
    +
    +const std::string v( "v" );
    +const std::string V_act_NMDA( "V_act_NMDA" );
    +const std::string V_clamp( "V_clamp" );
    +const std::string v_comp( "v_comp" );
    +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_T( "V_T" );
    +const std::string V_T_star( "V_T_star" );
    +const std::string V_th( "V_th" );
    +const std::string V_th_adapt( "V_th_adapt" );
    +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 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 volume_transmitter( "volume_transmitter" );
    +const std::string vp( "vp" );
    +
    +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" );
    +
    +const std::string x( "x" );
    +const std::string x_bar( "x_bar" );
    +
    +const std::string y( "y" );
    +const std::string y_0( "y_0" );
    +const std::string y_1( "y_1" );
    +
    +const std::string z( "z" );
    +const std::string z_connected( "z_connected" );
    +
     } // namespace names
     
     } // namespace nest
    diff --git a/nestkernel/nest_time.cpp b/nestkernel/nest_time.cpp
    index dfae699e8b..9a5cd5a133 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;
     
     const double Time::Range::TICS_PER_MS_DEFAULT = CONFIG_TICS_PER_MS;
    @@ -126,25 +121,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 f579af5659..c84db5c01c 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;
    @@ -264,10 +262,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 77e8d3ae7d..0000000000
    --- a/nestkernel/nestmodule.cpp
    +++ /dev/null
    @@ -1,2228 +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 "connection_creator_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 "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" ); // 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 = 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_()
    -{
    -  static GenericFactory< Parameter > factory;
    -  return factory;
    -}
    -
    -
    -GenericFactory< AbstractMask >&
    -NestModule::mask_factory_()
    -{
    -  static GenericFactory< AbstractMask > factory;
    -  return factory;
    -}
    -
    -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 ( 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 = getValue< std::vector< double > >( d, names::anchor );
    -  }
    -
    -  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." );
    -  }
    -
    -  BallMask< 2 > outer_circle( center, outer );
    -  BallMask< 2 > inner_circle( center, inner );
    -
    -  return new DifferenceMask< 2 >( outer_circle, inner_circle );
    -}
    -
    -
    -void
    -NestModule::SetStatus_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() );
    -  size_t 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();
    -}
    -
    -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 )
    -  {
    -    size_t 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 );
    -
    -  size_t 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." );
    -  }
    -
    -  DictionaryDatum dict = DictionaryDatum( new Dictionary );
    -  nc->get_metadata_status( dict );
    -
    -  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();
    -}
    -
    -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();
    -}
    -
    -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::Install_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const std::string modulename = getValue< std::string >( i->OStack.pick( 0 ) );
    -
    -  kernel().module_manager.install( modulename );
    -
    -  i->OStack.pop();
    -  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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -
    -void
    -NestModule::PrepareFunction::execute( SLIInterpreter* i ) const
    -{
    -  prepare();
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::CleanupFunction::execute( SLIInterpreter* i ) const
    -{
    -  cleanup();
    -  i->EStack.pop();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -
    -void
    -NestModule::ConnectTripartite_g_g_g_D_D_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  kernel().connection_manager.sw_construction_connect.start();
    -
    -  i->assert_stack_load( 6 );
    -
    -  NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 5 ) );
    -  NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 4 ) );
    -  NodeCollectionDatum third = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) );
    -  DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 2 ) );
    -  DictionaryDatum third_connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  DictionaryDatum synapse_specs_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  std::map< Name, std::vector< DictionaryDatum > > synapse_specs {
    -    { names::primary, {} }, { names::third_in, {} }, { names::third_out, {} }
    -  };
    -
    -  for ( auto& [ key, syn_spec_array ] : synapse_specs )
    -  {
    -    ArrayDatum spec = getValue< ArrayDatum >( ( *synapse_specs_dict )[ key ] );
    -
    -    for ( auto syn_param : spec )
    -    {
    -      syn_spec_array.push_back( getValue< DictionaryDatum >( syn_param ) );
    -    }
    -  }
    -
    -  // dictionary access checking is handled by connect
    -  connect_tripartite( sources, targets, third, connectivity, third_connectivity, synapse_specs );
    -
    -  i->OStack.pop( 6 );
    -  i->EStack.pop();
    -
    -  kernel().connection_manager.sw_construction_connect.stop();
    -}
    -
    -
    -void
    -NestModule::ConnectSonata_D_Function::execute( SLIInterpreter* i ) const
    -{
    -  kernel().connection_manager.sw_construction_connect.start();
    -
    -  i->assert_stack_load( 2 );
    -
    -  DictionaryDatum graph_specs = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  const long hyberslab_size = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  kernel().connection_manager.connect_sonata( graph_specs, hyberslab_size );
    -
    -  i->OStack.pop( 2 );
    -  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();
    -}
    -
    -void
    -NestModule::PrintNodesFunction::execute( SLIInterpreter* i ) const
    -{
    -  print_nodes_to_stream();
    -  std::cout << std::endl;
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::PrintNodesToStreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  std::stringstream out;
    -  print_nodes_to_stream( out );
    -
    -  i->OStack.push( out.str() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::RankFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_rank() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::NumProcessesFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_num_processes() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::SyncProcessesFunction::execute( SLIInterpreter* i ) const
    -{
    -  kernel().mpi_manager.synchronize();
    -  i->EStack.pop();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -void
    -NestModule::ProcessorNameFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_processor_name() );
    -  i->EStack.pop();
    -}
    -
    -#ifdef HAVE_MPI
    -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_g_lFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const std::string selection = getValue< std::string >( i->OStack.pick( 0 ) );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -
    -  ArrayDatum node_ids = nodecollection->to_array( selection );
    -
    -  i->OStack.pop( 2 );
    -  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->get_nc_index( 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 ) );
    -
    -  size_t 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 size_t node_id = ( *nodecollection )[ idx ];
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( node_id );
    -  i->EStack.pop();
    -}
    -
    -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
    -
    -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
    -
    -
    -void
    -NestModule::EnableStructuralPlasticity_Function::execute( SLIInterpreter* i ) const
    -{
    -  kernel().sp_manager.enable_structural_plasticity();
    -
    -  i->EStack.pop();
    -}
    -void
    -NestModule::DisableStructuralPlasticity_Function::execute( SLIInterpreter* i ) const
    -{
    -  kernel().sp_manager.disable_structural_plasticity();
    -
    -  i->EStack.pop();
    -}
    -
    -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();
    -}
    -
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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
    -
    -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 );
    -}
    -
    -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 );
    -}
    -
    -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
    -//
    -
    -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();
    -}
    -
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -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();
    -}
    -
    -
    -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< size_t > 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, size_t >::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, size_t >::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 )
    -{
    -  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( "Install", &install_sfunction );
    -
    -  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( "ConnectSonata_D", &ConnectSonata_D_Function );
    -  i->createcommand( "ConnectTripartite_g_g_g_D_D_D", &connect_tripartite_g_g_g_D_D_Dfunction );
    -
    -  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( "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_l", &cva_g_lfunction );
    -  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 );
    -
    -  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" );
    -  register_parameter< GaborParameter >( "gabor" );
    -
    -#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 d381e699b6..0000000000
    --- a/nestkernel/nestmodule.h
    +++ /dev/null
    @@ -1,1891 +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 Name& 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 Token& t );
    -
    -  /**
    -   * 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 DictionaryDatum& d );
    -
    -  /**
    -   * 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.
    -   */
    -
    -  //@{
    -
    -  /** @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
    -   */
    -
    -  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;
    -
    -  /** @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, modeldict, Set, SetStatus_dict
    -   */
    -
    -  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;
    -
    -  /** @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
    -   */
    -  class SetDefaults_l_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setdefaults_l_Dfunction;
    -
    -  /** @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
    -   */
    -  class GetDefaults_lFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getdefaults_lfunction;
    -
    -  /** @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 giving the name of the copy to create, must not
    -   *               exist in modeldict or synapsedict before
    -   * /param_dict - parameters to set in the new_model
    -   * Description:
    -   * A copy of model is created and registered in modeldict or synapsedict
    -   * under the name new_model. If a parameter dictionary is given, the parameters
    -   * are set in new_model.
    -   * Warning: It is impossible to unload modules after use of CopyModel.
    -   */
    -  class CopyModel_l_l_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } copymodel_l_l_Dfunction;
    -
    -  /** @BeginDocumentation
    -   *  Name: Install - install dynamically loaded module
    -   */
    -  class Install_sFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } install_sfunction;
    -
    -  class GetConnections_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getconnections_Dfunction;
    -
    -  /** @BeginDocumentation
    -   *   Name: Simulate - simulate n milliseconds
    -   *
    -   *   Synopsis:
    -   *   n(int) Simulate -> -
    -   *
    -   *   Description: Simulate the network for n milliseconds.
    -   *
    -   *   SeeAlso: Run, Prepare, Cleanup, unit_conversion
    -   */
    -  class SimulateFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } simulatefunction;
    -
    -  /** @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
    -   */
    -
    -  class PrepareFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } preparefunction;
    -
    -  /** @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
    -   */
    -  class RunFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } runfunction;
    -
    -  /** @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
    -   */
    -  class CleanupFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } cleanupfunction;
    -
    -  /** @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 (entry in modeldict)
    -   *  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.
    -   *
    -   *  SeeAlso: modeldict
    -   */
    -  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 ConnectSonata_D_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const;
    -  } ConnectSonata_D_Function;
    -
    -  class ConnectTripartite_g_g_g_D_D_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } connect_tripartite_g_g_g_D_D_Dfunction;
    -
    -  class ResetKernelFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } resetkernelfunction;
    -
    -  /** @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
    -   */
    -  class MemoryInfoFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } memoryinfofunction;
    -
    -  /** @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.
    -   */
    -  class PrintNodesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } printnodesfunction;
    -
    -  /** 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.
    -   */
    -  class PrintNodesToStreamFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } printnodestostreamfunction;
    -
    -  /** @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
    -   */
    -  class RankFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } rankfunction;
    -
    -  /** @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
    -   */
    -  class NumProcessesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } numprocessesfunction;
    -
    -  /** @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
    -   */
    -  class SyncProcessesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } syncprocessesfunction;
    -
    -  /** @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
    -   */
    -  class TimeCommunication_i_i_bFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunication_i_i_bfunction;
    -
    -  /** @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!!!
    -   */
    -  class TimeCommunicationv_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationv_i_ifunction;
    -
    -  /** @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
    -   */
    -  class TimeCommunicationAlltoall_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationalltoall_i_ifunction;
    -
    -  /** @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
    -   */
    -  class TimeCommunicationAlltoallv_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationalltoallv_i_ifunction;
    -
    -  /** @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
    -   */
    -  class ProcessorNameFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } processornamefunction;
    -
    -#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
    -   */
    -  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_g_lFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cva_g_lfunction;
    -
    -  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;
    -
    -  /** @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.
    -   */
    -  class Take_g_aFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } take_g_afunction;
    -
    -#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
    -   */
    -  class SetAcceptableLatencyFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } setacceptablelatency_l_dfunction;
    -
    -  class SetMaxBufferedFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } setmaxbuffered_l_ifunction;
    -#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
    -   */
    -  class EnableStructuralPlasticity_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } enablestructuralplasticity_function;
    -
    -  /**
    -   * Disable Structural Plasticity in the network.
    -   * @param i
    -   */
    -  class DisableStructuralPlasticity_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } disablestructuralplasticity_function;
    -
    -  /**
    -   * 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
    -   */
    -  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;
    -
    -  /** @BeginDocumentation
    -    Name: CreateParameter
    -  */
    -  class CreateParameter_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createparameter_Dfunction;
    -
    -  /** @BeginDocumentation
    -    Name: GetValue
    -  */
    -  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;
    -
    -  /** @BeginDocumentation
    -    Name: Apply
    -  */
    -  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
    -
    -  /** @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
    -   */
    -  class CGParse_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgparse_sfunction;
    -
    -  /** @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
    -   */
    -  class CGParseFile_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgparsefile_sfunction;
    -
    -  /** @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
    -   */
    -  class CGSelectImplementation_s_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgselectimplementation_s_sfunction;
    -#endif
    -
    -  //
    -  // 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
    -   */
    -  class CreateLayer_D_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createlayer_D_Dfunction;
    -
    -  /** @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
    -   */
    -  class GetPosition_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getposition_gfunction;
    -
    -  /** @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
    -   */
    -  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;
    -
    -  /** @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
    -   */
    -  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;
    -
    -  /** @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: 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
    -   *//** @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
    -   */
    -  class ConnectLayers_g_g_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } connectlayers_g_g_Dfunction;
    -
    -  /** @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
    -   */
    -  class CreateMask_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createmask_Dfunction;
    -
    -  /** @BeginDocumentation
    -   *
    -   *  Name: nest::GetLayerStatus - return information about layer
    -   *
    -   *  Synopsis:
    -   *  layer GetLayerStatus -> dict
    -   *
    -   *  Parameters:
    -   *  layer - NodeCollection representing layer
    -   *
    -   *  Returns:
    -   *  Status dictionary with information about layer
    -   */
    -  class GetLayerStatus_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getlayerstatus_gfunction;
    -
    -  /** @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
    -   */
    -  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;
    -
    -  /** @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, modeldict
    -   */
    -  class DumpLayerNodes_os_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } dumplayernodes_os_gfunction;
    -
    -  /** @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
    -   */
    -  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 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 );
    -}
    -
    -} // namespace
    -
    -#endif
    diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp
    index 6f54cc1075..48dc9866e0 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
     {
     
    @@ -124,10 +119,10 @@ Node::get_model_() const
       return *kernel().model_manager.get_node_model( model_id_ );
     }
     
    -DictionaryDatum
    +dictionary
     Node::get_status_dict_()
     {
    -  return DictionaryDatum( new Dictionary );
    +  return {};
     }
     
     void
    @@ -143,26 +138,26 @@ Node::get_local_device_id() const
       return invalid_index;
     }
     
    -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::model_id ] = get_model_id();
    -  ( *dict )[ names::global_id ] = get_node_id();
    -  ( *dict )[ names::vp ] = get_vp();
    -  ( *dict )[ names::element_type ] = LiteralDatum( get_element_type() );
    +  dict[ names::local ] = kernel().node_manager.is_local_node( this );
    +  dict[ names::model ] = get_name();
    +  dict[ names::model_id ] = get_model_id();
    +  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 ] = 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 ] = 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
    @@ -172,7 +167,7 @@ Node::get_status_base()
     }
     
     void
    -Node::set_status_base( const DictionaryDatum& dict )
    +Node::set_status_base( const dictionary& dict )
     {
       try
       {
    @@ -181,10 +176,10 @@ Node::set_status_base( const DictionaryDatum& 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() ) );
       }
     
    -  updateValue< bool >( dict, names::frozen, frozen_ );
    +  dict.update_value( names::frozen, frozen_ );
     }
     
     /**
    diff --git a/nestkernel/node.h b/nestkernel/node.h
    index 5c41113f43..f8677c3f40 100644
    --- a/nestkernel/node.h
    +++ b/nestkernel/node.h
    @@ -40,10 +40,7 @@
     #include "nest_time.h"
     #include "nest_types.h"
     #include "secondary_event.h"
    -#include "weight_optimizer.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     /** @file node.h
      * Declarations for base class Node
    @@ -54,7 +51,7 @@ namespace nest
     class Model;
     class ArchivingNode;
     class TimeConverter;
    -
    +class WeightOptimizer;
     
     /**
      * @defgroup user_interface Model developer interface.
    @@ -181,15 +178,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.
    @@ -339,7 +335,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
    @@ -348,7 +344,7 @@ class Node
        * @param d Dictionary.
        * @ingroup status_interface
        */
    -  virtual void get_status( DictionaryDatum& ) const = 0;
    +  virtual void get_status( dictionary& ) const = 0;
     
     public:
       /**
    @@ -711,7 +707,7 @@ class Node
        * @ingroup SP_functions
        */
       virtual double
    -  get_synaptic_elements( Name ) const
    +  get_synaptic_elements( std::string ) const
       {
         return 0.0;
       }
    @@ -722,7 +718,7 @@ class Node
        * @ingroup SP_functions
        */
       virtual int
    -  get_synaptic_elements_vacant( Name ) const
    +  get_synaptic_elements_vacant( std::string ) const
       {
         return 0;
       }
    @@ -734,7 +730,7 @@ class Node
        * @ingroup SP_functions
        */
       virtual int
    -  get_synaptic_elements_connected( Name ) const
    +  get_synaptic_elements_connected( std::string ) const
       {
         return 0;
       }
    @@ -745,10 +741,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 >();
       }
     
       /**
    @@ -775,12 +771,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).
    @@ -965,10 +960,10 @@ 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.
        */
    -  DictionaryDatum get_status_base();
    +  dictionary get_status_base();
     
       /**
        * Set status dictionary of a node.
    @@ -976,7 +971,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.
    @@ -1039,7 +1034,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:
       /**
    @@ -1173,7 +1168,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 b4323921f4..8c3a2f5a9d 100644
    --- a/nestkernel/node_collection.cpp
    +++ b/nestkernel/node_collection.cpp
    @@ -317,54 +317,11 @@ 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 )
     {
    -  return NodeCollection::create_( { node_id } );
    +  std::vector< size_t > node_id_vec = { node_id };
    +  return NodeCollection::create_( node_id_vec );
     }
     
     NodeCollectionPTR
    @@ -452,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 )
    @@ -518,10 +475,10 @@ NodeCollectionPrimitive::NodeCollectionPrimitive()
     {
     }
     
    -ArrayDatum
    +std::vector< size_t >
     NodeCollection::to_array( const std::string& selection ) const
     {
    -  ArrayDatum node_ids;
    +  std::vector< size_t > node_ids;
     
       if ( selection == "thread" )
       {
    diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h
    index 0b127e574d..951ddeffe9 100644
    --- a/nestkernel/node_collection.h
    +++ b/nestkernel/node_collection.h
    @@ -31,15 +31,13 @@
     #include <vector>
     
     // Includes from libnestuil:
    +#include "dictionary.h"
     #include "lockptr.h"
     
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
     
     // Includes from thirdparty:
     #include "compose.hpp"
    @@ -67,15 +65,19 @@ class NodeCollectionMetadata
       NodeCollectionMetadata() = default;
       virtual ~NodeCollectionMetadata() = default;
     
    -  virtual void set_status( const DictionaryDatum&, bool ) = 0;
    +  virtual void set_status( const dictionary&, bool ) = 0;
     
       /**
        * Retrieve status information sliced according to slicing of node collection
        *
        * @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( DictionaryDatum&, 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;
    @@ -579,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.
        *
    @@ -708,13 +688,13 @@ class NodeCollection
       virtual const_iterator end( NodeCollectionPTR = NodeCollectionPTR( nullptr ) ) const = 0;
     
       /**
    -   * Method that creates an ArrayDatum filled with node IDs from the NodeCollection; for debugging
    +   * Method that creates a vector filled with node IDs from the NodeCollection; for debugging
        *
        * @param selection is "all", "rank" or "thread"
        *
    -   * @return an ArrayDatum containing node IDs ; if thread, separate thread sections by "0 thread# 0"
    +   * @return an vector containing node IDs ; if thread, separate thread sections by "0 thread# 0"
        */
    -  ArrayDatum to_array( const std::string& selection ) const;
    +  std::vector< size_t > to_array( const std::string& selection ) const;
     
       /**
        * Get the size of the NodeCollection.
    @@ -793,7 +773,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
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index ca5f28ed98..0f871b77e2 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -24,6 +24,7 @@
     
     // C++ includes:
     #include <algorithm>
    +#include <iomanip>
     #include <set>
     
     // Includes from libnestutil:
    @@ -39,8 +40,6 @@
     #include "vp_manager.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    @@ -87,14 +86,14 @@ NodeManager::finalize( const bool )
       clear_node_collection_container();
     }
     
    -DictionaryDatum
    +dictionary
     NodeManager::get_status( size_t idx )
     {
       Node* target = get_mpi_local_node_or_device_head( idx );
     
       assert( target );
     
    -  DictionaryDatum d = target->get_status_base();
    +  dictionary d = target->get_status_base();
     
       return d;
     }
    @@ -129,8 +128,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 );
    @@ -149,11 +147,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 );
         }
       }
     
    @@ -196,38 +194,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
     }
    @@ -239,33 +236,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
     }
    @@ -275,34 +271,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
     }
    @@ -339,13 +334,13 @@ NodeManager::clear_node_collection_container()
     }
     
     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;
    +  std::vector< size_t > nodes;
     
    -  if ( params->empty() )
    +  if ( params.empty() )
       {
    -    std::vector< std::vector< long > > nodes_on_thread;
    +    std::vector< std::vector< size_t > > nodes_on_thread;
         nodes_on_thread.resize( kernel().vp_manager.get_num_threads() );
     #pragma omp parallel
         {
    @@ -369,18 +364,17 @@ NodeManager::get_nodes( const DictionaryDatum& 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();
     
    -        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 ( const auto& [ key, entry ] : params )
             {
    -          if ( node_status->known( dict_entry->first ) )
    +          if ( node_status.known( key ) )
               {
    -            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( key ), entry.item ) )
                 {
                   match = false;
                   break;
    @@ -397,7 +391,7 @@ NodeManager::get_nodes( const DictionaryDatum& 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 )
    @@ -410,16 +404,14 @@ NodeManager::get_nodes( const DictionaryDatum& params, const bool local_only )
     
         // get rid of any multiple entries
         std::sort( nodes.begin(), nodes.end() );
    -    std::vector< long >::iterator it;
    -    it = std::unique( nodes.begin(), nodes.end() );
    +    const auto 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 ) );
    +  NodeCollectionPTR nodecollection = NodeCollection::create( nodes );
     
    -  return std::move( nodecollection );
    +  return nodecollection;
     }
     
     bool
    @@ -608,20 +600,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();
    +      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: " );
    +    // 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" );
       }
     }
     
    @@ -644,17 +637,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() )
    @@ -667,19 +660,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 );
         }
       }
     
    @@ -770,7 +763,7 @@ NodeManager::print( std::ostream& out ) const
     }
     
     void
    -NodeManager::set_status( size_t node_id, const DictionaryDatum& d )
    +NodeManager::set_status( size_t node_id, const dictionary& d )
     {
       for ( size_t t = 0; t < kernel().vp_manager.get_num_threads(); ++t )
       {
    @@ -783,14 +776,14 @@ NodeManager::set_status( size_t node_id, const DictionaryDatum& d )
     }
     
     void
    -NodeManager::get_status( DictionaryDatum& d )
    +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 );
     }
     
     void
    -NodeManager::set_status( const DictionaryDatum& )
    +NodeManager::set_status( const dictionary& )
     {
     }
     
    diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h
    index cedd0eb1b2..532f87cf38 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
     {
    @@ -54,8 +51,8 @@ class NodeManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Get properties of a node.
    @@ -63,7 +60,7 @@ class NodeManager : public ManagerInterface
        * The specified node must exist.
        * @throws nest::UnknownNode       Target does not exist in the network.
        */
    -  DictionaryDatum get_status( size_t );
    +  dictionary get_status( size_t );
     
       /**
        * Set properties of a Node.
    @@ -74,7 +71,7 @@ class NodeManager : public ManagerInterface
        *                                          entry.
        * @throws TypeMismatch   Array is not a flat & homogeneous array of integers.
        */
    -  void set_status( size_t, const DictionaryDatum& );
    +  void set_status( size_t, const dictionary& );
     
       /**
        * Add a number of nodes to the network.
    @@ -102,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.
    @@ -272,7 +269,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.
    @@ -353,7 +350,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< StopwatchGranularity::Normal, StopwatchParallelism::MasterOnly > sw_construction_create_;
    diff --git a/nestkernel/ntree.h b/nestkernel/ntree.h
    index 256f16deec..94a2719243 100644
    --- a/nestkernel/ntree.h
    +++ b/nestkernel/ntree.h
    @@ -306,6 +306,12 @@ class Ntree
        */
       iterator insert( iterator, const value_type& val );
     
    +  /**
    +   * STL container compatible push_back method
    +   */
    +  void push_back( const value_type& val );
    +
    +
       /**
        * @returns member nodes in ntree and their position.
        */
    @@ -486,6 +492,15 @@ Ntree< D, T, max_capacity, max_depth >::insert( iterator, const std::pair< Posit
       return insert( val.first, val.second );
     }
     
    +template < int D, class T, int max_capacity, int max_depth >
    +void
    +Ntree< D, T, max_capacity, max_depth >::push_back( const value_type& val )
    +{
    +  insert( val );
    +}
    +
    +
     } // namespace nest
     
    +
     #endif
    diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp
    index f5d5301f35..69b71836bf 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(
    @@ -78,12 +77,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, mean_ );
    +  d.update_value( names::std, std_ );
       if ( std_ <= 0 )
       {
         throw BadProperty( "nest::NormalParameter: std > 0 required." );
    @@ -104,12 +103,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, mean_ );
    +  d.update_value( names::std, std_ );
       if ( std_ <= 0 )
       {
         throw BadProperty( "nest::LognormalParameter: std > 0 required." );
    @@ -200,7 +199,7 @@ SpatialDistanceParameter::value( RngPtr,
       }
     }
     
    -RedrawParameter::RedrawParameter( const std::shared_ptr< Parameter > p, const double min, const double max )
    +RedrawParameter::RedrawParameter( const ParameterPTR p, const double min, const double max )
       : Parameter( p->is_spatial() )
       , p_( p )
       , min_( min )
    @@ -255,12 +254,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< ParameterPTR >( "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 +276,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< ParameterPTR >( "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,25 +301,25 @@ 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" ) )
    +  , px_( d.get< ParameterPTR >( "x" ) )
    +  , py_( d.get< ParameterPTR >( "y" ) )
    +  , mean_x_( d.get< double >( "mean_x" ) )
    +  , mean_y_( d.get< double >( "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" ) ) )
    +      / ( 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. - 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" );
    +      / ( 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(
    @@ -351,26 +350,26 @@ Gaussian2DParameter::value( RngPtr rng,
     }
     
     
    -GaborParameter::GaborParameter( const DictionaryDatum& d )
    +GaborParameter::GaborParameter( const dictionary& d )
       : Parameter( true )
    -  , px_( getValue< ParameterDatum >( d, "x" ) )
    -  , py_( getValue< ParameterDatum >( d, "y" ) )
    -  , cos_( std::cos( getValue< double >( d, "theta" ) * numerics::pi / 180. ) )
    -  , sin_( std::sin( getValue< double >( d, "theta" ) * numerics::pi / 180. ) )
    -  , gamma_( getValue< double >( d, "gamma" ) )
    -  , inv_two_std2_( 1.0 / ( 2 * getValue< double >( d, "std" ) * getValue< double >( d, "std" ) ) )
    -  , lambda_( getValue< double >( d, "lam" ) )
    -  , psi_( getValue< double >( d, "psi" ) )
    -{
    -  const auto gamma = getValue< double >( d, "gamma" );
    -  const auto std = getValue< double >( d, "std" );
    +  , px_( d.get< ParameterPTR >( "x" ) )
    +  , py_( d.get< ParameterPTR >( "y" ) )
    +  , cos_( std::cos( d.get< double >( "theta" ) * numerics::pi / 180. ) )
    +  , sin_( std::sin( d.get< double >( "theta" ) * numerics::pi / 180. ) )
    +  , gamma_( d.get< double >( "gamma" ) )
    +  , inv_two_std2_( 1.0 / ( 2 * d.get< double >( "std" ) * d.get< double >( "std" ) ) )
    +  , lambda_( d.get< double >( "lam" ) )
    +  , psi_( d.get< double >( "psi" ) )
    +{
    +  const auto gamma = d.get< double >( "gamma" );
    +  const auto std = d.get< double >( "std" );
       if ( std <= 0 )
       {
    -    throw BadProperty( "std > 0 required for gabor function parameter, got std=" + std::to_string( std ) );
    +    throw BadProperty( String::compose( "std > 0 required for gabor function parameter, got std=%1", std ) );
       }
       if ( gamma <= 0 )
       {
    -    throw BadProperty( "gamma > 0 required for gabor function parameter, got gamma=" + std::to_string( gamma ) );
    +    throw BadProperty( String::compose( "gamma > 0 required for gabor function parameter, got gamma=%1", gamma ) );
       }
     }
     
    @@ -395,18 +394,18 @@ GaborParameter::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< ParameterPTR >( "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 ) );
    @@ -425,100 +424,94 @@ GammaParameter::value( RngPtr rng,
     }
     
     
    -std::shared_ptr< Parameter >
    -multiply_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second )
    +ParameterPTR
    +multiply_parameter( const ParameterPTR first, const ParameterPTR second )
     {
    -  return std::shared_ptr< Parameter >( new ProductParameter( first, second ) );
    +  return ParameterPTR( new ProductParameter( first, second ) );
     }
     
    -std::shared_ptr< Parameter >
    -divide_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second )
    +ParameterPTR
    +divide_parameter( const ParameterPTR first, const ParameterPTR second )
     {
    -  return std::shared_ptr< Parameter >( new QuotientParameter( first, second ) );
    +  return ParameterPTR( new QuotientParameter( first, second ) );
     }
     
    -std::shared_ptr< Parameter >
    -add_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second )
    +ParameterPTR
    +add_parameter( const ParameterPTR first, const ParameterPTR second )
     {
    -  return std::shared_ptr< Parameter >( new SumParameter( first, second ) );
    +  return ParameterPTR( new SumParameter( first, second ) );
     }
     
    -std::shared_ptr< Parameter >
    -subtract_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second )
    +ParameterPTR
    +subtract_parameter( const ParameterPTR first, const ParameterPTR second )
     {
    -  return std::shared_ptr< Parameter >( new DifferenceParameter( first, second ) );
    +  return ParameterPTR( new DifferenceParameter( first, second ) );
     }
     
    -std::shared_ptr< Parameter >
    -compare_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second,
    -  const DictionaryDatum& d )
    +ParameterPTR
    +compare_parameter( const ParameterPTR first, const ParameterPTR second, const dictionary& d )
     {
    -  return std::shared_ptr< Parameter >( new ComparingParameter( first, second, d ) );
    +  return ParameterPTR( new ComparingParameter( first, second, d ) );
     }
     
    -std::shared_ptr< Parameter >
    -conditional_parameter( const std::shared_ptr< Parameter > condition,
    -  const std::shared_ptr< Parameter > if_true,
    -  const std::shared_ptr< Parameter > if_false )
    +ParameterPTR
    +conditional_parameter( const ParameterPTR condition, const ParameterPTR if_true, const ParameterPTR if_false )
     {
    -  return std::shared_ptr< Parameter >( new ConditionalParameter( condition, if_true, if_false ) );
    +  return ParameterPTR( new ConditionalParameter( condition, if_true, if_false ) );
     }
     
    -std::shared_ptr< Parameter >
    -min_parameter( const std::shared_ptr< Parameter > parameter, const double other )
    +ParameterPTR
    +min_parameter( const ParameterPTR parameter, const double other )
     {
    -  return std::shared_ptr< Parameter >( new MinParameter( parameter, other ) );
    +  return ParameterPTR( new MinParameter( parameter, other ) );
     }
     
    -std::shared_ptr< Parameter >
    -max_parameter( const std::shared_ptr< Parameter > parameter, const double other )
    +ParameterPTR
    +max_parameter( const ParameterPTR parameter, const double other )
     {
    -  return std::shared_ptr< Parameter >( new MaxParameter( parameter, other ) );
    +  return ParameterPTR( new MaxParameter( parameter, other ) );
     }
     
    -std::shared_ptr< Parameter >
    -redraw_parameter( const std::shared_ptr< Parameter > parameter, const double min, const double max )
    +ParameterPTR
    +redraw_parameter( const ParameterPTR parameter, const double min, const double max )
     {
    -  return std::shared_ptr< Parameter >( new RedrawParameter( parameter, min, max ) );
    +  return ParameterPTR( new RedrawParameter( parameter, min, max ) );
     }
     
    -std::shared_ptr< Parameter >
    -exp_parameter( const std::shared_ptr< Parameter > parameter )
    +ParameterPTR
    +exp_parameter( const ParameterPTR parameter )
     {
    -  return std::shared_ptr< Parameter >( new ExpParameter( parameter ) );
    +  return ParameterPTR( new ExpParameter( parameter ) );
     }
     
    -std::shared_ptr< Parameter >
    -sin_parameter( const std::shared_ptr< Parameter > parameter )
    +ParameterPTR
    +sin_parameter( const ParameterPTR parameter )
     {
    -  return std::shared_ptr< Parameter >( new SinParameter( parameter ) );
    +  return ParameterPTR( new SinParameter( parameter ) );
     }
     
    -std::shared_ptr< Parameter >
    -cos_parameter( const std::shared_ptr< Parameter > parameter )
    +ParameterPTR
    +cos_parameter( const ParameterPTR parameter )
     {
    -  return std::shared_ptr< Parameter >( new CosParameter( parameter ) );
    +  return ParameterPTR( new CosParameter( parameter ) );
     }
     
    -std::shared_ptr< Parameter >
    -pow_parameter( const std::shared_ptr< Parameter > parameter, const double exponent )
    +ParameterPTR
    +pow_parameter( const ParameterPTR parameter, const double exponent )
     {
    -  return std::shared_ptr< Parameter >( new PowParameter( parameter, exponent ) );
    +  return ParameterPTR( new PowParameter( parameter, exponent ) );
     }
     
    -std::shared_ptr< Parameter >
    -dimension_parameter( const std::shared_ptr< Parameter > x_parameter, const std::shared_ptr< Parameter > y_parameter )
    +ParameterPTR
    +dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter )
     {
    -  return std::shared_ptr< Parameter >( new DimensionParameter( x_parameter, y_parameter ) );
    +  return ParameterPTR( new DimensionParameter( x_parameter, y_parameter ) );
     }
     
    -std::shared_ptr< Parameter >
    -dimension_parameter( const std::shared_ptr< Parameter > x_parameter,
    -  const std::shared_ptr< Parameter > y_parameter,
    -  const std::shared_ptr< Parameter > z_parameter )
    +ParameterPTR
    +dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter, const ParameterPTR z_parameter )
     {
    -  return std::shared_ptr< Parameter >( new DimensionParameter( x_parameter, y_parameter, z_parameter ) );
    +  return ParameterPTR( new DimensionParameter( x_parameter, y_parameter, z_parameter ) );
     }
     
     } // namespace nest
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index dfae3cfcb9..5ec44e033f 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -28,17 +28,18 @@
     #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"
     
    -// Includes from libnestutil:
    -#include "dictutils.h"
     
     namespace nest
     {
    +class Parameter;
    +using ParameterPTR = std::shared_ptr< Parameter >;
     
     class AbstractLayer;
     
    @@ -95,10 +96,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.
    @@ -148,9 +148,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" ); // PYNEST-NG: Must be able to pass value as long and double
         returns_int_only_ = value_is_integer_( value_ );
       }
     
    @@ -187,12 +187,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, lower_ );
    +    d.update_value( names::max, range_ );
         if ( lower_ >= range_ )
         {
           throw BadProperty(
    @@ -229,11 +229,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_integer_value( names::max, max_ );
         if ( max_ <= 0 )
         {
           throw BadProperty( "nest::UniformIntParameter: max > 0 required." );
    @@ -268,7 +268,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;
     
    @@ -295,7 +295,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;
     
    @@ -321,10 +321,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, beta_ );
       }
     
       double
    @@ -356,12 +356,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_integer_value( names::dimension, dimension_ );
         if ( not dimension_specified )
         {
           throw BadParameterValue( "Dimension must be specified when creating a node position parameter." );
    @@ -370,7 +370,7 @@ class NodePosParameter : public Parameter
         {
           throw BadParameterValue( "Node position parameter dimension cannot be negative." );
         }
    -    updateValue< long >( d, 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)." );
    @@ -413,7 +413,7 @@ class NodePosParameter : public Parameter
       }
     
     private:
    -  int dimension_;
    +  long dimension_;
       int synaptic_endpoint_;
     
       double get_node_pos_( Node* node ) const;
    @@ -426,11 +426,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_integer_value( names::dimension, dimension_ );
         if ( dimension_ < 0 )
         {
           throw BadParameterValue( "Spatial distance parameter dimension cannot be negative." );
    @@ -465,7 +465,7 @@ class ProductParameter : public Parameter
        *
        * Copies are made of the supplied Parameter objects.
        */
    -  ProductParameter( const std::shared_ptr< Parameter > m1, const std::shared_ptr< Parameter > m2 )
    +  ProductParameter( const ParameterPTR m1, const ParameterPTR m2 )
         : Parameter( m1->is_spatial() or m2->is_spatial(), m1->returns_int_only() and m2->returns_int_only() )
         , parameter1_( m1 )
         , parameter2_( m2 )
    @@ -500,8 +500,8 @@ class ProductParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const parameter1_;
    -  std::shared_ptr< Parameter > const parameter2_;
    +  ParameterPTR const parameter1_;
    +  ParameterPTR const parameter2_;
     };
     
     /**
    @@ -515,7 +515,7 @@ class QuotientParameter : public Parameter
        *
        * Copies are made of the supplied Parameter objects.
        */
    -  QuotientParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2 )
    +  QuotientParameter( ParameterPTR m1, ParameterPTR m2 )
         : Parameter( m1->is_spatial() or m2->is_spatial(), m1->returns_int_only() and m2->returns_int_only() )
         , parameter1_( m1 )
         , parameter2_( m2 )
    @@ -550,8 +550,8 @@ class QuotientParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const parameter1_;
    -  std::shared_ptr< Parameter > const parameter2_;
    +  ParameterPTR const parameter1_;
    +  ParameterPTR const parameter2_;
     };
     
     /**
    @@ -565,7 +565,7 @@ class SumParameter : public Parameter
        *
        * Copies are made of the supplied Parameter objects.
        */
    -  SumParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2 )
    +  SumParameter( ParameterPTR m1, ParameterPTR m2 )
         : Parameter( m1->is_spatial() or m2->is_spatial(), m1->returns_int_only() and m2->returns_int_only() )
         , parameter1_( m1 )
         , parameter2_( m2 )
    @@ -600,8 +600,8 @@ class SumParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const parameter1_;
    -  std::shared_ptr< Parameter > const parameter2_;
    +  ParameterPTR const parameter1_;
    +  ParameterPTR const parameter2_;
     };
     
     /**
    @@ -615,7 +615,7 @@ class DifferenceParameter : public Parameter
        *
        * Copies are made of the supplied Parameter objects.
        */
    -  DifferenceParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2 )
    +  DifferenceParameter( ParameterPTR m1, ParameterPTR m2 )
         : Parameter( m1->is_spatial() or m2->is_spatial(), m1->returns_int_only() and m2->returns_int_only() )
         , parameter1_( m1 )
         , parameter2_( m2 )
    @@ -650,8 +650,8 @@ class DifferenceParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const parameter1_;
    -  std::shared_ptr< Parameter > const parameter2_;
    +  ParameterPTR const parameter1_;
    +  ParameterPTR const parameter2_;
     };
     
     /**
    @@ -673,13 +673,13 @@ class ComparingParameter : public Parameter
        *              1: >
        *
        */
    -  ComparingParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2, const DictionaryDatum& d )
    +  ComparingParameter( ParameterPTR m1, ParameterPTR 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_integer_value( names::comparator, comparator_ ) )
         {
           throw BadParameter( "A comparator has to be specified." );
         }
    @@ -718,8 +718,8 @@ class ComparingParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const parameter1_;
    -  std::shared_ptr< Parameter > const parameter2_;
    +  ParameterPTR const parameter1_;
    +  ParameterPTR const parameter2_;
     
     private:
       bool
    @@ -757,9 +757,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( std::shared_ptr< Parameter > condition,
    -    std::shared_ptr< Parameter > if_true,
    -    std::shared_ptr< Parameter > 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 )
    @@ -810,9 +808,9 @@ class ConditionalParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const condition_;
    -  std::shared_ptr< Parameter > const if_true_;
    -  std::shared_ptr< Parameter > const if_false_;
    +  ParameterPTR const condition_;
    +  ParameterPTR const if_true_;
    +  ParameterPTR const if_false_;
     };
     
     
    @@ -826,7 +824,7 @@ class MinParameter : public Parameter
        * Construct a min parameter. A copy is made of the supplied Parameter
        * object.
        */
    -  MinParameter( std::shared_ptr< Parameter > p, const double other_value )
    +  MinParameter( ParameterPTR p, const double other_value )
         : Parameter( p->is_spatial(), p->returns_int_only() and value_is_integer_( other_value ) )
         , p_( p )
         , other_value_( other_value )
    @@ -861,7 +859,7 @@ class MinParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       double other_value_;
     };
     
    @@ -876,7 +874,7 @@ class MaxParameter : public Parameter
        * Construct a max parameter. A copy is made of the supplied Parameter
        * object.
        */
    -  MaxParameter( std::shared_ptr< Parameter > p, const double other_value )
    +  MaxParameter( ParameterPTR p, const double other_value )
         : Parameter( p->is_spatial(), p->returns_int_only() and value_is_integer_( other_value ) )
         , p_( p )
         , other_value_( other_value )
    @@ -910,7 +908,7 @@ class MaxParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       double other_value_;
     };
     
    @@ -925,7 +923,7 @@ class RedrawParameter : public Parameter
        * Construct a redrawing parameter. A copy is made of the supplied Parameter
        * object.
        */
    -  RedrawParameter( std::shared_ptr< Parameter > p, const double min, const double max );
    +  RedrawParameter( ParameterPTR p, const double min, const double max );
     
       RedrawParameter( const RedrawParameter& p )
         : Parameter( p )
    @@ -947,7 +945,7 @@ class RedrawParameter : public Parameter
         Node* node ) override;
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       double min_;
       double max_;
       const size_t max_redraws_;
    @@ -964,7 +962,7 @@ class ExpParameter : public Parameter
        * Construct the exponential of the given parameter. A copy is made of the
        * supplied Parameter object.
        */
    -  ExpParameter( std::shared_ptr< Parameter > p )
    +  ExpParameter( ParameterPTR p )
         : Parameter( p->is_spatial() )
         , p_( p )
       {
    @@ -996,7 +994,7 @@ class ExpParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
     };
     
     
    @@ -1010,7 +1008,7 @@ class SinParameter : public Parameter
        * Construct the sine of the given parameter. A copy is made of the
        * supplied Parameter object.
        */
    -  SinParameter( std::shared_ptr< Parameter > p )
    +  SinParameter( ParameterPTR p )
         : Parameter( p->is_spatial() )
         , p_( p )
       {
    @@ -1042,7 +1040,7 @@ class SinParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
     };
     
     /**
    @@ -1055,7 +1053,7 @@ class CosParameter : public Parameter
        * Construct the exponential of the given parameter. A copy is made of the
        * supplied Parameter object.
        */
    -  CosParameter( std::shared_ptr< Parameter > p )
    +  CosParameter( ParameterPTR p )
         : Parameter( p->is_spatial() )
         , p_( p )
       {
    @@ -1087,7 +1085,7 @@ class CosParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
     };
     
     
    @@ -1101,7 +1099,7 @@ class PowParameter : public Parameter
       /**
        * Construct the parameter. A copy is made of the supplied Parameter object.
        */
    -  PowParameter( std::shared_ptr< Parameter > p, const double exponent )
    +  PowParameter( ParameterPTR p, const double exponent )
         : Parameter( p->is_spatial(), p->returns_int_only() )
         , p_( p )
         , exponent_( exponent )
    @@ -1135,7 +1133,7 @@ class PowParameter : public Parameter
       }
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       const double exponent_;
     };
     
    @@ -1155,7 +1153,7 @@ class DimensionParameter : public Parameter
        *
        * A copy is made of the supplied Parameter objects.
        */
    -  DimensionParameter( std::shared_ptr< Parameter > px, std::shared_ptr< Parameter > py )
    +  DimensionParameter( ParameterPTR px, ParameterPTR py )
         : Parameter( true )
         , num_dimensions_( 2 )
         , px_( px )
    @@ -1164,9 +1162,7 @@ class DimensionParameter : public Parameter
       {
       }
     
    -  DimensionParameter( std::shared_ptr< Parameter > px,
    -    std::shared_ptr< Parameter > py,
    -    std::shared_ptr< Parameter > pz )
    +  DimensionParameter( ParameterPTR px, ParameterPTR py, ParameterPTR pz )
         : Parameter( true )
         , num_dimensions_( 3 )
         , px_( px )
    @@ -1219,9 +1215,9 @@ class DimensionParameter : public Parameter
     
     protected:
       int num_dimensions_;
    -  std::shared_ptr< Parameter > const px_;
    -  std::shared_ptr< Parameter > const py_;
    -  std::shared_ptr< Parameter > const pz_;
    +  ParameterPTR const px_;
    +  ParameterPTR const py_;
    +  ParameterPTR const pz_;
     };
     
     
    @@ -1238,7 +1234,7 @@ class ExpDistParameter : public Parameter
       /**
        * Construct the parameter from a dictionary of arguments.
        */
    -  ExpDistParameter( const DictionaryDatum& d );
    +  ExpDistParameter( const dictionary& d );
     
       ExpDistParameter( const ExpDistParameter& p )
         : Parameter( p )
    @@ -1264,7 +1260,7 @@ class ExpDistParameter : public Parameter
         Node* node ) override;
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       const double inv_beta_;
     };
     
    @@ -1282,7 +1278,7 @@ class GaussianParameter : public Parameter
       /**
        * Construct the parameter from a dictionary of arguments.
        */
    -  GaussianParameter( const DictionaryDatum& d );
    +  GaussianParameter( const dictionary& d );
     
       GaussianParameter( const GaussianParameter& p )
         : Parameter( p )
    @@ -1308,7 +1304,7 @@ class GaussianParameter : public Parameter
         Node* node ) override;
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       const double mean_;
       const double inv_two_std2_;
     };
    @@ -1327,7 +1323,7 @@ class Gaussian2DParameter : public Parameter
       /**
        * Construct the parameter from a dictionary of arguments.
        */
    -  Gaussian2DParameter( const DictionaryDatum& d );
    +  Gaussian2DParameter( const dictionary& d );
     
       Gaussian2DParameter( const Gaussian2DParameter& p )
         : Parameter( p )
    @@ -1357,8 +1353,8 @@ class Gaussian2DParameter : public Parameter
         Node* node ) override;
     
     protected:
    -  std::shared_ptr< Parameter > const px_;
    -  std::shared_ptr< Parameter > const py_;
    +  ParameterPTR const px_;
    +  ParameterPTR const py_;
       const double mean_x_;
       const double mean_y_;
       const double x_term_const_;
    @@ -1374,7 +1370,7 @@ class GaborParameter : public Parameter
       /**
        * Construct the parameter from a dictionary of arguments.
        */
    -  GaborParameter( const DictionaryDatum& d );
    +  GaborParameter( const dictionary& d );
     
       /**
        * Copy constructor.
    @@ -1432,7 +1428,7 @@ class GammaParameter : public Parameter
       /**
        * Construct the parameter from a dictionary of arguments.
        */
    -  GammaParameter( const DictionaryDatum& d );
    +  GammaParameter( const dictionary& d );
     
       GammaParameter( const GammaParameter& p )
         : Parameter( p )
    @@ -1459,7 +1455,7 @@ class GammaParameter : public Parameter
         Node* node ) override;
     
     protected:
    -  std::shared_ptr< Parameter > const p_;
    +  ParameterPTR const p_;
       const double kappa_;
       const double inv_theta_;
       const double delta_;
    @@ -1501,41 +1497,35 @@ Parameter::value_is_integer_( const double value ) const
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > multiply_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second );
    +ParameterPTR multiply_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the quotient of one parameter with another.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > divide_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second );
    +ParameterPTR divide_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the sum of one parameter with another.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > add_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second );
    +ParameterPTR add_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the difference between one parameter and another.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > subtract_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second );
    +ParameterPTR subtract_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create comparison of one parameter with another.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > compare_parameter( const std::shared_ptr< Parameter > first,
    -  const std::shared_ptr< Parameter > second,
    -  const DictionaryDatum& d );
    +ParameterPTR compare_parameter( const ParameterPTR first, const ParameterPTR second, const dictionary& d );
     
     /**
      * Create a parameter that chooses between two other parameters,
    @@ -1546,71 +1536,67 @@ std::shared_ptr< Parameter > compare_parameter( const std::shared_ptr< Parameter
      * evaluate as true.
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > conditional_parameter( const std::shared_ptr< Parameter > condition,
    -  const std::shared_ptr< Parameter > if_true,
    -  const std::shared_ptr< Parameter > 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.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > min_parameter( const std::shared_ptr< Parameter > parameter, const double other );
    +ParameterPTR min_parameter( const ParameterPTR parameter, const double other );
     
     /**
      * Create parameter whose value is the maximum of a given parameter's value and the given value.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > max_parameter( const std::shared_ptr< Parameter > parameter, const double other );
    +ParameterPTR max_parameter( const ParameterPTR parameter, const double other );
     
     /**
      * Create parameter redrawing the value if the value of a parameter is outside the set limits.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter >
    -redraw_parameter( const std::shared_ptr< Parameter > parameter, const double min, const double max );
    +ParameterPTR redraw_parameter( const ParameterPTR parameter, const double min, const double max );
     
     /**
      * Create the exponential of a parameter.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > exp_parameter( const std::shared_ptr< Parameter > parameter );
    +ParameterPTR exp_parameter( const ParameterPTR parameter );
     
     /**
      * Create the sine of a parameter.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > sin_parameter( const std::shared_ptr< Parameter > parameter );
    +ParameterPTR sin_parameter( const ParameterPTR parameter );
     
     /**
      * Create the cosine of a parameter.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > cos_parameter( const std::shared_ptr< Parameter > parameter );
    +ParameterPTR cos_parameter( const ParameterPTR parameter );
     
     /**
      * Create a parameter raised to the power of an exponent.
      *
      * @returns a new dynamically allocated parameter.
      */
    -std::shared_ptr< Parameter > pow_parameter( const std::shared_ptr< Parameter > parameter, const double exponent );
    +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.
      */
    -std::shared_ptr< Parameter > dimension_parameter( const std::shared_ptr< Parameter > x_parameter,
    -  const std::shared_ptr< Parameter > y_parameter );
    +ParameterPTR dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter );
     
    -std::shared_ptr< Parameter > dimension_parameter( const std::shared_ptr< Parameter > x_parameter,
    -  const std::shared_ptr< Parameter > y_parameter,
    -  const std::shared_ptr< Parameter > z_parameter );
    +ParameterPTR
    +dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter, const ParameterPTR z_parameter );
     
     
     } // namespace nest
    diff --git a/nestkernel/per_thread_bool_indicator.h b/nestkernel/per_thread_bool_indicator.h
    index bafd79a307..446b46b17c 100644
    --- a/nestkernel/per_thread_bool_indicator.h
    +++ b/nestkernel/per_thread_bool_indicator.h
    @@ -33,8 +33,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 812239be92..4b62ff37a1 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
     {
     
    @@ -118,13 +115,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;
     
    @@ -506,15 +496,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 af4b624a57..7feeb3e838 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
     {
    @@ -92,11 +89,10 @@ proxynode::sends_signal() const
     }
     
     void
    -proxynode::get_status( DictionaryDatum& d ) const
    +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 ] = LiteralDatum( element_type );
    +  d[ names::element_type ] = model->get_prototype().get_element_type();
     }
     
     
    diff --git a/nestkernel/proxynode.h b/nestkernel/proxynode.h
    index 4207e8763e..eb63896778 100644
    --- a/nestkernel/proxynode.h
    +++ b/nestkernel/proxynode.h
    @@ -106,7 +106,7 @@ class proxynode : public Node
       {
       }
     
    -  void get_status( DictionaryDatum& ) const override;
    +  void get_status( dictionary& ) const override;
     
       /**
        * Proxy nodes have no properties.
    @@ -117,7 +117,7 @@ class proxynode : public Node
        * problems with dictionary entry checking
        */
       void
    -  set_status( const DictionaryDatum& ) override
    +  set_status( const dictionary& ) override
       {
         assert( false );
       }
    diff --git a/nestkernel/pseudo_recording_device.h b/nestkernel/pseudo_recording_device.h
    index caee7e5aab..9308104b2c 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.cpp b/nestkernel/random_manager.cpp
    index db0a58fd65..26d385bede 100644
    --- a/nestkernel/random_manager.cpp
    +++ b/nestkernel/random_manager.cpp
    @@ -125,24 +125,24 @@ nest::RandomManager::finalize( const bool adjust_number_of_threads_or_rng_only )
     }
     
     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 ] = 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 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, 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, rng_type );
     
       if ( rng_type_updated )
       {
    diff --git a/nestkernel/random_manager.h b/nestkernel/random_manager.h
    index 5956f54b0d..c6d4b6a4f9 100644
    --- a/nestkernel/random_manager.h
    +++ b/nestkernel/random_manager.h
    @@ -34,7 +34,6 @@
     #include "manager_interface.h"
     
     // Includes from nestkernel:
    -#include "dictdatum.h"
     #include "nest_types.h"
     #include "random_generators.h"
     
    @@ -58,8 +57,8 @@ class RandomManager : public ManagerInterface
        */
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        * Get rank-synchronized random number generator.
    diff --git a/nestkernel/recordables_map.h b/nestkernel/recordables_map.h
    index 92fc04a415..84778af489 100644
    --- a/nestkernel/recordables_map.h
    +++ b/nestkernel/recordables_map.h
    @@ -32,11 +32,6 @@
     // Includes from nestkernel:
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "name.h"
    -#include "namedatum.h"
    -
     namespace nest
     {
     /**
    @@ -55,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()
    @@ -90,13 +85,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;
     
    @@ -107,7 +102,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 ) );
     
    @@ -170,9 +165,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()
    @@ -199,20 +194,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 ) );
       }
    @@ -220,11 +215,10 @@ 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, "DynamicRecordablesMap", "erase" );
    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 39f33fefda..25873264c1 100644
    --- a/nestkernel/recording_backend.h
    +++ b/nestkernel/recording_backend.h
    @@ -26,9 +26,7 @@
     // C++ includes:
     #include <vector>
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "name.h"
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -114,7 +112,7 @@ class RecordingBackend
        * @see set_value_names(), disenroll(), write(),
        *
        */
    -  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`.
    @@ -152,8 +150,8 @@ class RecordingBackend
        *
        */
       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.
    @@ -245,7 +243,7 @@ class RecordingBackend
        * @see get_status()
        *
        */
    -  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
    @@ -256,7 +254,7 @@ class RecordingBackend
        * @see set_status()
        *
        */
    -  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
    @@ -274,7 +272,7 @@ class RecordingBackend
        * @see get_device_defaults(), get_device_status()
        *
        */
    -  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
    @@ -285,7 +283,7 @@ class RecordingBackend
        * @see check_device_status(), get_device_status()
        *
        */
    -  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
    @@ -301,10 +299,10 @@ class RecordingBackend
        * @see enroll(), check_device_status(), get_device_defaults()
        *
        */
    -  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;
    +  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 773aa36a82..e813ed1b5f 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"
     
    @@ -27,10 +33,6 @@
     #include "recording_device.h"
     #include "vp_manager_impl.h"
     
    -// includes from sli:
    -#include "dictutils.h"
    -
    -#include "recording_backend_ascii.h"
     
     const unsigned int nest::RecordingBackendASCII::ASCII_REC_BACKEND_VERSION = 2;
     
    @@ -56,7 +58,7 @@ nest::RecordingBackendASCII::finalize()
     }
     
     void
    -nest::RecordingBackendASCII::enroll( const RecordingDevice& device, const DictionaryDatum& params )
    +nest::RecordingBackendASCII::enroll( const RecordingDevice& device, const dictionary& params )
     {
       const size_t t = device.get_thread();
       const size_t node_id = device.get_node_id();
    @@ -88,8 +90,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 size_t t = device.get_thread();
       const size_t node_id = device.get_node_id();
    @@ -181,33 +183,33 @@ nest::RecordingBackendASCII::prepare()
     }
     
     void
    -nest::RecordingBackendASCII::set_status( const DictionaryDatum& )
    +nest::RecordingBackendASCII::set_status( const dictionary& )
     {
       // nothing to do
     }
     
     void
    -nest::RecordingBackendASCII::get_status( DictionaryDatum& ) const
    +nest::RecordingBackendASCII::get_status( dictionary& ) const
     {
       // nothing to do
     }
     
     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 size_t t = device.get_thread();
       const size_t node_id = device.get_node_id();
    @@ -232,8 +234,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;
    @@ -323,26 +325,26 @@ 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 ] = file_extension_;
    +  d[ names::precision ] = precision_;
    +  d[ names::time_in_steps ] = time_in_steps_;
     
       std::string filename = compute_filename_();
    -  initialize_property_array( d, names::filenames );
    -  append_property( d, names::filenames, filename );
    +  d[ names::filenames ] = 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, file_extension_ );
    +  d.update_value( names::precision, precision_ );
    +  d.update_value( names::label, 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, 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_backend_ascii.h b/nestkernel/recording_backend_ascii.h
    index 9b0c93915f..b6548572f8 100644
    --- a/nestkernel/recording_backend_ascii.h
    +++ b/nestkernel/recording_backend_ascii.h
    @@ -159,13 +159,13 @@ 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;
     
       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;
     
    @@ -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 get_status( DictionaryDatum& ) const 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;
    @@ -196,24 +196,24 @@ 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();
         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
    -    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 3ff816c685..968357b60d 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 )
     {
       size_t t = device.get_thread();
       size_t node_id = device.get_node_id();
    @@ -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 size_t t = device.get_thread();
       const size_t 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 size_t t = device.get_thread();
       const size_t node_id = device.get_node_id();
    @@ -152,13 +152,13 @@ nest::RecordingBackendMemory::post_step_hook()
     }
     
     void
    -nest::RecordingBackendMemory::get_status( lockPTRDatum< Dictionary, &SLIInterpreter::Dictionarytype >& ) const
    +nest::RecordingBackendMemory::get_status( dictionary& ) const
     {
       // nothing to do
     }
     
     void
    -nest::RecordingBackendMemory::set_status( lockPTRDatum< Dictionary, &SLIInterpreter::Dictionarytype > const& )
    +nest::RecordingBackendMemory::set_status( const dictionary& )
     {
       // nothing to do
     }
    @@ -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() );
    @@ -215,56 +215,70 @@ 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;
    +  dictionary events;
     
    -  if ( not d->known( names::events ) )
    +  if ( d.known( names::events ) )
       {
    -    events = DictionaryDatum( new Dictionary );
    -    ( *d )[ names::events ] = events;
    +    events = d.get< dictionary >( names::events );
       }
    -  else
    +
    +  auto init_intvector = [ &events ]( std::string key ) -> std::vector< int >&
       {
    -    events = getValue< DictionaryDatum >( d, names::events );
    -  }
    +    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 ] );
    +  };
     
    -  initialize_property_intvector( events, names::senders );
    -  append_property( events, names::senders, senders_ );
    +  // TODO-PYNEST-NG: check that the vector in events is appended correctly
    +  auto& senders = init_intvector( names::senders );
    +  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 );
    +    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 );
    +    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 );
    +    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 ] );
    +    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 ] );
    +    long_name.insert( long_name.end(), long_values_[ i ].begin(), long_values_[ i ].end() );
       }
     
    -  ( *d )[ names::time_in_steps ] = time_in_steps_;
    +  d[ names::events ] = events;
    +  d[ names::time_in_steps ] = 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, time_in_steps ) )
       {
         if ( kernel().simulation_manager.has_been_simulated() )
         {
    @@ -274,8 +288,8 @@ nest::RecordingBackendMemory::DeviceData::set_status( const DictionaryDatum& d )
         time_in_steps_ = time_in_steps;
       }
     
    -  size_t n_events = 1;
    -  if ( updateValue< long >( d, names::n_events, n_events ) and n_events == 0 )
    +  long n_events = 1;
    +  if ( d.update_value( names::n_events, n_events ) and n_events == 0 )
       {
         clear();
       }
    diff --git a/nestkernel/recording_backend_memory.h b/nestkernel/recording_backend_memory.h
    index 73061f6d8e..739cfbb6e5 100644
    --- a/nestkernel/recording_backend_memory.h
    +++ b/nestkernel/recording_backend_memory.h
    @@ -118,13 +118,13 @@ 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;
     
       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;
     
    @@ -138,22 +138,22 @@ class RecordingBackendMemory : public RecordingBackend
     
       void post_step_hook() override;
     
    -  void set_status( const DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) 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;
    -  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 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( DictionaryDatum& ) const;
    -    void set_status( const DictionaryDatum& );
    +    void get_status( dictionary& ) const;
    +    void set_status( const dictionary& );
     
       private:
         void clear();
    @@ -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 3c048211a0..1045538674 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& params )
    +nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictionary& params )
     {
       if ( device.get_type() == RecordingDevice::SPIKE_RECORDER )
       {
    @@ -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
       {
    @@ -109,8 +109,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
     }
    @@ -301,19 +301,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
     }
    @@ -347,13 +347,13 @@ 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
     }
     
     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 6e4acc7560..96a79644ea 100644
    --- a/nestkernel/recording_backend_mpi.h
    +++ b/nestkernel/recording_backend_mpi.h
    @@ -109,13 +109,13 @@ 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;
     
       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;
     
    @@ -123,9 +123,9 @@ 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( DictionaryDatum& ) const override;
    +  void get_status( dictionary& ) const override;
     
       void pre_run_hook() override;
     
    @@ -133,9 +133,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 9b31ea6f57..e149f93b80 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 size_t node_id = device.get_node_id();
       const size_t t = device.get_thread();
    @@ -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
     }
    @@ -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 size_t t = device.get_thread();
       const size_t node_id = device.get_node_id();
    @@ -153,13 +153,13 @@ nest::RecordingBackendScreen::post_step_hook()
     }
     
     void
    -nest::RecordingBackendScreen::set_status( const DictionaryDatum& )
    +nest::RecordingBackendScreen::set_status( const dictionary& )
     {
       // nothing to do
     }
     
     void
    -nest::RecordingBackendScreen::get_status( DictionaryDatum& ) const
    +nest::RecordingBackendScreen::get_status( dictionary& ) const
     {
       // 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 ] = precision_;
    +  d[ names::time_in_steps ] = 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, precision_ );
    +  d.update_value( names::time_in_steps, time_in_steps_ );
     }
     
     void
    diff --git a/nestkernel/recording_backend_screen.h b/nestkernel/recording_backend_screen.h
    index 371a116bfb..3751512fd8 100644
    --- a/nestkernel/recording_backend_screen.h
    +++ b/nestkernel/recording_backend_screen.h
    @@ -93,13 +93,13 @@ 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;
     
       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;
     
    @@ -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( DictionaryDatum& ) const 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 5aabb26ebc..a198bbb17b 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"
    @@ -71,13 +68,13 @@ nest::RecordingBackendSIONlib::finalize()
     }
     
     void
    -nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const DictionaryDatum& )
    +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;
    @@ -91,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_;
       }
    @@ -100,38 +97,38 @@ 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 );
       }
     }
     
     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 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;
     
         info.double_value_names.reserve( double_value_names.size() );
         for ( auto& val : double_value_names )
         {
    -      info.double_value_names.push_back( val.toString() );
    +      info.double_value_names.push_back( val );
         }
         info.long_value_names.reserve( long_value_names.size() );
         for ( auto& val : long_value_names )
         {
    -      info.long_value_names.push_back( val.toString() );
    +      info.long_value_names.push_back( val );
         }
       }
     }
    @@ -149,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;
    @@ -165,13 +164,9 @@ 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 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 );
         if ( not task )
         {
           t_start_ = kernel().simulation_manager.get_time().get_ms();
    @@ -179,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;
         }
    @@ -236,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 ( auto eptr : exceptions_raised )
    +  {
    +    if ( eptr )
         {
    -      WrappedThreadException wec( *we );
    -      delete we;
    -      throw wec;
    +      std::rethrow_exception( eptr );
         }
    -  } // parallel region
    -
    +  }
       files_opened_ = true;
     }
     
    @@ -273,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()" );
     
    @@ -292,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;
    @@ -346,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;
    @@ -359,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;
     
    @@ -429,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() );
    @@ -620,27 +611,27 @@ 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 ] = 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 DictionaryDatum& d )
    +nest::RecordingBackendSIONlib::Parameters_::set( const RecordingBackendSIONlib&, const dictionary& 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, 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
    -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
    @@ -650,11 +641,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 ] = filename_;
     }
     
     void
    @@ -676,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;
    @@ -687,19 +678,19 @@ 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
     }
     
     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 ea7ea77753..a7ed59fc35 100644
    --- a/nestkernel/recording_backend_sionlib.h
    +++ b/nestkernel/recording_backend_sionlib.h
    @@ -206,13 +206,13 @@ 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;
     
       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;
     
    @@ -223,9 +223,9 @@ 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( DictionaryDatum& ) const override;
    +  void get_status( dictionary& ) const override;
     
       void pre_run_hook() 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_();
    @@ -356,8 +356,8 @@ class RecordingBackendSIONlib : public RecordingBackend
     
         Parameters_();
     
    -    void get( const RecordingBackendSIONlib&, DictionaryDatum& ) const;
    -    void set( const RecordingBackendSIONlib&, const DictionaryDatum& );
    +    void get( const RecordingBackendSIONlib&, dictionary& ) const;
    +    void set( const RecordingBackendSIONlib&, const dictionary& );
       };
     
       Parameters_ P_;
    diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp
    index 205fde2e6b..f2ad5e99dd 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_ )
     {
     }
     
    @@ -49,8 +49,8 @@ nest::RecordingDevice::set_initialized_()
     }
     
     void
    -nest::RecordingDevice::pre_run_hook( const std::vector< Name >& double_value_names,
    -  const std::vector< Name >& long_value_names )
    +nest::RecordingDevice::pre_run_hook( const std::vector< std::string >& double_value_names,
    +  const std::vector< std::string >& long_value_names )
     {
       Device::pre_run_hook();
       kernel().io_manager.set_recording_value_names( P_.record_to_, *this, double_value_names, long_value_names );
    @@ -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 ] = label_;
    +  d[ names::record_to ] = 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, label_ );
     
       std::string record_to;
    -  if ( updateValue< std::string >( d, names::record_to, record_to ) )
    +  if ( d.update_value( names::record_to, record_to ) )
       {
         if ( not kernel().io_manager.is_valid_recording_backend( record_to ) )
         {
    @@ -99,18 +99,19 @@ 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, n_events );
    +  d[ names::n_events ] = 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 ) )
    +  long n_events = 0;
    +
    +  if ( d.update_value( names::n_events, n_events ) )
       {
         if ( n_events != 0 )
         {
    @@ -122,7 +123,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,27 +140,27 @@ 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& [ key, entry ] : d )
         {
    -      if ( not kv_pair->second.accessed() )
    +      if ( not d.has_been_accessed( key ) )
           {
    -        ( *backend_params )[ kv_pair->first ] = kv_pair->second;
    +        backend_params[ key ] = entry.item;
           }
         }
     
         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& [ key, entry ] : backend_params )
         {
    -      if ( kv_pair->second.accessed() )
    +      if ( backend_params.has_been_accessed( key ) )
           {
    -        ( *backend_params_ )[ kv_pair->first ] = kv_pair->second;
    -        d->lookup( kv_pair->first ).set_access_flag();
    +        backend_params_[ key ] = entry.item;
    +        d.mark_as_accessed( key );
           }
         }
       }
    @@ -174,14 +175,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 ] = names::recorder;
     
       if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance
       {
    @@ -189,9 +190,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 ( const auto& [ key, entry ] : backend_params_ )
         {
    -      ( *d )[ kv_pair->first ] = kv_pair->second;
    +      d[ key ] = entry.item;
         }
       }
       else
    diff --git a/nestkernel/recording_device.h b/nestkernel/recording_device.h
    index 03df1f4769..bb6ca4491f 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
     {
    @@ -156,7 +153,7 @@ class RecordingDevice : public DeviceNode, public Device
     
       using Device::pre_run_hook;
       using Node::pre_run_hook;
    -  void pre_run_hook( const std::vector< Name >&, const std::vector< Name >& );
    +  void pre_run_hook( const std::vector< std::string >&, const std::vector< std::string >& );
     
       bool is_active( Time const& T ) const override;
     
    @@ -172,8 +169,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 >& );
    @@ -182,14 +179,13 @@ 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;
    -    Parameters_& operator=( const Parameters_& ) = default;
    -    void get( DictionaryDatum& ) const;
    -    void set( const DictionaryDatum& );
    +    void get( dictionary& ) const;
    +    void set( const dictionary& );
       } P_;
     
       struct State_
    @@ -197,11 +193,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 9f23d7f89b..ccb12c2914 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -26,6 +26,7 @@
     #include <sys/time.h>
     
     // C++ includes:
    +#include <iomanip>
     #include <limits>
     #include <vector>
     
    @@ -39,8 +40,6 @@
     #include "kernel_manager.h"
     #include "stopwatch_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     nest::SimulationManager::SimulationManager()
       : clock_( Time::tic( 0L ) )
    @@ -133,7 +132,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
    @@ -146,7 +145,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, time ) )
       {
         if ( time != 0.0 )
         {
    @@ -171,15 +170,15 @@ nest::SimulationManager::set_status( const DictionaryDatum& d )
         }
       }
     
    -  updateValue< bool >( d, names::print_time, 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 = updateValue< double >( d, names::tics_per_ms, tics_per_ms );
    +  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 = updateValue< double >( d, names::resolution, resd );
    +  bool res_updated = d.update_value( names::resolution, resd );
     
       if ( tics_per_ms_updated or res_updated )
       {
    @@ -293,7 +292,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, wfr ) )
       {
         if ( kernel().node_manager.size() > 0 )
         {
    @@ -319,7 +318,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, wfr_interval ) )
       {
         if ( not use_wfr_ )
         {
    @@ -354,7 +353,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, tol ) )
       {
         if ( tol < 0.0 )
         {
    @@ -369,7 +368,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, max_iter ) )
       {
         if ( max_iter <= 0 )
         {
    @@ -387,9 +386,9 @@ 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, interp_order ) )
       {
    -    if ( interp_order < 0 or interp_order == 2 or interp_order > 3 )
    +    if ( ( interp_order < 0 ) or ( interp_order == 2 ) or ( interp_order > 3 ) )
         {
           LOG( M_ERROR, "SimulationManager::set_status", "Interpolation order must be 0, 1, or 3." );
           throw KernelException();
    @@ -402,7 +401,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, t_new ) )
       {
         if ( t_new <= 0 )
         {
    @@ -415,7 +414,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& 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 )
         {
    @@ -428,7 +427,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& 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 )
         {
    @@ -444,35 +443,36 @@ nest::SimulationManager::set_status( const DictionaryDatum& 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
    -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() );
    +  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 ] = 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() );
    +  d[ names::T_min ] = Time::min().get_ms();
    +  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_ );
    +  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_;
     
    -  def< bool >( d, names::prepared, prepared_ );
    +  d[ names::prepared ] = prepared_;
     
    -  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_ );
    +  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_;
     
    -  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_ );
    +  d[ names::update_time_limit ] = update_time_limit_;
    +  d[ names::min_update_time ] = min_update_time_;
    +  d[ names::max_update_time ] = max_update_time_;
     
       sw_simulate_.get_status( d, names::time_simulate, names::time_simulate_cpu );
       sw_communicate_prepare_.get_status( d, names::time_communicate_prepare, names::time_communicate_prepare_cpu );
    @@ -483,9 +483,10 @@ nest::SimulationManager::get_status( DictionaryDatum& 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
    @@ -834,7 +835,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
    @@ -1123,10 +1124,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
     
    @@ -1137,13 +1138,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/simulation_manager.h b/nestkernel/simulation_manager.h
    index 1c83bea508..4c09eefc96 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
     {
    @@ -51,8 +49,8 @@ class SimulationManager : public ManagerInterface
     
       void initialize( const bool ) override;
       void finalize( const bool ) override;
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
    +  void get_status( dictionary& ) override;
     
       /**
        *  Check for errors in time before run
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index b44ae89640..4d0dee578f 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -26,15 +26,18 @@
     #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"
     
     // 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 +45,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 hyperslab_size )
    +SonataConnector::SonataConnector( const dictionary& graph_specs, const long hyperslab_size )
       : graph_specs_( graph_specs )
       , hyperslab_size_( hyperslab_size )
       , weight_dataset_exist_( false )
    @@ -91,24 +94,26 @@ SonataConnector::connect()
       */
       // clang-format on
     
    -  auto edges_container = getValue< ArrayDatum >( graph_specs_->lookup( "edges" ) );
    +  auto edges_container = boost::any_cast< std::vector< dictionary > >( 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_datum : edges_container )
    +  for ( auto edge_dict : edges_container )
       {
    +    cur_fname_ = boost::any_cast< std::string >( edge_dict.at( "edges_file" ) );
     
    -    const auto edge_dict = getValue< DictionaryDatum >( edge_dict_datum );
    -    cur_fname_ = getValue< std::string >( edge_dict->lookup( "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" ];
    +    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)
    @@ -376,6 +381,7 @@ SonataConnector::sequential_chunkwise_connector_()
       }
     }
     
    +///*
     void
     SonataConnector::connect_chunk_( const hsize_t hyperslab_size, const hsize_t offset )
     {
    @@ -402,37 +408,12 @@ 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 = getValue< DictionaryDatum >( graph_specs_->lookup( "nodes" ) );
    -
    -  NodeCollectionPTR src_nc;
    -
    -  try
    -  {
    -    src_nc = getValue< NodeCollectionPTR >( nest_nodes->lookup( source_attribute_value_ ) );
    -  }
    -  catch ( const TypeMismatch& e )
    -  {
    -    throw KernelException(
    -      "Unable to find source node population '" + source_attribute_value_ + "' in node collection dictionary. Error caused "
    -      "by the population name specified by attribute of source_node_id dataset in "
    -      + cur_fname_ );
    -  }
    -
    -  NodeCollectionPTR tgt_nc;
    -  try
    -  {
    -    tgt_nc = getValue< NodeCollectionPTR >( nest_nodes->lookup( target_attribute_value_ ) );
    -  }
    -  catch ( const TypeMismatch& e )
    -  {
    -    throw KernelException(
    -      "Unable to find target node population '" + target_attribute_value_ + "' in node collection dictionary. Error caused "
    -      "by the population name specified by attribute of target_node_id dataset in "
    -      + cur_fname_ );
    -  }
    +  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();
    @@ -463,7 +444,8 @@ SonataConnector::connect_chunk_( const hsize_t hyperslab_size, const hsize_t off
             const size_t 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 = 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 );
    @@ -481,20 +463,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 );
         }
       }
     
    @@ -563,13 +545,14 @@ 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 )
    +  for ( auto& syn_kv_pair : edge_params )
       {
    -    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" ] );
    +    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.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
         const size_t synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name );
    @@ -580,53 +563,49 @@ SonataConnector::create_edge_type_id_2_syn_spec_( DictionaryDatum edge_params )
     }
     
     void
    -SonataConnector::set_synapse_params_( DictionaryDatum syn_dict, size_t synapse_model_id, int type_id )
    +SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_id, int type_id )
     {
    -  DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
    +  dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
       ConnParameterMap synapse_params;
     
    -  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_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.
    -  edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
    +  // TODO: See if nullptr can be changed to dictionary
    +  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
       {
    -    edge_type_id_2_param_dicts_[ type_id ][ tid ] = new Dictionary;
    +    const auto tid = kernel().vp_manager.get_thread_id();
     
         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 ] = 0L;
           }
           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;
           }
         }
    -  }
    +  } // end parallel region
     }
     
     void
    @@ -638,40 +617,36 @@ SonataConnector::get_synapse_params_( size_t snode_id,
     {
       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() )
         {
    -      // 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
         {
    -      // change value of dictionary entry without allocating new datum
    -      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 );
         }
       }
     }
     
     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,
    -  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;
    diff --git a/nestkernel/sonata_connector.h b/nestkernel/sonata_connector.h
    index 4420346b0e..9465a7d49d 100644
    --- a/nestkernel/sonata_connector.h
    +++ b/nestkernel/sonata_connector.h
    @@ -29,12 +29,15 @@
     
     // C++ includes:
     #include <map>
    +#include <string>
     #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 "H5Cpp.h"
     
    @@ -72,7 +75,7 @@ class SonataConnector
        * @param graph_specs Specification dictionary, see PyNEST `SonataNetwork._create_graph_specs` for details.
        * @param hyperslab_size Size of the hyperslab to read in one read operation, applies to all HDF5 datasets.
        */
    -  SonataConnector( const DictionaryDatum& graph_specs, const long hyperslab_size );
    +  SonataConnector( const dictionary& graph_specs, const long hyperslab_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, size_t synapse_model_id, int type_id );
    +  void set_synapse_params_( dictionary syn_dict, size_t synapse_model_id, int type_id );
     
       /**
        * @brief Get synapse parameters.
    @@ -194,11 +197,11 @@ 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,
    -    const Name& name );
    +    const std::string& name );
     
       /**
        * @brief Manage the sequential chunkwise connections to be created.
    @@ -261,13 +264,13 @@ class SonataConnector
        */
       void reset_params_();
     
    -  typedef std::map< Name, std::shared_ptr< ConnParameter > > ConnParameterMap;
    +  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< Name > skip_syn_params_;
    +  std::set< std::string > skip_syn_params_;
     
       //! Dictionary containing SONATA graph specifications
    -  DictionaryDatum graph_specs_;
    +  dictionary graph_specs_;
     
       //! Size of hyperslab that is read into memory in one read operation. Applies to all relevant HDF5 datasets.
       hsize_t hyperslab_size_;
    @@ -285,7 +288,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, size_t > edge_type_id_2_syn_model_;
    @@ -294,7 +297,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/nestkernel/source_table.cpp b/nestkernel/source_table.cpp
    index d9fcd7af1c..39ce626463 100644
    --- a/nestkernel/source_table.cpp
    +++ b/nestkernel/source_table.cpp
    @@ -282,10 +282,10 @@ nest::SourceTable::source_should_be_processed_( const size_t rank_start,
     {
       const size_t 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 );
    +  // is this thread responsible for this part of the MPI buffer?
    +  const bool responsible = source_rank < rank_start or rank_end <= source_rank;
    +
    +  return not( source.is_processed() or source.is_disabled() or responsible );
     }
     
     bool
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 4705b7de64..7d642c7ee2 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -43,7 +43,7 @@ SPManager::SPManager()
       , structural_plasticity_enabled_( false )
       , sp_conn_builders_()
       , growthcurve_factories_()
    -  , growthcurvedict_( new Dictionary() )
    +  , growthcurvedict_()
     {
     }
     
    @@ -82,54 +82,53 @@ SPManager::finalize( const bool adjust_number_of_threads_or_rng_only )
           delete gcf;
         }
         growthcurve_factories_.clear();
    -    growthcurvedict_->clear();
    +    growthcurvedict_.clear();
       }
     }
     
     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() );
    +    dictionary sp_synapse_params;
         const std::string model = kernel().model_manager.get_connection_model( ( *i )->get_synapse_model(), 0 ).get_name();
    -    def< std::string >( sp_synapse, names::synapse_model, model );
    -    def< bool >( sp_synapse, names::allow_autapses, ( *i )->allows_autapses() );
    -    def< bool >( sp_synapse, names::allow_multapses, ( *i )->allows_multapses() );
    +    sp_synapse_params[ names::synapse_model ] = model;
    +    sp_synapse_params[ names::pre_synaptic_element ] = ( *i )->get_pre_synaptic_element_name();
    +    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();
     
    -    def< DictionaryDatum >( sp_synapses, ( *i )->get_name(), sp_synapse );
    +    sp_synapses[ ( *i )->get_name() ] = sp_synapse_params;
       }
     
    -  def< double >( d, names::structural_plasticity_update_interval, structural_plasticity_update_interval_ );
    +  d[ names::structural_plasticity_synapses ] = sp_synapses;
    +  d[ names::structural_plasticity_update_interval ] = structural_plasticity_update_interval_;
     
    -  ArrayDatum growth_curves;
    -  for ( auto const& element : *growthcurvedict_ )
    +  std::vector< std::string > growth_curves;
    +  for ( auto const& element : growthcurvedict_ )
       {
    -    growth_curves.push_back( new LiteralDatum( element.first ) );
    +    growth_curves.push_back( element.first );
       }
    -  def< ArrayDatum >( d, names::growth_curves, growth_curves );
    +  d[ names::growth_curves ] = growth_curves;
     }
     
     void
    -SPManager::set_status( const DictionaryDatum& d )
    +SPManager::set_status( const dictionary& d )
     {
    -  updateValue< double >( d, names::structural_plasticity_update_interval, 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 ) )
    +  if ( not d.known( names::structural_plasticity_synapses ) )
       {
         return;
       }
     
    -  // Configure synapses model updated during the simulation.
    -  Token synmodel;
    -  DictionaryDatum syn_specs;
    -  DictionaryDatum syn_spec;
    -  DictionaryDatum conn_spec = DictionaryDatum( new Dictionary() );
    +  dictionary syn_specs;
    +  dictionary syn_spec;
    +  dictionary conn_spec;
    +
       NodeCollectionPTR sources( new NodeCollectionPrimitive() );
       NodeCollectionPTR targets( new NodeCollectionPrimitive() );
     
    @@ -139,22 +138,24 @@ SPManager::set_status( const DictionaryDatum& d )
       }
       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, syn_specs );
    +  for ( auto& [ key, entry ] : syn_specs )
       {
    -    syn_spec = getValue< DictionaryDatum >( syn_specs, i->first );
    -    if ( syn_spec->known( names::allow_autapses ) )
    +    // 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 ) )
         {
    -      def< bool >( conn_spec, names::allow_autapses, getValue< bool >( syn_spec, names::allow_autapses ) );
    +      conn_spec[ names::allow_autapses ] = syn_spec.get< bool >( names::allow_autapses );
         }
    -    if ( syn_spec->known( names::allow_multapses ) )
    +    if ( syn_spec.known( names::allow_multapses ) )
         {
    -      def< bool >( conn_spec, names::allow_multapses, getValue< bool >( syn_spec, 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
         SPBuilder* conn_builder = new SPBuilder( sources, targets, /* third_out */ nullptr, conn_spec, { syn_spec } );
    -    conn_builder->set_name( i->first.toString() );
    +    conn_builder->set_name( key );
     
         // check that the user defined the min and max delay properly, if the
         // default delay is not used.
    @@ -239,8 +240,8 @@ SPManager::disconnect( const size_t snode_id, Node* target, size_t target_thread
     void
     SPManager::disconnect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
    -  DictionaryDatum& conn_spec,
    -  DictionaryDatum& syn_spec )
    +  const dictionary& conn_spec,
    +  const std::vector< dictionary >& syn_specs )
     {
       if ( kernel().connection_manager.connections_have_changed() )
       {
    @@ -252,34 +253,40 @@ SPManager::disconnect( NodeCollectionPTR sources,
       }
     
       BipartiteConnBuilder* cb = nullptr;
    -  conn_spec->clear_access_flags();
    -  syn_spec->clear_access_flags();
    +  conn_spec.init_access_flags();
     
    -  if ( not conn_spec->known( names::rule ) )
    +  if ( not conn_spec.known( names::rule ) )
       {
         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 );
     
       if ( not kernel().connection_manager.valid_connection_rule( rule_name ) )
       {
         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++ )
         {
    -      std::string synModel = getValue< std::string >( syn_spec, names::synapse_model );
    -      if ( ( *i )->get_synapse_model() == kernel().model_manager.get_synapse_model_id( synModel ) )
    +      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,
               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() );
           }
    @@ -292,13 +299,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
    -  ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries: " );
    -  ALL_ENTRIES_ACCESSED( *syn_spec, "Connect", "Unread dictionary entries: " );
    +  // 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" );
     
       // 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 79cc92a72a..974b00ae01 100644
    --- a/nestkernel/sp_manager.h
    +++ b/nestkernel/sp_manager.h
    @@ -35,10 +35,6 @@
     #include "nest_types.h"
     #include "node_collection.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictdatum.h"
     
     namespace nest
     {
    @@ -63,14 +59,15 @@ class SPManager : public ManagerInterface
       void initialize( const bool ) override;
       void finalize( const bool ) override;
     
    -  void get_status( DictionaryDatum& ) override;
    +  void get_status( dictionary& ) override;
    +
       /**
        * Set status of synaptic plasticity variables: synaptic update interval,
        * synapses and synaptic elements.
        *
    -   * @param d Dictionary containing the values to be set
    +   * @param d dictionary containing the values to be set
        */
    -  void set_status( const DictionaryDatum& ) override;
    +  void set_status( const dictionary& ) override;
     
       /**
        * Create a new Growth Curve object using the GrowthCurve Factory
    @@ -78,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
    @@ -103,8 +100,8 @@ class SPManager : public ManagerInterface
        */
       void disconnect( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
    -    DictionaryDatum& conn_spec,
    -    DictionaryDatum& syn_spec );
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_spec );
     
       /**
        * Disconnect two nodes.
    @@ -207,13 +204,13 @@ class SPManager : public ManagerInterface
        */
       std::vector< GenericGrowthCurveFactory* > growthcurve_factories_;
     
    -  DictionaryDatum growthcurvedict_; //!< Dictionary for growth rules.
    +  dictionary growthcurvedict_; //!< Dictionary for growth rules.
     };
     
     inline GrowthCurve*
    -SPManager::new_growth_curve( Name name )
    +SPManager::new_growth_curve( std::string name )
     {
    -  const long nc_id = ( *growthcurvedict_ )[ name ];
    +  const int nc_id = growthcurvedict_.get< int >( name );
       return growthcurve_factories_.at( nc_id )->create();
     }
     
    diff --git a/nestkernel/sp_manager_impl.h b/nestkernel/sp_manager_impl.h
    index 791ac78db2..e948645f4b 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 );
       const int id = growthcurve_factories_.size();
       growthcurve_factories_.push_back( nc );
    -  growthcurvedict_->insert( name, id );
    +  growthcurvedict_[ name ] = id;
     }
     
     } // namespace nest
    diff --git a/nestkernel/sparse_node_array.h b/nestkernel/sparse_node_array.h
    index 9518b227ff..f9e16a8459 100644
    --- a/nestkernel/sparse_node_array.h
    +++ b/nestkernel/sparse_node_array.h
    @@ -28,6 +28,7 @@
     #include <map>
     
     // Includes from nestkernel:
    +#include "exceptions.h"
     #include "nest_types.h"
     
     // Includes from libnestutil
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index 603cd814d3..ed956a90cc 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -23,6 +23,8 @@
     #include "spatial.h"
     
     // C++ includes:
    +#include <fstream>
    +#include <memory>
     #include <ostream>
     #include <string>
     
    @@ -33,12 +35,8 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     #include "nest.h"
    -#include "nestmodule.h"
     #include "node.h"
     
    -// Includes from sli:
    -#include "sliexceptions.h"
    -
     // Includes from spatial:
     #include "grid_layer.h"
     #include "layer_impl.h"
    @@ -68,25 +66,25 @@ get_layer( NodeCollectionPTR nc )
     }
     
     NodeCollectionPTR
    -create_layer( const DictionaryDatum& layer_dict )
    +create_layer( const dictionary& layer_dict )
     {
    -  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;
     }
     
    -ArrayDatum
    +std::vector< std::vector< double > >
     get_position( NodeCollectionPTR layer_nc )
     {
       AbstractLayerPTR layer = get_layer( layer_nc );
       NodeCollectionMetadataPTR meta = layer_nc->get_metadata();
       size_t 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 )
    @@ -99,7 +97,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 );
       }
    @@ -133,17 +131,17 @@ get_position( const size_t 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();
       size_t 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. Likewise if layer_to has size 1 and layer_from do not.
    @@ -157,11 +155,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
    @@ -175,10 +171,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.
    @@ -192,15 +186,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();
       size_t 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 )
       {
         size_t node_id = ( *it ).node_id;
    @@ -211,9 +205,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.
    @@ -228,7 +221,12 @@ 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 );
    +  if ( layer_to_nc->size() != 1 and layer_from_nc->size() != 1 and not( layer_to_nc->size() == layer_from_nc->size() ) )
    +  {
    +    throw BadProperty( "NodeCollections must have equal length or one must have size 1." );
    +  }
    +
    +  auto layer_to_positions = get_position( layer_to_nc );
     
       AbstractLayerPTR layer_from = get_layer( layer_from_nc );
       NodeCollectionMetadataPTR meta = layer_from_nc->get_metadata();
    @@ -249,11 +247,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
    @@ -268,8 +264,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
    @@ -285,7 +281,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();
    @@ -303,7 +299,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 );
     
    @@ -318,17 +314,15 @@ distance( NodeCollectionPTR layer_nc, const ArrayDatum point )
     }
     
     std::vector< double >
    -distance( const ArrayDatum conns )
    +distance( const std::vector< ConnectionID >& 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 ) );
    -
         size_t src = conn_id.get_source_node_id();
         auto src_position = get_position( src );
     
    @@ -360,90 +354,224 @@ distance( const ArrayDatum conns )
       return result;
     }
     
    -MaskDatum
    -create_mask( const DictionaryDatum& mask_dict )
    +MaskPTR
    +create_mask( const dictionary& mask_dict )
    +{
    +  mask_dict.init_access_flags();
    +
    +  // 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.
    +  bool has_anchor = false;
    +  MaskPTR mask;
    +
    +  for ( auto& kv : mask_dict )
    +  {
    +    if ( kv.first == names::anchor )
    +    {
    +      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
    +    {
    +      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 );
    +          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 ( double_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;
    +}
    +
    +NodeCollectionPTR
    +select_nodes_by_mask( const NodeCollectionPTR layer_nc, const std::vector< double >& anchor, const MaskPTR mask )
     {
    -  mask_dict->clear_access_flags();
    +  std::vector< size_t > 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" );
    +    }
     
    -  MaskDatum datum( NestModule::create_mask( mask_dict ) );
    +    auto ml = MaskedLayer< 2 >( *layer, mask, false, layer_nc );
     
    -  ALL_ENTRIES_ACCESSED( *mask_dict, "nest::CreateMask", "Unread dictionary entries: " );
    +    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 );
    +    }
    +  }
    +  else
    +  {
    +    auto layer = dynamic_cast< Layer< 3 >* >( abstract_layer.get() );
    +    if ( not layer )
    +    {
    +      throw TypeMismatch( "3D layer", "other type" );
    +    }
     
    -  return datum;
    +    auto ml = MaskedLayer< 3 >( *layer, mask, false, layer_nc );
    +
    +    for ( Ntree< 3, size_t >::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 );
     }
     
    -BoolDatum
    -inside( const std::vector< double >& point, const MaskDatum& mask )
    +bool
    +inside( const std::vector< double >& point, const MaskPTR mask )
     {
       return mask->inside( point );
     }
     
    -MaskDatum
    -intersect_mask( const MaskDatum& mask1, const MaskDatum& mask2 )
    +MaskPTR
    +intersect_mask( const MaskPTR mask1, const MaskPTR mask2 )
     {
    -  return mask1->intersect_mask( *mask2 );
    +  return MaskPTR( mask1->intersect_mask( *mask2 ) );
     }
     
    -MaskDatum
    -union_mask( const MaskDatum& mask1, const MaskDatum& mask2 )
    +MaskPTR
    +union_mask( const MaskPTR mask1, const MaskPTR mask2 )
     {
    -  return mask1->union_mask( *mask2 );
    +  return MaskPTR( mask1->union_mask( *mask2 ) );
     }
     
    -MaskDatum
    -minus_mask( const MaskDatum& mask1, const MaskDatum& mask2 )
    +MaskPTR
    +minus_mask( const MaskPTR mask1, const MaskPTR mask2 )
     {
    -  return mask1->minus_mask( *mask2 );
    +  return MaskPTR( mask1->minus_mask( *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();
    +  connection_dict.init_access_flags();
       ConnectionCreator connector( connection_dict );
    -  ALL_ENTRIES_ACCESSED( *connection_dict, "nest::CreateLayers", "Unread dictionary entries: " );
    +  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();
    -
       source->connect( source_nc, target, target_nc, connector );
     }
     
     void
    -dump_layer_nodes( NodeCollectionPTR layer_nc, OstreamDatum& out )
    +dump_layer_nodes( const NodeCollectionPTR layer_nc, const std::string& filename )
     {
       AbstractLayerPTR layer = get_layer( layer_nc );
     
    -  if ( out->good() )
    +  std::ofstream out( filename );
    +  if ( out.good() )
       {
    -    layer->dump_nodes( *out );
    +    layer->dump_nodes( out );
       }
    +  out.close();
     }
     
     void
    -dump_layer_connections( const Token& syn_model,
    -  NodeCollectionPTR source_layer_nc,
    -  NodeCollectionPTR target_layer_nc,
    -  OstreamDatum& 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 );
     
    -  if ( out->good() )
    +  std::ofstream out( filename );
    +  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 );
       }
    +  out.close();
     }
     
    -DictionaryDatum
    +dictionary
     get_layer_status( NodeCollectionPTR )
     {
       assert( false and "not implemented" );
     
    -  return DictionaryDatum();
    +  return {};
     }
     
     } // namespace nest
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 27534cb1b5..d4eb9d0e14 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"
    @@ -57,14 +50,20 @@ class LayerMetadata : public NodeCollectionMetadata
       {
       }
     
    -  void set_status( const DictionaryDatum&, bool ) override {};
    +  void set_status( const dictionary&, bool ) override {};
     
       void
    -  get_status( DictionaryDatum& 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
    @@ -100,14 +99,14 @@ 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;
     
         // Since we do not have access to the node collection here, we
         // 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:
    @@ -116,26 +115,29 @@ class LayerMetadata : public NodeCollectionMetadata
     };
     
     AbstractLayerPTR get_layer( NodeCollectionPTR layer_nc );
    -NodeCollectionPTR create_layer( const DictionaryDatum& layer_dict );
    -ArrayDatum get_position( NodeCollectionPTR layer_nc );
    +NodeCollectionPTR create_layer( const dictionary& layer_dict );
    +std::vector< std::vector< double > > get_position( NodeCollectionPTR layer_nc );
     std::vector< double > get_position( const size_t 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< 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 );
    -MaskDatum create_mask( const DictionaryDatum& 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 );
    -MaskDatum minus_mask( const MaskDatum& mask1, const MaskDatum& mask2 );
    -void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const DictionaryDatum& dict );
    -void dump_layer_nodes( NodeCollectionPTR layer_nc, OstreamDatum& out );
    -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 );
    +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 );
    +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, 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 );
     }
     
     #endif /* SPATIAL_H */
    diff --git a/nestkernel/stimulation_backend.h b/nestkernel/stimulation_backend.h
    index edd99c835c..fb3b70814d 100644
    --- a/nestkernel/stimulation_backend.h
    +++ b/nestkernel/stimulation_backend.h
    @@ -26,10 +26,6 @@
     // C++ includes:
     #include <vector>
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
    -#include "name.h"
     #include "stimulation_device.h"
     
     namespace nest
    @@ -108,7 +104,7 @@ class StimulationBackend
        * @see disenroll()
        *
        */
    -  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 8f908d24ce..c674031f89 100644
    --- a/nestkernel/stimulation_backend_mpi.cpp
    +++ b/nestkernel/stimulation_backend_mpi.cpp
    @@ -63,7 +63,7 @@ nest::StimulationBackendMPI::finalize()
     }
     
     void
    -nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const DictionaryDatum& params )
    +nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const dictionary& params )
     {
       size_t tid = device.get_thread();
       size_t node_id = device.get_node_id();
    @@ -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_ );
     }
     
     
    diff --git a/nestkernel/stimulation_backend_mpi.h b/nestkernel/stimulation_backend_mpi.h
    index 0803c616c0..bb6121db25 100644
    --- a/nestkernel/stimulation_backend_mpi.h
    +++ b/nestkernel/stimulation_backend_mpi.h
    @@ -122,7 +122,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 ab3c800c9b..7c6ed961ab 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_()
     {
     }
     
    @@ -90,24 +90,24 @@ nest::StimulationDevice::get_label() const
     
     nest::StimulationDevice::Parameters_::Parameters_()
       : label_()
    -  , stimulus_source_( Name() )
    +  , stimulus_source_()
     {
     }
     
     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 ] = label_;
    +  d[ names::stimulus_source ] = 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, label_ );
     
       std::string stimulus_source;
    -  if ( updateValue< std::string >( d, names::stimulus_source, stimulus_source ) )
    +  if ( d.update_value( names::stimulus_source, 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,25 +130,25 @@ 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& [ key, entry ] : d )
         {
    -      if ( not kv_pair.second.accessed() )
    +      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 )
    +    backend_params_.clear();
    +    for ( auto& [ key, entry ] : backend_params )
         {
    -      if ( kv_pair.second.accessed() )
    +      if ( backend_params.has_been_accessed( key ) )
           {
    -        ( *backend_params_ )[ kv_pair.first ] = kv_pair.second;
    -        d->lookup( kv_pair.first ).set_access_flag();
    +        backend_params_[ key ] = entry.item;
    +        d.mark_as_accessed( key );
           }
         }
       }
    @@ -163,20 +163,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 ] = names::stimulator;
     
       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 f8b29531b6..7cf0b2253d 100644
    --- a/nestkernel/stimulation_device.h
    +++ b/nestkernel/stimulation_device.h
    @@ -28,9 +28,6 @@
     #include "device_node.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     // Includes from libnestutil:
     #include "compose.hpp"
     
    @@ -159,11 +156,11 @@ 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;
    +  std::string get_element_type() const override;
     
       using Device::init_buffers;
       using Device::init_state;
    @@ -200,14 +197,14 @@ 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;
         Parameters_& operator=( const Parameters_& ) = default;
    -    void get( DictionaryDatum& ) const;
    -    void set( const DictionaryDatum& );
    +    void get( dictionary& ) const;
    +    void set( const dictionary& );
       } P_;
     
     private:
    @@ -220,10 +217,10 @@ class StimulationDevice : public DeviceNode, public Device
        */
       synindex first_syn_id_;
     
    -  DictionaryDatum backend_params_;
    +  dictionary backend_params_;
     };
     
    -inline Name
    +inline std::string
     StimulationDevice::get_element_type() const
     {
       return names::stimulator;
    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:
    diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp
    index 07a3af88e4..f9f68b3204 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
     {
    @@ -51,37 +49,35 @@ 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;
     
    -  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 ] = Ca_minus_;
    +  d[ names::tau_Ca ] = tau_Ca_;
    +  d[ names::beta_Ca ] = beta_Ca_;
     
    -  synaptic_elements_d = DictionaryDatum( new Dictionary );
    -  def< DictionaryDatum >( d, names::synaptic_elements, synaptic_elements_d );
    -  for ( std::map< Name, SynapticElement >::const_iterator it = synaptic_elements_map_.begin();
    +  dictionary synaptic_elements_d;
    +  for ( std::map< std::string, 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;
         it->second.get( synaptic_element_d );
    +    synaptic_elements_d[ it->first ] = synaptic_element_d;
       }
    +  d[ names::synaptic_elements ] = synaptic_elements_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_Ca_ = Ca_minus_;
       double new_tau_Ca = tau_Ca_;
       double new_beta_Ca = beta_Ca_;
    -  updateValue< double >( d, names::Ca, new_Ca_ );
    -  updateValue< double >( d, names::tau_Ca, new_tau_Ca );
    -  updateValue< double >( d, names::beta_Ca, new_beta_Ca );
    +  d.update_value( names::Ca, new_Ca_ );
    +  d.update_value( names::tau_Ca, new_tau_Ca );
    +  d.update_value( names::beta_Ca, new_beta_Ca );
     
       if ( new_Ca_ < 0.0 )
       {
    @@ -105,42 +101,43 @@ 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, clear );
       if ( clear )
       {
         clear_history();
       }
     
    -  if ( d->known( names::synaptic_elements_param ) )
    +  if ( d.known( names::synaptic_elements_param ) )
       {
    -    const DictionaryDatum synaptic_elements_dict = getValue< DictionaryDatum >( d, names::synaptic_elements_param );
    +    const dictionary synaptic_elements_dict = d.get< dictionary >( 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 )
         {
    -      if ( synaptic_elements_dict->known( it->first ) )
    +      if ( synaptic_elements_dict.known( it->first ) )
           {
    -        const DictionaryDatum synaptic_elements_a = getValue< DictionaryDatum >( synaptic_elements_dict, 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 ) )
    +  if ( not d.known( names::synaptic_elements ) )
       {
         return;
       }
       // we replace the existing synaptic_elements_map_ by the new one
    -  DictionaryDatum synaptic_elements_d;
    -  std::pair< std::map< Name, SynapticElement >::iterator, bool > insert_result;
    +  dictionary synaptic_elements_d;
    +  std::pair< std::map< std::string, SynapticElement >::iterator, bool > insert_result;
     
    -  synaptic_elements_map_ = std::map< Name, SynapticElement >();
    -  synaptic_elements_d = getValue< DictionaryDatum >( d, names::synaptic_elements );
    +  synaptic_elements_map_ = std::map< std::string, SynapticElement >();
    +  synaptic_elements_d = d.get< dictionary >( names::synaptic_elements );
     
    -  for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i )
    +  for ( auto& syn_element : synaptic_elements_d )
       {
    -    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 ) );
    +    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 ) );
       }
     }
     
    @@ -152,9 +149,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;
     
    @@ -177,9 +174,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() )
    @@ -193,9 +190,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() )
    @@ -208,16 +205,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;
     }
    @@ -227,7 +224,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 )
       {
    @@ -241,7 +238,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 )
       {
    @@ -250,9 +247,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 ffaf0c9f67..d195e23107 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
     {
    @@ -63,24 +61,24 @@ class StructuralPlasticityNode : public Node
        * actual vacant and connected elements is an integer truncated from this
        * value
        */
    -  double get_synaptic_elements( Name n ) const override;
    +  double get_synaptic_elements( std::string n ) const override;
     
       /**
        * Get the number of synaptic elements of type n which are available
        * for new synapse creation
        */
    -  int get_synaptic_elements_vacant( Name n ) const override;
    +  int get_synaptic_elements_vacant( std::string n ) const override;
     
       /**
        * Get the number of synaptic element of type n which are currently
        * connected
        */
    -  int get_synaptic_elements_connected( Name n ) const override;
    +  int get_synaptic_elements_connected( std::string n ) const override;
     
       /**
        * Get the number of all synaptic elements for the current Node
        */
    -  std::map< Name, double > get_synaptic_elements() const override;
    +  std::map< std::string, double > get_synaptic_elements() const override;
     
       /**
        * Change the number of synaptic elements in the node depending on the
    @@ -97,10 +95,10 @@ class StructuralPlasticityNode : public Node
       /**
        * Change the number of connected synaptic elements by n
        */
    -  void connect_synaptic_element( Name name, int n ) override;
    +  void connect_synaptic_element( std::string name, int n ) 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;
     
       /**
        * Retrieve the current value of tau_Ca which defines the exponential decay
    @@ -148,7 +146,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 cd51c16861..6a2218662b 100644
    --- a/nestkernel/synaptic_element.cpp
    +++ b/nestkernel/synaptic_element.cpp
    @@ -26,8 +26,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * SynapticElement
    @@ -55,7 +53,7 @@ nest::SynapticElement::SynapticElement( const SynapticElement& se )
     {
       growth_curve_ = kernel().sp_manager.new_growth_curve( se.growth_curve_->get_name() );
       assert( growth_curve_ );
    -  DictionaryDatum nc_parameters = DictionaryDatum( new Dictionary );
    +  dictionary nc_parameters;
       se.get( nc_parameters );
       growth_curve_->set( nc_parameters );
     }
    @@ -67,7 +65,7 @@ nest::SynapticElement::operator=( const SynapticElement& other )
       {
         // 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 );
    @@ -89,14 +87,14 @@ nest::SynapticElement::operator=( const SynapticElement& other )
      * 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 ] = 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
       growth_curve_->get( d );
    @@ -106,19 +104,19 @@ nest::SynapticElement::get( DictionaryDatum& d ) const
      * 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, 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 ) )
    +  if ( d.known( names::growth_curve ) )
       {
    -    Name growth_curve_name( getValue< std::string >( d, 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 8c2dfac349..6ef7e593e1 100644
    --- a/nestkernel/synaptic_element.h
    +++ b/nestkernel/synaptic_element.h
    @@ -82,8 +82,9 @@
     // Includes from nestkernel:
     #include "growth_curve.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    +// Includes from libnestutil:
    +#include "dictionary.h"
    +
     
     namespace nest
     {
    @@ -122,14 +123,14 @@ class SynapticElement
        *
        * @param d to write data
        */
    -  void get( DictionaryDatum& d ) const;
    +  void get( dictionary& d ) const;
     
       /**
        * 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 82e5356260..9c78acb8ea 100644
    --- a/nestkernel/target_identifier.h
    +++ b/nestkernel/target_identifier.h
    @@ -60,13 +60,13 @@ class TargetIdentifierPtrRport
     
     
       void
    -  get_status( DictionaryDatum& d ) const
    +  get_status( dictionary& d ) const
       {
         // Do nothing if called on synapse prototype
         if ( target_ )
         {
    -      def< long >( d, names::rport, rport_ );
    -      def< long >( d, names::target, target_->get_node_id() );
    +      d[ names::rport ] = rport_;
    +      d[ names::target ] = target_->get_node_id();
         }
       }
     
    @@ -124,13 +124,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 ] = 0;
    +      d[ names::target ] = target_;
         }
       }
     
    diff --git a/nestkernel/target_table_devices.h b/nestkernel/target_table_devices.h
    index de6d31db3d..79915d17d0 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
     {
    @@ -85,7 +82,7 @@ class TargetTableDevices
         const size_t s_node_id,
         const size_t tid,
         const synindex syn_id,
    -    const DictionaryDatum& p,
    +    const dictionary& p,
         const double d,
         const double w );
     
    @@ -96,7 +93,7 @@ class TargetTableDevices
         Node& target,
         const size_t tid,
         const synindex syn_id,
    -    const DictionaryDatum& p,
    +    const dictionary& p,
         const double d,
         const double w );
     
    @@ -170,7 +167,7 @@ class TargetTableDevices
       void get_synapse_status_to_device( const size_t tid,
         const size_t source_node_id,
         const synindex syn_id,
    -    DictionaryDatum& dict,
    +    dictionary& dict,
         const size_t lcid ) const;
     
       /**
    @@ -179,7 +176,7 @@ class TargetTableDevices
       void get_synapse_status_from_device( const size_t tid,
         const size_t ldid,
         const synindex syn_id,
    -    DictionaryDatum& dict,
    +    dictionary& dict,
         const size_t lcid ) const;
     
       /**
    @@ -189,7 +186,7 @@ class TargetTableDevices
         const size_t source_node_id,
         const synindex syn_id,
         ConnectorModel& cm,
    -    const DictionaryDatum& dict,
    +    const dictionary& dict,
         const size_t lcid );
     
       /**
    @@ -199,7 +196,7 @@ class TargetTableDevices
         const size_t ldid,
         const synindex syn_id,
         ConnectorModel& cm,
    -    const DictionaryDatum& dict,
    +    const dictionary& dict,
         const size_t lcid );
     
       /**
    @@ -212,7 +209,7 @@ inline void
     TargetTableDevices::get_synapse_status_from_device( const size_t tid,
       const size_t ldid,
       const synindex syn_id,
    -  DictionaryDatum& dict,
    +  dictionary& dict,
       const size_t lcid ) const
     {
       target_from_devices_[ tid ][ ldid ][ syn_id ]->get_synapse_status( tid, lcid, dict );
    @@ -223,7 +220,7 @@ TargetTableDevices::set_synapse_status_from_device( const size_t tid,
       const size_t ldid,
       const synindex syn_id,
       ConnectorModel& cm,
    -  const DictionaryDatum& dict,
    +  const dictionary& dict,
       const size_t lcid )
     {
       target_from_devices_[ tid ][ ldid ][ syn_id ]->set_synapse_status( lcid, dict, cm );
    @@ -264,7 +261,6 @@ TargetTableDevices::is_device_connected( const size_t tid, const size_t lcid ) c
       return false;
     }
     
    -
     } // namespace nest
     
     #endif
    diff --git a/nestkernel/target_table_devices_impl.h b/nestkernel/target_table_devices_impl.h
    index 26a4668fb1..f34d9fe39e 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 size_t source_node_id,
       const size_t 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 size_t tid,
       const synindex syn_id,
    -  const DictionaryDatum& p,
    +  const dictionary& p,
       const double d,
       const double w )
     {
    @@ -110,7 +110,7 @@ inline void
     nest::TargetTableDevices::get_synapse_status_to_device( const size_t tid,
       const size_t source_node_id,
       const synindex syn_id,
    -  DictionaryDatum& dict,
    +  dictionary& dict,
       const size_t lcid ) const
     {
       const size_t lid = kernel().vp_manager.node_id_to_lid( source_node_id );
    @@ -125,7 +125,7 @@ nest::TargetTableDevices::set_synapse_status_to_device( const size_t tid,
       const size_t source_node_id,
       const synindex syn_id,
       ConnectorModel& cm,
    -  const DictionaryDatum& dict,
    +  const dictionary& dict,
       const size_t lcid )
     {
       const size_t lid = kernel().vp_manager.node_id_to_lid( source_node_id );
    diff --git a/nestkernel/universal_data_logger.h b/nestkernel/universal_data_logger.h
    index cb51337b12..6745640b49 100644
    --- a/nestkernel/universal_data_logger.h
    +++ b/nestkernel/universal_data_logger.h
    @@ -279,18 +279,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 );
    @@ -542,18 +541,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 a53e0f4ab7..5a43941a7a 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
     {
    @@ -101,8 +99,8 @@ class UrbanczikArchivingNode : public ArchivingNode
     
       urbanczik_parameters* urbanczik_params;
     
    -  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:
       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 62c105fff2..75035a5c1b 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
     {
    @@ -46,14 +44,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 6ebf211e34..e72152dcb8 100644
    --- a/nestkernel/vp_manager.cpp
    +++ b/nestkernel/vp_manager.cpp
    @@ -34,8 +34,6 @@
     #include "mpi_manager_impl.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     nest::VPManager::VPManager()
     #ifdef _OPENMP
    @@ -97,13 +95,13 @@ nest::VPManager::get_OMP_NUM_THREADS() const
     }
     
     void
    -nest::VPManager::set_status( const DictionaryDatum& d )
    +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 = updateValue< long >( d, names::local_num_threads, n_threads );
    -  bool n_vps_updated = updateValue< long >( d, 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 )
       {
    @@ -177,10 +175,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 ] = get_num_threads();
    +  d[ names::total_num_virtual_procs ] = get_num_virtual_processes();
     }
     
     void
    diff --git a/nestkernel/vp_manager.h b/nestkernel/vp_manager.h
    index c0acc819a0..010bbb46c3 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:
    @@ -59,8 +57,8 @@ class VPManager : public ManagerInterface
       void initialize( const bool ) override;
       void finalize( const bool ) override;
     
    -  void set_status( const DictionaryDatum& ) override;
    -  void get_status( DictionaryDatum& ) override;
    +  virtual void set_status( const dictionary& ) override;
    +  virtual void get_status( dictionary& ) override;
     
       /**
        * Gets ID of local thread.
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 6d3129419d..f2828944f0 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -19,68 +19,59 @@
     
     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(
    -        pynestkernel.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 models
    -      )
    +  # 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 )
     
    -  target_include_directories( pynestkernel PRIVATE
    -      ${PROJECT_BINARY_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/nest
    -      ${PROJECT_SOURCE_DIR}/nestkernel
    -      ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -      ${PROJECT_SOURCE_DIR}/sli
    -      ${PROJECT_SOURCE_DIR}/thirdparty
    -      ${PROJECT_SOURCE_DIR}/models
    -      ${Python_INCLUDE_DIRS}
    -      )
    +  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_BINARY_DIR}/pynest
    +    ${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( 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( 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( DIRECTORY examples/
           DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest
       )
     
    +  install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
     endif ()
    diff --git a/testsuite/musictests/CMakeLists.txt b/pynest/examples/CMakeLists.txt
    similarity index 90%
    rename from testsuite/musictests/CMakeLists.txt
    rename to pynest/examples/CMakeLists.txt
    index 6b83f58b49..b1c834a050 100644
    --- a/testsuite/musictests/CMakeLists.txt
    +++ b/pynest/examples/CMakeLists.txt
    @@ -17,4 +17,6 @@
     # 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
    +install( FILES run_examples.sh
    +    DESTINATION ${CMAKE_INSTALL_DOCDIR}
    +    )
    diff --git a/pynest/examples/CampbellSiegert.py b/pynest/examples/CampbellSiegert.py
    index fd34edcf6d..e5a59e0db5 100755
    --- a/pynest/examples/CampbellSiegert.py
    +++ b/pynest/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/pynest/examples/README.txt b/pynest/examples/README.rst
    similarity index 97%
    rename from pynest/examples/README.txt
    rename to pynest/examples/README.rst
    index daedc2dc4b..ad52192046 100644
    --- a/pynest/examples/README.txt
    +++ b/pynest/examples/README.rst
    @@ -1,3 +1,2 @@
     NEST example networks
     =====================
    -
    diff --git a/pynest/examples/aeif_cond_beta_multisynapse.py b/pynest/examples/aeif_cond_beta_multisynapse.py
    index 6eed64f91d..e398d92db0 100644
    --- a/pynest/examples/aeif_cond_beta_multisynapse.py
    +++ b/pynest/examples/aeif_cond_beta_multisynapse.py
    @@ -29,10 +29,16 @@
     import nest
     import numpy as np
     
    -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])})
    @@ -52,8 +58,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/balancedneuron.py b/pynest/examples/balancedneuron.py
    index a76cecc587..07932f70ac 100644
    --- a/pynest/examples/balancedneuron.py
    +++ b/pynest/examples/balancedneuron.py
    @@ -56,7 +56,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 bef9a4b448..d0a5839d54 100644
    --- a/pynest/examples/brunel_alpha_evolution_strategies.py
    +++ b/pynest/examples/brunel_alpha_evolution_strategies.py
    @@ -223,7 +223,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/clopath_synapse_spike_pairing.py b/pynest/examples/clopath_synapse_spike_pairing.py
    index 413744f851..33b11c3586 100644
    --- a/pynest/examples/clopath_synapse_spike_pairing.py
    +++ b/pynest/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/pynest/examples/compartmental_model/receptors_and_current.py b/pynest/examples/compartmental_model/receptors_and_current.py
    index d1fcd3bedb..b089400ac5 100644
    --- a/pynest/examples/compartmental_model/receptors_and_current.py
    +++ b/pynest/examples/compartmental_model/receptors_and_current.py
    @@ -62,7 +62,7 @@
     
     ###############################################################################
     # spike threshold
    -nest.SetStatus(cm, {"V_th": -50.0})
    +cm.V_th = -50.0
     
     ###############################################################################
     # - GABA receptor in compartment 0 (soma)
    @@ -83,11 +83,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
    @@ -103,16 +103,16 @@
     
     ###############################################################################
     # 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)
    -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 f092d3b092..e6bd02037d 100644
    --- a/pynest/examples/compartmental_model/two_comps.py
    +++ b/pynest/examples/compartmental_model/two_comps.py
    @@ -156,8 +156,8 @@
     ###############################################################################
     # simulate the models
     nest.Simulate(160.0)
    -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/evaluate_quantal_stp_synapse.py b/pynest/examples/evaluate_quantal_stp_synapse.py
    index bb16490bab..77e7d772b1 100644
    --- a/pynest/examples/evaluate_quantal_stp_synapse.py
    +++ b/pynest/examples/evaluate_quantal_stp_synapse.py
    @@ -121,7 +121,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 f1b091bac2..4f865a3c75 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 cd0d2051d9..7a0d0e9caa 100644
    --- a/pynest/examples/hh_phaseplane.py
    +++ b/pynest/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/pynest/examples/hh_psc_alpha.py b/pynest/examples/hh_psc_alpha.py
    index e1f272a8d5..0a0fd39308 100644
    --- a/pynest/examples/hh_psc_alpha.py
    +++ b/pynest/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/pynest/examples/if_curve.py b/pynest/examples/if_curve.py
    index fb0b9d1d27..ffed0e977e 100644
    --- a/pynest/examples/if_curve.py
    +++ b/pynest/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/pynest/examples/intrinsic_currents_spiking.py b/pynest/examples/intrinsic_currents_spiking.py
    index dc9dc24293..90481d3552 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 27c36e481d..a4d2e061f8 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/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/pynest/examples/music_cont_out_proxy_example/README.md b/pynest/examples/music_cont_out_proxy_example/README.md
    index b3b670c81a..6f3985b59e 100644
    --- a/pynest/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/pynest/examples/one_neuron.py b/pynest/examples/one_neuron.py
    index 9b28363e1e..956ea96bb6 100755
    --- a/pynest/examples/one_neuron.py
    +++ b/pynest/examples/one_neuron.py
    @@ -47,7 +47,7 @@
     import nest
     import nest.voltage_trace
     
    -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 44e5954611..9479c60c0b 100755
    --- a/pynest/examples/one_neuron_with_noise.py
    +++ b/pynest/examples/one_neuron_with_noise.py
    @@ -41,7 +41,7 @@
     import nest
     import nest.voltage_trace
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    @@ -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 80,000 spks/s and 15,000 spks/s, 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 80,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 db5aa188b9..fe801cd965 100644
    --- a/pynest/examples/pong/networks.py
    +++ b/pynest/examples/pong/networks.py
    @@ -165,9 +165,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):
             """Finds the motor neuron with the highest activation (number of spikes).
    diff --git a/pynest/examples/pong/run_simulations.py b/pynest/examples/pong/run_simulations.py
    index 6079d4d8b7..aa12575ae7 100644
    --- a/pynest/examples/pong/run_simulations.py
    +++ b/pynest/examples/pong/run_simulations.py
    @@ -190,7 +190,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", type=int, default=5000, help="Number of game steps to simulate.")
    diff --git a/pynest/examples/pulsepacket.py b/pynest/examples/pulsepacket.py
    index 98e3696c8c..5ad70f5606 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/examples/run_examples.sh b/pynest/examples/run_examples.sh
    similarity index 95%
    rename from examples/run_examples.sh
    rename to pynest/examples/run_examples.sh
    index 1b310ccff6..6340e3f5e7 100755
    --- a/examples/run_examples.sh
    +++ b/pynest/examples/run_examples.sh
    @@ -41,14 +41,14 @@ IFS=$' \n\t'
     declare -a EXAMPLES
     if [ "${#}" -eq 0 ]; then
         # Find all examples that have a line containing "autorun=true"
    -    # The examples can be found in subdirectory nest and in the 
    +    # The examples can be found in subdirectory nest and in the
         # examples installation path.
         if [ -d "nest/" ] ; then
             EXAMPLES="$(grep -rl --include=\*\.sli 'autorun=true' nest/)"
         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/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    index bfd870e452..2c63c08510 100644
    --- a/pynest/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/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    index bfd870e452..2c63c08510 100644
    --- a/pynest/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/pynest/examples/sonata_example/README.rst b/pynest/examples/sonata_example/README.rst
    index aae5f4f87a..19aa53c7de 100644
    --- a/pynest/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/pynest/examples/sonata_example/sonata_network.py b/pynest/examples/sonata_example/sonata_network.py
    index 4fb9d86c33..d89a9c5ccf 100644
    --- a/pynest/examples/sonata_example/sonata_network.py
    +++ b/pynest/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/pynest/examples/spatial/README.rst b/pynest/examples/spatial/README.rst
    index b322158287..689afca2cb 100644
    --- a/pynest/examples/spatial/README.rst
    +++ b/pynest/examples/spatial/README.rst
    @@ -1,3 +1,2 @@
     Spatially-structured networks in NEST
     =========================================
    -
    diff --git a/pynest/examples/spatial/conncomp.py b/pynest/examples/spatial/conncomp.py
    index 201bcf9098..aa5e682733 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 ab8a32ca0f..71e2652e7f 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.0, 3.0], edge_wrap=True)
     
    diff --git a/pynest/examples/store_restore_network.py b/pynest/examples/store_restore_network.py
    index ce22645675..a5df049d5c 100644
    --- a/pynest/examples/store_restore_network.py
    +++ b/pynest/examples/store_restore_network.py
    @@ -49,17 +49,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.
    @@ -110,7 +111,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(
    @@ -184,7 +185,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")
     
             ###############################################################################
    @@ -312,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/pynest/examples/structural_plasticity.py b/pynest/examples/structural_plasticity.py
    index 7f1a672f8c..50df7d5ba8 100644
    --- a/pynest/examples/structural_plasticity.py
    +++ b/pynest/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/pynest/examples/sudoku/sudoku_solver.py b/pynest/examples/sudoku/sudoku_solver.py
    index 8e6e836fd7..33cbee0233 100644
    --- a/pynest/examples/sudoku/sudoku_solver.py
    +++ b/pynest/examples/sudoku/sudoku_solver.py
    @@ -65,8 +65,8 @@
     import sudoku_net
     from helpers_sudoku import get_puzzle, plot_field, validate_solution
     
    -nest.SetKernelStatus({"local_num_threads": 8})
    -nest.set_verbosity("M_WARNING")
    +nest.local_num_threads = 8
    +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 9e1e263a97..df186423bb 100644
    --- a/pynest/examples/twoneurons.py
    +++ b/pynest/examples/twoneurons.py
    @@ -43,7 +43,7 @@
     import nest
     import nest.voltage_trace
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/urbanczik_synapse_example.py b/pynest/examples/urbanczik_synapse_example.py
    index 8c09e03e2b..1180917292 100644
    --- a/pynest/examples/urbanczik_synapse_example.py
    +++ b/pynest/examples/urbanczik_synapse_example.py
    @@ -266,7 +266,6 @@ 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]})
    @@ -284,7 +283,7 @@ def h(U, nrn_params):
     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})
    +        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 6c5cdf6920..6383a99ed8 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/generate_exception_header.py b/pynest/generate_exception_header.py
    new file mode 100644
    index 0000000000..5adae000c5
    --- /dev/null
    +++ b/pynest/generate_exception_header.py
    @@ -0,0 +1,96 @@
    +# -*- 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:
    +            if line.strip().endswith(": public KernelException"):
    +                exceptions.append(line.split()[1])
    +
    +    fname = "nest_exception_names.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()
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index 0aa91fd22b..9bff704088 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -61,7 +61,7 @@
     import sys  # noqa
     import types  # noqa
     
    -from .ll_api_kernel_attributes import KernelAttribute  # noqa
    +from .ll_api import KernelAttribute  # noqa
     
     try:
         import versionchecker  # noqa: F401
    @@ -81,9 +81,11 @@ class NestModule(types.ModuleType):
         from . import math  # noqa
         from . import random  # noqa
         from . import spatial_distributions  # noqa
    -    from . import pynestkernel as kernel  # noqa
         from .ll_api import set_communicator
     
    +    NESTErrors = ll_api.nestkernel.NESTErrors
    +    NESTError = ll_api.nestkernel.NESTErrors.KernelException
    +
         def __init__(self, name):
             super().__init__(name)
             # Copy over the original module attributes to preserve all interpreter-given
    @@ -92,7 +94,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
    @@ -109,7 +110,7 @@ def __init__(self, name):
             type(self).visualization = _lazy_module_property("visualization")  # noqa: F821
             type(self).voltage_trace = _lazy_module_property("voltage_trace")  # noqa: F821
     
    -        self.__version__ = ll_api.sli_func("statusdict /version get")  # noqa: F821
    +        self.__version__ = "PYNEST-NG"
             # Finalize the nest module with a public API.
             _api = list(k for k in self.__dict__ if not k.startswith("_"))
             _api.extend(k for k in dir(type(self)) if not k.startswith("_"))
    @@ -145,6 +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", 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)
    @@ -511,7 +514,7 @@ def lazy_loader(self):
     _module.__dict__["NestModule"] = NestModule
     # Set the nest module object as the return value of `import nest` using sys
     sys.modules[__name__] = _module
    -# Some compiled/binary components (`pynestkernel.pyx` for example) of NEST
    +# Some compiled/binary components (`nestkernel_api.pyx` for example) of NEST
     # obtain a reference to this file's original module object instead of what's in
     # `sys.modules`. For these edge cases we make available all attributes of the
     # nest module instance to this file's module object.
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index e9fe89b7be..8c952ba174 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -20,17 +20,14 @@
     # 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
     
     import numpy as np
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import spp, sps, sr
    -from .hl_api_exceptions import NESTErrors
    +from .. import nestkernel_api as nestkernel
     from .hl_api_types import CollocatedSynapses, Mask, NodeCollection, Parameter
     
     __all__ = [
    @@ -45,9 +42,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
    @@ -76,7 +72,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 kernel.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)):
    @@ -87,63 +83,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 kernel.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 kernel.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 kernel.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 kernel.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 kernel.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 kernel.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 kernel.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 kernel.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
    @@ -176,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)
    @@ -221,7 +211,7 @@ def _process_spatial_projections(conn_spec, syn_spec):
                 raise ValueError("'use_on_source' can only be set when using 'pairwise_bernoulli'.")
             projections["connection_type"] = "pairwise_poisson"
         else:
    -        raise kernel.NESTError(
    +        raise ValueError(
                 "When using kernel or mask, the only possible connection rules are "
                 "'pairwise_bernoulli', 'fixed_indegree', or 'fixed_outdegree'"
             )
    @@ -255,11 +245,9 @@ def _connect_layers_needed(conn_spec, syn_spec):
     
     
     def _connect_spatial(pre, post, projections):
    -    """Connect `pre` to `post` using the specifications in `projections` with the SLI function `ConnectLayers`."""
    +    """Connect ``pre`` to ``post`` using the specifications in ``projections``."""
     
    -    # Replace python classes with SLI datums
         def fixdict(d):
    -        d = d.copy()
             for k, v in d.items():
                 if isinstance(v, dict):
                     d[k] = fixdict(v)
    @@ -267,9 +255,7 @@ def fixdict(d):
                     d[k] = v._datum
             return d
     
    -    projections = fixdict(projections)
    -    sps(projections)
    -    sr("ConnectLayers")
    +    nestkernel.llapi_connect_layers(pre, post, fixdict(projections))
     
     
     def _process_input_nodes(pre, post, conn_spec):
    @@ -313,9 +299,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)
    @@ -323,10 +307,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 aef9dd0674..0f79bb309b 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -25,8 +25,7 @@
     
     import numpy
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import check_stack, connect_arrays, spp, sps, sr
    +from .. import nestkernel_api as nestkernel
     from .hl_api_connection_helpers import (
         _connect_layers_needed,
         _connect_spatial,
    @@ -35,8 +34,15 @@
         _process_spatial_projections,
         _process_syn_spec,
     )
    -from .hl_api_helper import is_string
    -from .hl_api_types import CollocatedSynapses, NodeCollection, SynapseCollection
    +from .hl_api_nodes import Create
    +from .hl_api_parallel_computing import NumProcesses
    +from .hl_api_types import (
    +    CollocatedSynapses,
    +    Mask,
    +    NodeCollection,
    +    Parameter,
    +    SynapseCollection,
    +)
     
     __all__ = [
         "Connect",
    @@ -46,7 +52,6 @@
     ]
     
     
    -@check_stack
     def GetConnections(source=None, target=None, synapse_model=None, synapse_label=None):
         """Return a `SynapseCollection` representing the connection identifiers.
     
    @@ -97,23 +102,16 @@ def GetConnections(source=None, target=None, synapse_model=None, synapse_label=N
                 raise TypeError("target must be NodeCollection.")
     
         if synapse_model is not None:
    -        params["synapse_model"] = kernel.SLILiteral(synapse_model)
    +        params["synapse_model"] = synapse_model
     
         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
     
     
    -@check_stack
     def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=False):
         """
         Connect `pre` nodes to `post` nodes.
    @@ -138,10 +136,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
    -    ------
    -    kernel.NESTError
    -
         Notes
         -----
         It is possible to connect NumPy arrays of node IDs one-to-one by passing the arrays as `pre` and `post`,
    @@ -250,20 +244,22 @@ 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_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
     
    -    sps(pre)
    -    sps(post)
    -
         if not isinstance(pre, NodeCollection):
             raise TypeError("Not implemented, presynaptic nodes must be a NodeCollection")
         if not isinstance(post, NodeCollection):
    @@ -279,20 +275,14 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
     
             # Create the projection dictionary
             spatial_projections = _process_spatial_projections(processed_conn_spec, processed_syn_spec)
    -
    -        # Connect using ConnectLayers
    -        _connect_spatial(pre, post, spatial_projections)
    +        _connect_spatial(pre._datum, post._datum, spatial_projections)
         else:
    -        sps(processed_conn_spec)
    -        if processed_syn_spec is not None:
    -            sps(processed_syn_spec)
    -        sr("Connect")
    +        nestkernel.llapi_connect(pre._datum, post._datum, processed_conn_spec, processed_syn_spec)
     
         if return_synapsecollection:
             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.
    @@ -404,16 +394,11 @@ 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
    +    )
     
     
    -@check_stack
     def Disconnect(*args, conn_spec=None, syn_spec=None):
         """Disconnect connections in a SynapseCollection, or `pre` neurons from `post` neurons.
     
    @@ -486,17 +471,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}
             pre, post = args
             if not isinstance(pre, NodeCollection) or not isinstance(post, NodeCollection):
                 raise TypeError("Arguments must be either a SynapseCollection or two NodeCollections")
    -        sps(pre)
    -        sps(post)
    -        sps(conn_spec)
    -        sps(syn_spec)
    -        sr("Disconnect_g_g_D_D")
    +        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_exceptions.py b/pynest/nest/lib/hl_api_exceptions.py
    deleted file mode 100644
    index cd0fdcafc0..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 SLI 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
    diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py
    index 0dba569547..3034b5c8ba 100644
    --- a/pynest/nest/lib/hl_api_helper.py
    +++ b/pynest/nest/lib/hl_api_helper.py
    @@ -32,8 +32,9 @@
     import warnings
     from string import Template
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import sli_func, spp, sps, sr
    +import nest
    +
    +from .. import nestkernel_api as nestkernel
     
     __all__ = [
         "broadcast",
    @@ -42,16 +43,12 @@
         "get_parameters_hierarchical_addressing",
         "get_wrapped_text",
         "is_iterable",
    -    "is_literal",
    -    "is_sequence_of_connections",
    -    "is_sequence_of_node_ids",
    -    "is_string",
         "load_help",
         "model_deprecation_warning",
         "restructure_data",
         "show_deprecation_warning",
         "show_help_with_pager",
    -    "stringify_path",
    +    "stringify_path",  # TODO PYNEST-NG: remove?
         "SuppressedDeprecationWarning",
     ]
     
    @@ -173,38 +170,6 @@ def stringify_path(filepath):
         return filepath
     
     
    -def is_literal(obj):
    -    """Check whether obj is a "literal": a unicode string or SLI literal
    -
    -    Parameters
    -    ----------
    -    obj : object
    -        Object to check
    -
    -    Returns
    -    -------
    -    bool:
    -        True if obj is a "literal"
    -    """
    -    return isinstance(obj, (str, kernel.SLILiteral))
    -
    -
    -def is_string(obj):
    -    """Check whether obj is a unicode string
    -
    -    Parameters
    -    ----------
    -    obj : object
    -        Object to check
    -
    -    Returns
    -    -------
    -    bool:
    -        True if obj is a unicode string
    -    """
    -    return isinstance(obj, str)
    -
    -
     def is_iterable(seq):
         """Return True if the given object is an iterable, False otherwise.
     
    @@ -227,49 +192,6 @@ def is_iterable(seq):
         return True
     
     
    -def is_sequence_of_connections(seq):
    -    """Checks whether low-level API accepts seq as a sequence of
    -    connections.
    -
    -    Parameters
    -    ----------
    -    seq : object
    -        Object to check
    -
    -    Returns
    -    -------
    -    bool:
    -        True if object is an iterable of dictionaries or
    -        subscriptables of CONN_LEN
    -    """
    -
    -    try:
    -        cnn = next(iter(seq))
    -        return isinstance(cnn, dict) or len(cnn) == kernel.CONN_LEN
    -    except TypeError:
    -        pass
    -
    -    return False
    -
    -
    -def is_sequence_of_node_ids(seq):
    -    """Checks whether the argument is a potentially valid sequence of
    -    node IDs (non-negative integers).
    -
    -    Parameters
    -    ----------
    -    seq : object
    -        Object to check
    -
    -    Returns
    -    -------
    -    bool:
    -        True if object is a potentially valid sequence of node IDs
    -    """
    -
    -    return all(isinstance(n, int) and n >= 0 for n in seq)
    -
    -
     def broadcast(item, length, allowed_types, name="item"):
         """Broadcast item to given length.
     
    @@ -362,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):
    @@ -459,7 +381,8 @@ def restructure_data(result, keys):
         -------
         int, list or dict
         """
    -    if is_literal(keys):
    +
    +    if isinstance(keys, str):
             if len(result) != 1:
                 all_keys = sorted({key for result_dict in result for key in result_dict})
                 final_result = []
    @@ -517,17 +440,10 @@ def get_parameters(nc, param):
             param is a list of string so a dictionary is returned
         """
         # 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.
    -    # param is array of strings
    +    if isinstance(param, str):
    +        result = nestkernel.llapi_get_nc_status(nc._datum, param)
         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")
     
    @@ -561,7 +477,7 @@ def get_parameters_hierarchical_addressing(nc, params):
         # Right now, NEST only allows get(arg0, arg1) for hierarchical
         # addressing, where arg0 must be a string and arg1 can be string
         # or list of strings.
    -    if is_literal(params[0]):
    +    if isinstance(params[0], str):
             value_list = nc.get(params[0])
             if not isinstance(value_list, tuple):
                 value_list = (value_list,)
    @@ -570,7 +486,7 @@ def get_parameters_hierarchical_addressing(nc, params):
     
         result = restructure_data(value_list, None)
     
    -    if is_literal(params[-1]):
    +    if isinstance(params[-1], str):
             result = result[params[-1]]
         else:
             result = {key: result[key] for key in params[-1]}
    @@ -595,10 +511,9 @@ def __init__(self, no_dep_funcs):
                           for which to suppress deprecation warnings
             """
     
    -        self._no_dep_funcs = no_dep_funcs if not is_string(no_dep_funcs) else (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:
    @@ -606,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 5a878c6c1f..dc732730d0 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -29,45 +29,29 @@
     
     import nest
     
    -from ..ll_api import check_stack, sli_func, spp, sps, sr
    +from .. import nestkernel_api as nestkernel
     from .hl_api_helper import (
         broadcast,
    +    deprecated,
         is_iterable,
    -    is_literal,
         load_help,
         show_help_with_pager,
     )
     from .hl_api_types import to_json
     
     __all__ = [
    -    "authors",
    -    "get_argv",
         "GetStatus",
         "get_verbosity",
         "help",
         "helpdesk",
    -    "message",
         "SetStatus",
         "set_verbosity",
    -    "sysinfo",
    +    "verbosity",
     ]
     
    +verbosity = nestkernel.severity_t
     
    -@check_stack
    -def sysinfo():
    -    """Print information on the platform on which NEST was compiled."""
     
    -    sr("sysinfo")
    -
    -
    -@check_stack
    -def authors():
    -    """Print the authors of NEST."""
    -
    -    sr("authors")
    -
    -
    -@check_stack
     def helpdesk():
         """Open the NEST documentation index in a browser.
     
    @@ -80,7 +64,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):
    @@ -91,7 +75,6 @@ def helpdesk():
         webbrowser.open_new(f"file://{help_fname}")
     
     
    -@check_stack
     def help(obj=None, return_text=False):
         """Display the help page for the given object in a pager.
     
    @@ -134,47 +117,6 @@ def help(obj=None, return_text=False):
             print(nest.__doc__)
     
     
    -@check_stack
    -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"]
    -
    -
    -@check_stack
    -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")
    -
    -
    -@check_stack
     def get_verbosity():
         """Return verbosity level of NEST's messages.
     
    @@ -187,15 +129,13 @@ def get_verbosity():
     
         Returns
         -------
    -    int:
    +    severity_t:
             The current verbosity level
         """
     
    -    sr("verbosity")
    -    return spp()
    +    return nestkernel.llapi_get_verbosity()
     
     
    -@check_stack
     def set_verbosity(level):
         """Change verbosity level for NEST's messages.
     
    @@ -214,235 +154,24 @@ 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.
         """
     
    -    sr("{} setverbosity".format(level))
    -
    +    if type(level) is not verbosity:
    +        raise TypeError('"level" must be a value of the nest.verbosity enum.')
     
    -@check_stack
    -def SetStatus(nodes, params, val=None):
    -    """Set parameters of nodes or connections.
    +    nestkernel.llapi_set_verbosity(level)
     
    -    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, list, 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.
    -
    -    See Also
    -    -------
    -    :py:func:`GetStatus`,
    -    :py:meth:`NodeCollection.get()<nest.lib.hl_api_types.NodeCollection.get>`,
    -    :py:meth:`NodeCollection.set()<nest.lib.hl_api_types.NodeCollection.set>`
    -
    -    """
    -
    -    if not isinstance(nodes, (nest.NodeCollection, nest.SynapseCollection)):
    -        raise TypeError("'nodes' must be NodeCollection or a SynapseCollection.")
    -
    -    # This was added to ensure that the function is a nop (instead of,
    -    # for instance, raising an exception) when applied to an empty
    -    # list, which is an artifact of the API operating on lists, rather
    -    # than relying on language idioms, such as comprehensions
    -    if len(nodes) == 0:
    -        return
    -
    -    params_is_dict = isinstance(params, dict)
    -    set_status_nodes = isinstance(nodes, nest.NodeCollection)
    -    if set_status_nodes:
    -        local_nodes = [nodes.local] if len(nodes) == 1 else nodes.local
    -        set_status_nodes = set_status_nodes and all(local_nodes)
    -
    -    if params_is_dict and set_status_nodes:
    -        node_params = nodes[0].get()
    -        contains_list = [
    -            is_iterable(vals) and key in node_params and not is_iterable(node_params[key])
    -            for key, vals in params.items()
    -        ]
    -
    -        if any(contains_list):
    -            temp_param = [{} for _ in range(len(nodes))]
    -
    -            for key, vals in params.items():
    -                if not is_iterable(vals):
    -                    for temp_dict in temp_param:
    -                        temp_dict[key] = vals
    -                else:
    -                    for i, temp_dict in enumerate(temp_param):
    -                        temp_dict[key] = vals[i]
    -            params = temp_param
    -
    -    if val is not None and is_literal(params):
    -        if is_iterable(val) and not isinstance(val, (str, dict)):
    -            params = [{params: x} for x in val]
    -        else:
    -            params = {params: val}
    -
    -    if isinstance(params, (list, tuple)) and len(nodes) != len(params):
    -        raise TypeError("status dict must be a dict, or a list of dicts of length {}".format(len(nodes)))
    -
    -    if isinstance(nodes, nest.SynapseCollection):
    -        params = broadcast(params, len(nodes), (dict,), "params")
    -
    -        sps(nodes)
    -        sps(params)
    -
    -        sr("2 arraystore")
    -        sr("Transpose { arrayload pop SetStatus } forall")
    +@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:
    -        sli_func("SetStatus", nodes, params)
    -
    -
    -@check_stack
    -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()<nest.lib.hl_api_types.NodeCollection.set>`,
    -    :py:meth:`NodeCollection.get()<nest.lib.hl_api_types.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:
    -        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)
    -    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.
    -        result = (result,)
    +        return nodes_or_conns.get(output=output)
     
    -    if output == "json":
    -        result = to_json(result)
     
    -    return result
    +@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})
    diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py
    index b554ab4661..5b4fef4cba 100644
    --- a/pynest/nest/lib/hl_api_models.py
    +++ b/pynest/nest/lib/hl_api_models.py
    @@ -23,13 +23,8 @@
     Functions for model handling
     """
     
    -from ..ll_api import check_stack, spp, sps, sr
    -from .hl_api_helper import (
    -    deprecated,
    -    is_iterable,
    -    is_literal,
    -    model_deprecation_warning,
    -)
    +from .. import nestkernel_api as nestkernel
    +from .hl_api_helper import deprecated, is_iterable, model_deprecation_warning
     from .hl_api_simulation import GetKernelStatus
     from .hl_api_types import to_json
     
    @@ -42,7 +37,6 @@
     ]
     
     
    -@check_stack
     @deprecated("nest.node_models or nest.synapse_models")
     def Models(mtype="all", sel=None):
         r"""Return a tuple of neuron, device, or synapse model names.
    @@ -94,7 +88,6 @@ def Models(mtype="all", sel=None):
         return tuple(models)
     
     
    -@check_stack
     @deprecated("nest.connection_rules")
     def ConnectionRules():
         """Return a tuple of all available connection rules, sorted by name.
    @@ -109,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.
     
    @@ -128,14 +120,12 @@ def SetDefaults(model, params, val=None):
         """
     
         if val is not None:
    -        if is_literal(params):
    +        if isinstance(params, str):
                 params = {params: val}
     
    -    sps(params)
    -    sr("/{0} exch SetDefaults".format(model))
    +    nestkernel.llapi_set_defaults(model, params)
     
     
    -@check_stack
     def GetDefaults(model, keys=None, output=""):
         """Return defaults of the given model or recording backend.
     
    @@ -169,18 +159,13 @@ 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")
    +    result = nestkernel.llapi_get_defaults(model)
     
    -    sr(cmd)
    -    result = spp()
    +    if keys is not None:
    +        if is_iterable(keys) and not isinstance(keys, str):
    +            result = [result[key] for key in keys]
    +        else:
    +            result = result[keys]
     
         if output == "json":
             result = to_json(result)
    @@ -188,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.
     
    @@ -206,8 +190,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/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index bb338c2457..36530e5ec3 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -26,11 +26,11 @@
     import warnings
     
     import nest
    +import numpy as np
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import check_stack, sli_func, spp, sps, sr
    +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_parallel_computing import NumProcesses, Rank
     from .hl_api_types import NodeCollection, Parameter
     
     __all__ = [
    @@ -41,7 +41,6 @@
     ]
     
     
    -@check_stack
     def Create(model, n=1, params=None, positions=None):
         """Create one or more nodes.
     
    @@ -95,9 +94,22 @@ def Create(model, n=1, params=None, positions=None):
         # or a NEST parameter, we create the nodes first, then set the given values. If not,
         # we can pass the parameter specification to SLI when the nodes are created.
         iterable_or_parameter_in_params = True
    +
    +    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?
         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.
    @@ -115,54 +127,39 @@ 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 kernel.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"] = 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]
     
    -        if not iterable_or_parameter_in_params:
    -            if params is None:
    -                # For compatibility with SLI.
    -                params = {}
    -            node_ids = sli_func("CreateLayerParams", layer_specs, params)
    -        else:
    -            # If node params contains iterable of Parameter, set after nodes are created. Empty dictionary
    -            # needed for SLI
    -            node_ids = sli_func("CreateLayerParams", layer_specs, {})
    -    else:
    -        # Nodes without positions
    -        if not iterable_or_parameter_in_params:
    -            cmd = "/%s 3 1 roll exch Create" % model
    -            sps(params)
    -        else:
    -            cmd = "/%s exch Create" % model
    +        layer = nestkernel.llapi_create_spatial(layer_specs)
    +        layer.set(params if params else {})
    +        return layer
     
    -        sps(n)
    -        sr(cmd)
    +    # 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)
     
    -        node_ids = spp()
    -
    -    if params is not None and iterable_or_parameter_in_params:
    +    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:
    -            SetStatus(node_ids, params)
    +            node_ids.set(params)
             except Exception:
                 warnings.warn(
    -                "SetStatus() call failed, but nodes have already been "
    -                + "created! The node IDs of the new nodes are: {0}.".format(node_ids)
    +                "Setting node parameters failed, but nodes have already been "
    +                + f"created! The node IDs of the new nodes are: {node_ids}."
                 )
                 raise
     
         return node_ids
     
     
    -@check_stack
     def PrintNodes():
         """Print the `node ID` ranges and `model names` of all the nodes in the network."""
     
    -    sr("PrintNodesToStream")
    -    print(spp())
    +    print(nestkernel.llapi_print_nodes())
     
     
     def GetNodes(properties={}, local_only=False):
    @@ -189,10 +186,9 @@ def GetNodes(properties={}, local_only=False):
             `NodeCollection` of nodes
         """
     
    -    return sli_func("GetNodes", properties, local_only)
    +    return nestkernel.llapi_get_nodes(properties, local_only)
     
     
    -@check_stack
     def GetLocalNodeCollection(nc):
         """Get local nodes of a `NodeCollection` as a new `NodeCollection`.
     
    @@ -212,6 +208,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 9ad6c40f8e..32f4fe7f0c 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -23,8 +23,7 @@
     Functions for parallel computing
     """
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import check_stack, sli_func, spp, sps, sr
    +from .. import nestkernel_api as nestkernel
     
     __all__ = [
         "NumProcesses",
    @@ -36,7 +35,6 @@
     ]
     
     
    -@check_stack
     def Rank():
         """Return the MPI rank of the local process.
     
    @@ -56,11 +54,9 @@ def Rank():
         may complete but generate nonsensical results.
         """
     
    -    sr("Rank")
    -    return spp()
    +    return nestkernel.llapi_get_kernel_status()["mpi_rank"]
     
     
    -@check_stack
     def NumProcesses():
         """Return the overall number of MPI processes.
     
    @@ -70,11 +66,9 @@ def NumProcesses():
             Number of overall MPI processes
         """
     
    -    sr("NumProcesses")
    -    return spp()
    +    return nestkernel.llapi_get_kernel_status()["num_processes"]
     
     
    -@check_stack
     def SetAcceptableLatency(port_name, latency):
         """Set the acceptable `latency` (in ms) for a MUSIC port.
     
    @@ -86,12 +80,13 @@ def SetAcceptableLatency(port_name, latency):
             Latency in ms
         """
     
    -    sps(kernel.SLILiteral(port_name))
    -    sps(latency)
    -    sr("SetAcceptableLatency")
    +    # PYNEST-NG
    +    # sps(kernel.SLILiteral(port_name))
    +    # sps(latency)
    +    # sr("SetAcceptableLatency")
    +    raise NotImplementedError
     
     
    -@check_stack
     def SetMaxBuffered(port_name, size):
         """Set the maximum buffer size for a MUSIC port.
     
    @@ -103,24 +98,27 @@ def SetMaxBuffered(port_name, size):
             Buffer size
         """
     
    -    sps(kernel.SLILiteral(port_name))
    -    sps(size)
    -    sr("SetMaxBuffered")
    +    # PYNEST-NG
    +    # sps(kernel.SLILiteral(port_name))
    +    # sps(size)
    +    # sr("SetMaxBuffered")
    +    raise NotImplementedError
     
     
    -@check_stack
     def SyncProcesses():
         """Synchronize all MPI processes."""
     
    -    sr("SyncProcesses")
    +    # PYNEST-NG
    +    # sr("SyncProcesses")
    +    raise NotImplementedError
     
     
    -@check_stack
     def GetLocalVPs():
         """Return iterable representing the VPs local to the MPI rank."""
     
         # Compute local VPs as range based on round-robin logic in
         # VPManager::get_vp(). mpitest_get_local_vps ensures this is in
         # sync with the kernel.
    -    n_vp = sli_func("GetKernelStatus /total_num_virtual_procs get")
    +
    +    n_vp = nestkernel.llapi_get_kernel_status()["total_num_virtual_procs"]
         return range(Rank(), n_vp, NumProcesses())
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index 9ce0d6f569..8efed0765e 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -26,8 +26,8 @@
     import warnings
     from contextlib import contextmanager
     
    -from ..ll_api import check_stack, spp, sps, sr
    -from .hl_api_helper import is_iterable, is_literal
    +from .. import nestkernel_api as nestkernel
    +from .hl_api_helper import is_iterable
     
     __all__ = [
         "Cleanup",
    @@ -44,7 +44,6 @@
     ]
     
     
    -@check_stack
     def Simulate(t):
         """Simulate the network for `t` milliseconds.
     
    @@ -61,11 +60,9 @@ def Simulate(t):
     
         """
     
    -    sps(float(t))
    -    sr("ms Simulate")
    +    nestkernel.llapi_simulate(t)
     
     
    -@check_stack
     def Run(t):
         """Simulate the network for `t` milliseconds.
     
    @@ -87,10 +84,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.
     
         Also note that `local_spike_counter` is reset each time you call `Run`.
     
    @@ -99,30 +96,22 @@ def Run(t):
         Prepare, Cleanup, RunManager, Simulate
     
         """
    +    nestkernel.llapi_run(t)
     
    -    sps(float(t))
    -    sr("ms Run")
     
    -
    -@check_stack
     def Prepare():
         """Calibrate the system before a `Run` call.
     
         `Prepare` is automatically called by `Simulate` and `RunManager`.
     
    -    Call before the first `Run` call, or before calling `Run` after changing
    -    the system, calling `SetStatus` or `Cleanup`.
    -
         See Also
         --------
         Run, Cleanup, Simulate, RunManager
     
         """
    +    nestkernel.llapi_prepare()
     
    -    sr("Prepare")
     
    -
    -@check_stack
     def Cleanup():
         """Cleans up resources after a `Run` calls.
     
    @@ -136,7 +125,7 @@ def Cleanup():
         Run, Prepare, Simulate, RunManager
     
         """
    -    sr("Cleanup")
    +    nestkernel.llapi_cleanup()
     
     
     @contextmanager
    @@ -156,10 +145,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.
    @@ -177,7 +165,6 @@ def RunManager():
             Cleanup()
     
     
    -@check_stack
     def ResetKernel():
         """Reset the simulation kernel.
     
    @@ -198,11 +185,9 @@ def ResetKernel():
         are reset. All dynamically loaded modules (via :py:func:`.Install()`) are unloaded.
     
         """
    -
    -    sr("ResetKernel")
    +    nestkernel.llapi_reset_kernel()
     
     
    -@check_stack
     def SetKernelStatus(params):
         """Set parameters for the simulation kernel.
     
    @@ -248,11 +233,9 @@ def SetKernelStatus(params):
                     warnings.warn(msg + f" \n`{key}` has been ignored")
                     del params[key]
     
    -    sps(params)
    -    sr("SetKernelStatus")
    +    nestkernel.llapi_set_kernel_status(params)
     
     
    -@check_stack
     def GetKernelStatus(keys=None):
         """Obtain parameters of the simulation kernel.
     
    @@ -288,12 +271,11 @@ def GetKernelStatus(keys=None):
     
         """
     
    -    sr("GetKernelStatus")
    -    status_root = spp()
    +    status_root = nestkernel.llapi_get_kernel_status()
     
         if keys is None:
             return status_root
    -    elif is_literal(keys):
    +    elif isinstance(keys, str):
             return status_root[keys]
         elif is_iterable(keys):
             return tuple(status_root[k] for k in keys)
    @@ -301,7 +283,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.
     
    @@ -328,10 +309,9 @@ def Install(module_name):
     
         """
     
    -    return sr("(%s) Install" % module_name)
    +    raise NotImplementedError
     
     
    -@check_stack
     def EnableStructuralPlasticity():
         """Enable structural plasticity for the network simulation
     
    @@ -341,10 +321,9 @@ def EnableStructuralPlasticity():
     
         """
     
    -    sr("EnableStructuralPlasticity")
    +    nestkernel.llapi_enable_structural_plasticity()
     
     
    -@check_stack
     def DisableStructuralPlasticity():
         """Disable structural plasticity for the network simulation
     
    @@ -353,4 +332,4 @@ def DisableStructuralPlasticity():
         EnableStructuralPlasticity
     
         """
    -    sr("DisableStructuralPlasticity")
    +    nestkernel.llapi_disable_structural_plasticity()
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 5d5aa2c648..bdf491378d 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -31,11 +31,10 @@
     
     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 +51,7 @@
     except ImportError:
         have_h5py = False
     
    -have_hdf5 = sli_func("statusdict/have_hdf5 ::")
    +have_hdf5 = GetKernelStatus("build_info")["have_hdf5"]
     
     __all__ = ["SonataNetwork"]
     
    @@ -107,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 kernel.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 kernel.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 kernel.NESTError(msg)
    +            raise ModuleNotFoundError("'SonataNetwork' unavailable because 'pandas' could not be loaded.")
     
             self._node_collections = {}
             self._edges_maps = []
    @@ -128,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"]})
     
    @@ -156,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)
    @@ -221,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]
     
    @@ -231,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
     
    @@ -322,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"]
     
    @@ -351,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"][:]
     
    @@ -391,15 +381,13 @@ 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(
    +                "Missing the required 'dynamics_params' header specifying .json "
    +                f"files with model parameters in {csv_fn}."
                 )
    -            raise ValueError(msg)
     
             nodes_df["model_template"] = nodes_df["model_template"].str.replace("nest:", "")
     
    @@ -431,8 +419,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 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
    @@ -449,9 +436,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
     
    -        sps(graph_specs)
    -        sps(hdf5_hyperslab_size)
    -        sr("ConnectSonata")
    +        nestkernel.llapi_connect_sonata(graph_specs, hdf5_hyperslab_size)
     
             self._is_network_built = True
     
    @@ -520,8 +505,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)
    @@ -530,6 +516,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
    @@ -627,7 +616,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)
     
    @@ -645,16 +634,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 kernel.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/lib/hl_api_spatial.py b/pynest/nest/lib/hl_api_spatial.py
    index 42cfbc654a..4cc224a006 100644
    --- a/pynest/nest/lib/hl_api_spatial.py
    +++ b/pynest/nest/lib/hl_api_spatial.py
    @@ -27,7 +27,7 @@
     
     import numpy as np
     
    -from ..ll_api import sli_func
    +from .. import nestkernel_api as nestkernel
     from .hl_api_connections import GetConnections
     from .hl_api_helper import is_iterable, stringify_path
     from .hl_api_parallel_computing import NumProcesses, Rank
    @@ -189,9 +189,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):
    @@ -245,7 +245,7 @@ def GetPosition(nodes):
         if not isinstance(nodes, NodeCollection):
             raise TypeError("nodes must be a NodeCollection with spatial extent")
     
    -    return sli_func("GetPosition", nodes)
    +    return nestkernel.llapi_get_position(nodes._datum)
     
     
     def Displacement(from_arg, to_arg):
    @@ -311,7 +311,7 @@ def Displacement(from_arg, to_arg):
         if len(from_arg) > 1 and len(to_arg) > 1 and not 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):
    @@ -378,7 +378,7 @@ def Distance(from_arg, to_arg):
         if len(from_arg) > 1 and len(to_arg) > 1 and not 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):
    @@ -536,14 +536,7 @@ def DumpLayerNodes(layer, outname):
             raise TypeError("layer must be a NodeCollection")
     
         outname = stringify_path(outname)
    -
    -    sli_func(
    -        """
    -             (w) file exch DumpLayerNodes close
    -             """,
    -        layer,
    -        _rank_specific_filename(outname),
    -    )
    +    nestkernel.llapi_dump_layer_nodes(layer._datum, _rank_specific_filename(outname))
     
     
     def DumpLayerConnections(source_layer, target_layer, synapse_model, outname):
    @@ -611,20 +604,8 @@ def DumpLayerConnections(source_layer, target_layer, synapse_model, outname):
             raise TypeError("target_layer must be a NodeCollection")
     
         outname = stringify_path(outname)
    -
    -    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, _rank_specific_filename(outname)
         )
     
     
    @@ -1008,10 +989,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 24cdfadd09..c77efafc65 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -29,19 +29,21 @@
     
     import numpy
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import sli_func, spp, sps, sr, take_array_index
    +from .. import nestkernel_api as nestkernel
     from .hl_api_helper import (
    -    broadcast,
         get_parameters,
         get_parameters_hierarchical_addressing,
         is_iterable,
    -    is_literal,
         restructure_data,
     )
     from .hl_api_parallel_computing import Rank
     from .hl_api_simulation import GetKernelStatus
     
    +
    +def sli_func(*args, **kwargs):
    +    raise RuntimeError(f"Called sli_func with\nargs: {args}\nkwargs: {kwargs}")
    +
    +
     try:
         import pandas
     
    @@ -121,7 +123,7 @@ def CreateParameter(parametertype, specs):
                      'std'  : float} # standard deviation of log, default: 1.0
     
         """
    -    return sli_func("CreateParameter", {parametertype: specs})
    +    return nestkernel.llapi_create_parameter({parametertype: specs})
     
     
     class NodeCollectionIterator:
    @@ -145,7 +147,8 @@ def __next__(self):
             if self._increment > len(self._nc) - 1:
                 raise StopIteration
     
    -        val = sli_func("Take_g_a", self._nc._datum, [self._increment, self._increment + 1, 1])
    +        index = self._increment + (self._increment >= 0)
    +        val = nestkernel.llapi_slice(self._nc._datum, index, index, 1)
             self._increment += 1
             return val
     
    @@ -198,20 +201,18 @@ 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:
                 data = []
    -        if isinstance(data, kernel.SLIDatum):
    -            if data.dtype != "nodecollectiontype":
    -                raise TypeError("Need NodeCollection Datum.")
    +        if isinstance(data, nestkernel.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)
    +            nc = nestkernel.llapi_make_nodecollection(data)
                 self._datum = nc._datum
     
         def __iter__(self):
    @@ -224,7 +225,7 @@ def __add__(self, other):
                 else:
                     raise TypeError(f"Cannot add object of type '{type(other).__name__}' to 'NodeCollection'")
     
    -        return sli_func("join", self._datum, other._datum)
    +        return nestkernel.llapi_join_nc(self._datum, other._datum)
     
         def __radd__(self, other):
             return self + other
    @@ -232,26 +233,26 @@ def __radd__(self, other):
         def __getitem__(self, key):
             if isinstance(key, slice):
                 if key.start is None:
    -                start = 0
    +                start = 1
                 else:
    -                start = key.start
    +                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 = key.stop
    +                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
                 if step < 1:
                     raise IndexError("slicing step for NodeCollection must be strictly positive")
     
    -            return sli_func("Take_g_a", self._datum, [start, stop, step])
    +            return nestkernel.llapi_slice(self._datum, start, stop, step)
             elif isinstance(key, (int, numpy.integer)):
    -            if key >= self.__len__() or key + self.__len__() < 0:
    +            if abs(key + (key >= 0)) > self.__len__():
                     raise IndexError("index value outside of the NodeCollection")
    -            return sli_func("Take_g_a", self._datum, [key, key + 1, 1])
    +            return self[key : key + 1 : 1]
             elif isinstance(key, (list, tuple)):
                 if len(key) == 0:
                     return NodeCollection([])
    @@ -267,7 +268,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([])
    @@ -280,12 +281,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 take_array_index(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("InCollection", self._datum, node_id)
    +        return nestkernel.llapi_nc_contains(self._datum, node_id)
     
         def __eq__(self, other):
             if not isinstance(other, NodeCollection):
    @@ -294,7 +295,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):
    @@ -303,13 +304,13 @@ def __neq__(self, other):
             return not self == other
     
         def __len__(self):
    -        return sli_func("size", self._datum)
    +        return nestkernel.llapi_nc_size(self._datum)
     
         def __str__(self):
    -        return sli_func("pcvs", self._datum)
    +        return nestkernel.llapi_to_string(self._datum)
     
         def __repr__(self):
    -        return sli_func("pcvs", self._datum)
    +        return self.__str__()
     
         def get(self, *params, **kwargs):
             """
    @@ -353,8 +354,6 @@ def get(self, *params, **kwargs):
             See Also
             --------
             :py:func:`set`,
    -        :py:func:`GetStatus()<nest.lib.hl_api_info.GetStatus>`,
    -        :py:func:`SetStatus()<nest.lib.hl_api_info.SetStatus>`
     
             Examples
             --------
    @@ -395,11 +394,9 @@ 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 = sli_func("get", 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])
    @@ -409,14 +406,23 @@ def get(self, *params, **kwargs):
                     result = Receptors(self, result)
             else:
                 # Hierarchical addressing
    +            # TODO-PYNEST-NG: Drop this? Not sure anyone ever used it...
                 result = get_parameters_hierarchical_addressing(self, params)
     
    -        if pandas_output:
    +        # 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 output == "pandas":
                 index = self.get("global_id")
    -            if len(params) == 1 and is_literal(params[0]):
    +            if len(params) == 1 and isinstance(params[0], str):
                     # params is a string
                     result = {params[0]: result}
    -            elif len(params) > 1 and is_literal(params[1]):
    +            elif len(params) > 1 and isinstance(params[1], str):
                     # hierarchical, single string
                     result = {params[1]: result}
                 if len(self) == 1:
    @@ -432,8 +438,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`.
     
    @@ -455,8 +459,6 @@ def set(self, params=None, **kwargs):
             See Also
             --------
             :py:func:`get`,
    -        :py:func:`SetStatus()<nest.lib.hl_api_info.SetStatus>`,
    -        :py:func:`GetStatus()<nest.lib.hl_api_info.GetStatus>`
             """
     
             if not self:
    @@ -501,10 +503,10 @@ def set(self, params=None, **kwargs):
                                 temp_dict[key] = vals[i]
                     params = temp_param
     
    -        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__()))
    +        if isinstance(params, dict):
    +            params = [params]
     
    -        sli_func("SetStatus", self._datum, params)
    +        nestkernel.llapi_set_nc_status(self._datum, params)
     
         def tolist(self):
             """
    @@ -524,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}
    @@ -563,7 +565,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))
    @@ -590,7 +592,7 @@ def __getattr__(self, attr):
                 raise NotImplementedError("_ipython_canary_method_should_not_exist_")
     
             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
    @@ -645,16 +647,16 @@ class SynapseCollection:
         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
    @@ -773,7 +775,7 @@ def format_row_(s, t, sm, w, dly):
     
         def __getattr__(self, attr):
             if attr == "distance":
    -            dist = sli_func("Distance", self._datum)
    +            dist = nestkernel.llapi_distance(self._datum)
                 super().__setattr__(attr, dist)
                 return self.distance
     
    @@ -877,26 +879,21 @@ def get(self, keys=None, output=""):
                     return {} if keys is None else ()
     
             if keys is None:
    -            cmd = "GetStatus"
    -        elif is_literal(keys):
    +            result = nestkernel.llapi_get_connection_status(self._datum)
    +        elif isinstance(keys, str):
                 #  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")
     
    -        sps(self._datum)
    -        sr(cmd)
    -        result = spp()
    -
             # Need to restructure the data.
             final_result = restructure_data(result, keys)
     
             if pandas_output:
                 index = self.get("source") if self.__len__() > 1 else (self.get("source"),)
    -            if is_literal(keys):
    +            if isinstance(keys, str):
                     final_result = {keys: final_result}
                 final_result = pandas.DataFrame(final_result, index=index)
             elif output == "json":
    @@ -908,8 +905,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`.
     
    @@ -942,7 +937,7 @@ def set(self, params=None, **kwargs):
                 return
     
             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__()))
    +            raise TypeError(f"status dict must be a dict, or a list of dicts of length {self.__len__()}")
     
             if kwargs and params is None:
                 params = kwargs
    @@ -968,20 +963,13 @@ 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)
     
         def disconnect(self):
             """
             Disconnect the connections in the `SynapseCollection`.
             """
    -        sps(self._datum)
    -        sr("Disconnect_a")
    +        nestkernel.llapi_disconnect_syncoll(self._datum)
     
     
     class CollocatedSynapses:
    @@ -1028,12 +1016,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, rhs):
             if not isinstance(rhs, Mask):
    @@ -1063,9 +1052,10 @@ 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.
     class Parameter:
         """
         Class for parameters
    @@ -1080,30 +1070,28 @@ class Parameter:
         # 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
    -    def _binop(self, op, rhs, params=None):
    -        if isinstance(rhs, (int, float)):
    -            rhs = CreateParameter("constant", {"value": float(rhs)})
    -        if not isinstance(rhs, Parameter):
    -            raise NotImplementedError()
    -
    -        if params is None:
    -            return sli_func(op, self._datum, rhs._datum)
    -        else:
    -            return sli_func(op, self._datum, rhs._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, rhs):
    -        return self._binop("add", rhs)
    +    def __add__(self, other):
    +        return nestkernel.llapi_add_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __radd__(self, lhs):
             return self + lhs
     
    -    def __sub__(self, rhs):
    -        return self._binop("sub", rhs)
    +    def __sub__(self, other):
    +        return nestkernel.llapi_subtract_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __rsub__(self, lhs):
             return self * (-1) + lhs
    @@ -1114,46 +1102,38 @@ def __pos__(self):
         def __neg__(self):
             return self * (-1)
     
    -    def __mul__(self, rhs):
    -        return self._binop("mul", rhs)
    +    def __mul__(self, other):
    +        return nestkernel.llapi_multiply_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __rmul__(self, lhs):
             return self * lhs
     
    -    def __truediv__(self, rhs):
    -        return self._binop("div", rhs)
    +    def __truediv__(self, other):
    +        return nestkernel.llapi_divide_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __rtruediv__(self, lhs):
             return self**-1 * lhs
     
         def __pow__(self, exponent):
    -        try:
    -            expo = float(exponent)
    -        except TypeError:
    -            raise TypeError("unsupported operand type for **: only int and float allow as exponent")
    +        return nestkernel.llapi_pow_parameter(self._datum, float(exponent))
     
    -        return sli_func("pow", self._datum, float(exponent))
    +    def __lt__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 0})
     
    -    def __rpow__(self, lhs):
    -        raise TypeError("unsupported operand type for **: only int and float allow as exponent")
    +    def __le__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 1})
     
    -    def __lt__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 0})
    -
    -    def __le__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 1})
    -
    -    def __eq__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 2})
    +    def __eq__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 2})
     
    -    def __ne__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 3})
    +    def __ne__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 3})
     
    -    def __ge__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 4})
    +    def __ge__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 4})
     
    -    def __gt__(self, rhs):
    -        return self._binop("compare", rhs, {"comparator": 5})
    +    def __gt__(self, other):
    +        return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {"comparator": 5})
     
         def GetValue(self):
             """
    @@ -1180,14 +1160,14 @@ 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)
    +        return nestkernel.llapi_param_is_spatial(self._datum)
     
         def apply(self, spatial_nc, positions=None):
             if positions is None:
    -            return sli_func("Apply", self._datum, spatial_nc)
    +            return nestkernel.llapi_apply_parameter(self._datum, spatial_nc)
             else:
                 if len(spatial_nc) != 1:
                     raise ValueError("The NodeCollection must contain a single node ID only")
    @@ -1198,13 +1178,15 @@ def apply(self, spatial_nc, positions=None):
                         raise TypeError("Each position must be a list or tuple")
                     if len(pos) != len(positions[0]):
                         raise ValueError("All positions must have the same number of dimensions")
    -            return sli_func("Apply", self._datum, {"source": spatial_nc, "targets": positions})
    +            return nestkernel.llapi_apply_parameter(self._datum, {"source": spatial_nc, "targets": positions})
     
     
     class CmBase:
         def __init__(self, node_collection, elements):
             if not isinstance(node_collection, NodeCollection):
                 raise TypeError(f"node_collection must be a NodeCollection, got {type(node_collection)}")
    +        if isinstance(elements, list):
    +            elements = tuple(elements)
             if not isinstance(elements, tuple):
                 raise TypeError(f"elements must be a tuple of dicts, got {type(elements)}")
             self._elements = elements
    @@ -1249,7 +1231,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})
    -        # implicit `return None` to flag elements as added by returning None
     
         def __getitem__(self, key):
             return self._elements[key]
    @@ -1285,17 +1266,20 @@ 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())
    -    elif isinstance(data, kernel.SLILiteral):
    -        # Get name of SLILiteral.
    -        return data.name
    -    elif isinstance(data, (list, tuple)):
    +    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]
    -    elif isinstance(data, dict):
    -        return dict([(key, serialize_data(value)) for key, value in data.items()])
    +    if isinstance(data, dict):
    +        return dict([(serialize_data(key), serialize_data(value)) for key, value in data.items()])
         return data
     
     
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 7958126e0a..514377dc2a 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -25,19 +25,10 @@
     
     # 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
     
    -# 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:
    @@ -50,236 +41,78 @@
     # yet other libraries.
     sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL)
     
    -from . import pynestkernel as kernel  # noqa pylint: disable=no-name-in-module
    +from . import nestkernel_api as nestkernel  # noqa
     
     __all__ = [
    -    "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",
    +    # 'take_array_index',
    +    "KernelAttribute",
     ]
     
     
    -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
    +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.
    +def set_communicator(comm):
    +    """Set global communicator for NEST.
     
         Parameters
         ----------
    -    cmd : str
    -        The SLI command to be executed.
    +    comm: MPI.Comm from mpi4py
    +
         Raises
         ------
    -    kernel.NESTError
    -        SLI errors are bubbled to the Python API as NESTErrors.
    +    ModuleNotFoundError
         """
     
    -    engine.run("{%s} runprotected" % 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(func, *args, **kwargs):
    -    """Convenience function for executing an SLI command func with
    -    arguments args.
    -
    -    This executes the SLI sequence:
    -    ``sli_push(args); sli_run(func); y=sli_pop()``
    -
    -    Parameters
    -    ----------
    -    func : 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:
    -        func = f'{kwargs["namespace"]} using {func} endusing'
    -    elif "litconv" in kwargs:
    -        if kwargs["litconv"]:
    -            slifun = "sli_func_litconv"
    -    elif kwargs:
    -        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(func)  # push command string
    -    sli_run(slifun)  # SLI support code to execute func on args
    -    result = sli_pop()  # return value is an array
    -
    -    if not result:
    -        return None
    -    if len(result) == 1:  # 1 return value is no tuple
    -        return result[0]
    -    return result
    -
    -
    -__debug = False
    +    if "mpi4py" not in sys.modules:
    +        raise ModuleNotFoundError("No module named 'mpi4py'.")
     
    +    # TODO-PYNEST-NG: set_communicator
    +    # engine.set_communicator(comm)
     
    -def get_debug():
    -    """Return the current value of the debug flag of the low-level API.
     
    -    Returns
    -    -------
    -    bool:
    -        current value of the debug flag
    +class KernelAttribute:
         """
    -
    -    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
    +    Descriptor that dispatches attribute access to the nest kernel.
         """
     
    -    global __debug
    -    __debug = dbg
    -
    +    def __init__(self, typehint, description, readonly=False, default=None, localonly=False):
    +        self._readonly = readonly
    +        self._localonly = localonly
    +        self._default = default
     
    -def stack_checker(f):
    -    """Decorator to add stack checks to functions using PyNEST's
    -    low-level API.
    +        readonly = readonly and "**read only**"
    +        localonly = localonly and "**local only**"
     
    -    This decorator works only on functions. See
    -    check_stack() for the generic version for functions and
    -    classes.
    +        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}"
    +        )
     
    -    Parameters
    -    ----------
    -    f : function
    -        Function to decorate
    +    def __set_name__(self, cls, name):
    +        self._name = name
    +        self._full_status = name == "kernel_status"
     
    -    Returns
    -    -------
    -    function:
    -        Decorated function
    +    def __get__(self, instance, cls=None):
    +        if instance is None:
    +            return self
     
    -    Raises
    -    ------
    -    kernel.NESTError
    -    """
    +        status_root = nestkernel.llapi_get_kernel_status()
     
    -    @functools.wraps(f)
    -    def stack_checker_func(*args, **kwargs):
    -        if not get_debug():
    -            return f(*args, **kwargs)
    +        if self._full_status:
    +            return status_root
             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
    +            return status_root[self._name]
     
    -    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))
    -
    -
    -initialized = False
    -
    -
    -def set_communicator(comm):
    -    """Set global communicator for NEST.
    -
    -    Parameters
    -    ----------
    -    comm: MPI.Comm from mpi4py
    -
    -    Raises
    -    ------
    -    kernel.NESTError
    -    """
    -
    -    if "mpi4py" not in sys.modules:
    -        raise kernel.NESTError("set_communicator: mpi4py not loaded.")
    -
    -    engine.set_communicator(comm)
    +    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):
    @@ -298,13 +131,13 @@ def init(argv):
     
         Raises
         ------
    -    kernel.NESTError.PyNESTError
    +    RuntimeError
         """
     
         global initialized
     
         if initialized:
    -        raise kernel.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
    @@ -318,41 +151,35 @@ 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")
     
         path = os.path.dirname(__file__)
    -    initialized = engine.init(nest_argv, path)
    +    nestkernel.init(nest_argv)
    +    initialized = True
     
    -    if initialized:
    -        if not quiet:
    -            engine.run("pywelcome")
    -
    -        # Dirty hack to get tab-completion for models in IPython.
    -        try:
    -            __IPYTHON__
    -        except NameError:
    -            pass
    -        else:
    -            from .lib.hl_api_simulation import GetKernelStatus  # noqa
    -
    -            keyword_lists = (
    -                "connection_rules",
    -                "node_models",
    -                "recording_backends",
    -                "rng_types",
    -                "stimulation_backends",
    -                "synapse_models",
    -            )
    -            for kwl in keyword_lists:
    -                keyword.kwlist += GetKernelStatus(kwl)
    +    if not quiet:
    +        print("NEST initialized successfully!")
     
    +    # Dirty hack to get tab-completion for models in IPython.
    +    try:
    +        __IPYTHON__
    +    except NameError:
    +        pass
         else:
    -        raise kernel.NESTErrors.PyNESTError("Initialization of NEST failed.")
    +        from .lib.hl_api_simulation import GetKernelStatus  # noqa
    +
    +        keyword_lists = (
    +            "connection_rules",
    +            "node_models",
    +            "recording_backends",
    +            "rng_types",
    +            "stimulation_backends",
    +            "synapse_models",
    +        )
    +        for kwl in keyword_lists:
    +            keyword.kwlist += GetKernelStatus(kwl)
     
     
     init(sys.argv)
    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")
    diff --git a/pynest/nest/logic/hl_api_logic.py b/pynest/nest/logic/hl_api_logic.py
    index b9ff2e2c84..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 .. import nestkernel_api as nestkernel
     from ..lib.hl_api_types import CreateParameter
    -from ..ll_api import sli_func
     
     __all__ = [
         "conditional",
    @@ -49,4 +49,4 @@ def conditional(condition, param_if_true, param_if_false):
             param_if_true = CreateParameter("constant", {"value": float(param_if_true)})
         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)
    diff --git a/pynest/nest/math/hl_api_math.py b/pynest/nest/math/hl_api_math.py
    index 35ac07126f..bf32251597 100644
    --- a/pynest/nest/math/hl_api_math.py
    +++ b/pynest/nest/math/hl_api_math.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 sli_func
    +from .. import nestkernel_api as nestkernel
     
     __all__ = [
         "exp",
    @@ -47,7 +47,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):
    @@ -64,7 +64,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):
    @@ -81,7 +81,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):
    @@ -100,7 +100,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):
    @@ -119,7 +119,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):
    @@ -142,4 +142,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/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/nest/random/hl_api_random.py b/pynest/nest/random/hl_api_random.py
    index ba2f2e991c..a9ff4a56f6 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/nest/raster_plot.py b/pynest/nest/raster_plot.py
    index dba13882ca..a054ecf185 100644
    --- a/pynest/nest/raster_plot.py
    +++ b/pynest/nest/raster_plot.py
    @@ -53,6 +53,7 @@ def extract_events(data, time=None, sel=None):
         numpy.array
             List of events as (node_id, t) tuples
         """
    +
         val = []
     
         t_min, t_max = 0, float("inf")
    @@ -88,8 +89,10 @@ def from_data(data, sel=None, **kwargs):
         kwargs:
             Parameters passed to _make_plot
         """
    +
         if len(data) == 0:
    -        raise nest.kernel.NESTError("No data to plot.")
    +        raise ValueError("No data to plot.")
    +
         ts = data[:, 1]
         d = extract_events(data, sel=sel)
         ts1 = d[:, 1]
    @@ -112,6 +115,7 @@ def from_file(fname, **kwargs):
         kwargs:
             Parameters passed to _make_plot
         """
    +
         if isinstance(fname, str):
             fname = [fname]
     
    @@ -128,6 +132,7 @@ def from_file(fname, **kwargs):
     
     def from_file_pandas(fname, **kwargs):
         """Use pandas."""
    +
         data = None
         for f in fname:
             # pylint: disable=possibly-used-before-assignment
    @@ -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.kernel.NESTError
         """
     
         type_id = nest.GetDefaults(detec.get("model"), "type_id")
         if not type_id == "spike_recorder":
    -        raise nest.kernel.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.kernel.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,10 +199,7 @@ def from_device(detec, **kwargs):
             return from_file(fname, **kwargs)
     
         else:
    -        raise nest.kernel.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):
    @@ -235,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()
    @@ -305,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/server/hl_api_server.py b/pynest/nest/server/hl_api_server.py
    index 6a5d92d9aa..5350d2985c 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.
    @@ -437,7 +436,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)
    diff --git a/pynest/nest/spatial/hl_api_spatial.py b/pynest/nest/spatial/hl_api_spatial.py
    index e70e3b8d6a..34c31254c0 100644
    --- a/pynest/nest/spatial/hl_api_spatial.py
    +++ b/pynest/nest/spatial/hl_api_spatial.py
    @@ -21,8 +21,8 @@
     
     import numpy as np
     
    +from .. import nestkernel_api as nestkernel
     from ..lib.hl_api_types import CreateParameter, Parameter
    -from ..ll_api import sli_func
     
     __all__ = [
         "grid",
    @@ -235,13 +235,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/nest/visualization.py b/pynest/nest/visualization.py
    index 2d86486583..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.kernel.NESTError
         """
     
    -    if len(nodes) == 0:
    -        nest.kernel.NESTError("nodes must at least contain one node")
    -
         if not isinstance(nodes, nest.NodeCollection):
    -        raise nest.kernel.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.kernel.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 084c844bec..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.kernel.NESTError
    -        Description
         """
    +
         import matplotlib.pyplot as plt
     
         if len(detec) > 1:
    -        raise nest.kernel.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.kernel.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.kernel.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.kernel.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()
    @@ -206,7 +194,7 @@ def from_device(detec, neurons=None, title=None, grayscale=False, timeunit="ms")
     
             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)
    @@ -220,18 +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.kernel.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")
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    new file mode 100644
    index 0000000000..0248737e66
    --- /dev/null
    +++ b/pynest/nestkernel_api.pxd
    @@ -0,0 +1,220 @@
    +# -*- coding: utf-8 -*-
    +#
    +# nestkernel_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 <http://www.gnu.org/licenses/>.
    +
    +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
    +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 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, DictEntry_]& operator*()
    +            const_iterator operator++()
    +            bint operator==(const const_iterator&)
    +            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&)
    +
    +
    +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()
    +
    +
    +cdef extern from "node_collection.h" namespace "nest":
    +    cppclass NodeCollectionPTR:
    +        NodeCollectionPTR()
    +
    +    NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except +custom_exception_handler
    +
    +
    +cdef extern from "node_collection.h":
    +    cppclass NodeCollectionDatum:
    +        NodeCollectionDatum(const NodeCollectionDatum&)
    +
    +    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 +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()
    +
    +    severity_t get_verbosity()
    +    void set_verbosity( severity_t )
    +
    +    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_spatial( const dictionary& ) 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
    +    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 +custom_exception_handler
    +    void connect(NodeCollectionPTR sources,
    +                 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,
    +                 const dictionary& connectivity,
    +                 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
    +    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
    +
    +    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, 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
    +
    +
    +# 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 +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 +custom_exception_handler
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    new file mode 100644
    index 0000000000..63be9449f2
    --- /dev/null
    +++ b/pynest/nestkernel_api.pyx
    @@ -0,0 +1,970 @@
    +# -*- coding: utf-8 -*-
    +#
    +# nestkernel_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 <http://www.gnu.org/licenses/>.
    +#
    +# distutils: language = c++
    +#
    +
    +# 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
    +
    +# from libc.string cimport memcpy
    +
    +import numbers
    +
    +import nest
    +import numpy
    +
    +# cimport numpy
    +
    +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    +
    +from libc.stdint cimport int64_t, uint64_t
    +from libc.stdlib cimport free, malloc
    +
    +NESTErrors = None
    +
    +def init(args):
    +    global NESTErrors
    +    cdef int argc = len(args)
    +
    +    # 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")
    +
    +    c_argv[argc] = NULL
    +
    +    try:
    +        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
    +        NESTErrors = <object> nest_error_module
    +    finally:
    +        free(c_argv)
    +
    +
    +cdef class NodeCollectionObject:
    +
    +    cdef NodeCollectionPTR thisptr
    +
    +    def __repr__(self):
    +        return "<NodeCollectionObject>"
    +
    +    cdef _set_nc(self, NodeCollectionPTR nc):
    +        self.thisptr = nc
    +
    +
    +cdef class ConnectionObject:
    +
    +    cdef ConnectionID thisobj
    +
    +    def __repr__(self):
    +        return "<ConnectionObject>"
    +
    +    cdef _set_connection_id(self, ConnectionID conn_id):
    +        self.thisobj = conn_id
    +
    +
    +cdef class ParameterObject:
    +
    +    cdef ParameterPTR thisptr
    +
    +    def __repr__(self):
    +        return "<ParameterObject>"
    +
    +    cdef _set_parameter(self, ParameterPTR parameter_ptr):
    +        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()
    +    while it != cvec.end():
    +        tmp.append(any_to_pyobj(deref(it)))
    +        inc(it)
    +    return tmp
    +
    +
    +cdef object dict_vector_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 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):
    +        return any_cast[int](operand)
    +    if is_type[uint](operand):
    +        return any_cast[uint](operand)
    +    if is_type[long](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):
    +        return any_cast[cbool](operand)
    +    if is_type[string](operand):
    +        return string_to_pystr(any_cast[string](operand))
    +    if is_type[vector[int]](operand):
    +        return numpy.array(any_cast[vector[int]](operand))
    +    if is_type[vector[long]](operand):
    +        return numpy.array(any_cast[vector[long]](operand))
    +    if is_type[vector[size_t]](operand):
    +        return numpy.array(any_cast[vector[size_t]](operand))
    +    if is_type[vector[double]](operand):
    +        return numpy.array(any_cast[vector[double]](operand))
    +    if is_type[vector[vector[double]]](operand):
    +        return numpy.array(any_cast[vector[vector[double]]](operand))
    +    if is_type[vector[vector[vector[double]]]](operand):
    +        return numpy.array(any_cast[vector[vector[vector[double]]]](operand))
    +    if is_type[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)
    +        return list(map(lambda x: x.decode("utf-8"), any_cast[vector[string]](operand)))
    +    if is_type[vector[dictionary]](operand):
    +        return dict_vector_to_list(any_cast[vector[dictionary]](operand))
    +    if is_type[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):
    +        obj = NodeCollectionObject()
    +        obj._set_nc(any_cast[NodeCollectionPTR](operand))
    +        return nest.NodeCollection(obj)
    +
    +
    +cdef object dictionary_to_pydict(dictionary cdict):
    +    cdef tmp = {}
    +
    +    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.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.item)))
    +        inc(it)
    +    return tmp
    +
    +
    +cdef is_list_tuple_ndarray_of_float(v):
    +    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 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
    +
    +
    +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):
    +	    # 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
    +        elif type(value) is bool:
    +            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):
    +            cdict[pystr_to_string(key)] = pylist_to_intvec(value)
    +        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 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 len(value) > 0 and type(value[0]) is str:
    +            cdict[pystr_to_string(key)] = pylist_to_stringvec(value)
    +        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)
    +        elif type(value) is nest.NodeCollection:
    +            cdict[pystr_to_string(key)] = (<NodeCollectionObject>(value._datum)).thisptr
    +        elif isinstance(value, nest.Parameter):
    +            cdict[pystr_to_string(key)] = (<ParameterObject>(value._datum)).thisptr
    +        elif type(value) is ParameterObject:
    +            cdict[pystr_to_string(key)] = (<ParameterObject>value).thisptr
    +        else:
    +            typename = type(value)
    +            if type(value) is list:
    +                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
    +
    +
    +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[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
    +    # assignments instead of pushing back
    +    for pydict in 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 llapi_init_nest(argv):
    +    cdef int argc = len(argv)
    +    if argc <= 0:
    +        raise NotImplementedError
    +
    +
    +    # Create c-style argv arguments from sys.argv
    +    cdef int size = argc + 1
    +    cdef char** argv_chars = <char**> malloc((size) * sizeof(char*))
    +    if argv_chars is NULL:
    +        raise NotImplementedError
    +    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 llapi_reset_kernel():
    +    reset_kernel()
    +
    +
    +def llapi_get_verbosity():
    +    return severity_t(get_verbosity())
    +
    +
    +def llapi_set_verbosity(severity_t s):
    +    set_verbosity(s)
    +
    +
    +def llapi_enable_structural_plasticity():
    +    enable_structural_plasticity()
    +
    +
    +def llapi_disable_structural_plasticity():
    +    disable_structural_plasticity()
    +
    +
    +def llapi_create(model, long n):
    +    cdef NodeCollectionPTR gids
    +    gids = create(pystr_to_string(model), n)
    +    obj = NodeCollectionObject()
    +    obj._set_nc(gids)
    +    return nest.NodeCollection(obj)
    +
    +
    +def llapi_create_spatial(object layer_params):
    +    cdef NodeCollectionPTR gids
    +    gids = create_spatial(pydict_to_dictionary(layer_params))
    +    obj = NodeCollectionObject()
    +    obj._set_nc(gids)
    +    return nest.NodeCollection(obj)
    +
    +
    +def llapi_get_position(NodeCollectionObject layer):
    +    cdef vector[vector[double]] result = get_position(layer.thisptr)
    +    if nc_size(layer.thisptr) == 1:
    +        return result[0]
    +    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
    +    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")
    +
    +
    +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")
    +
    +
    +def llapi_distance(object conn):  # PYNEST-NG: should there be a SynapseCollectionObject?
    +    cdef vector[ConnectionID] conn_vec
    +    for c in conn:
    +        conn_vec.push_back((<ConnectionObject>(c)).thisobj)
    +    cdef vector[double] result = distance(conn_vec)
    +    return result
    +
    +# PYNEST-NG:
    +#
    +# inside
    +# or (aka union_mask)
    +# and (aka intersect_mask)
    +# sub (aka minus_mask)
    +
    +def llapi_make_nodecollection(object node_ids):
    +    cdef NodeCollectionPTR gids
    +    # 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)
    +
    +
    +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 {}
    +
    +    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"
    +
    +    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))
    +
    +    connect(pre.thisptr, post.thisptr,
    +            pydict_to_dictionary(conn_params),
    +            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 {}
    +
    +    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"
    +
    +    # 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),
    +            syn_param_vec)
    +
    +
    +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)
    +
    +
    +def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
    +    connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
    +
    +
    +def llapi_connect_sonata(object graph_specs, long hyperslab_size):
    +    connect_sonata(pydict_to_dictionary(graph_specs), hyperslab_size)
    +
    +
    +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)
    +
    +
    +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)
    +
    +
    +def llapi_inside_mask(vector[double] point, MaskObject mask):
    +    return inside(point, mask.thisptr)
    +
    +
    +def llapi_dump_layer_nodes(NodeCollectionObject layer, object filename):
    +    dump_layer_nodes(layer.thisptr, pystr_to_string(filename))
    +
    +
    +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))
    +
    +
    +def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
    +    cdef NodeCollectionPTR nc_ptr
    +    nc_ptr = slice_nc(nc.thisptr, start, stop, step)
    +    obj = NodeCollectionObject()
    +    obj._set_nc(nc_ptr)
    +    return nest.NodeCollection(obj)
    +
    +
    +def llapi_print_nodes():
    +    return string_to_pystr(print_nodes_to_string())
    +
    +
    +def llapi_nc_size(NodeCollectionObject nc):
    +    return nc_size(nc.thisptr)
    +
    +
    +def llapi_to_string(NodeCollectionObject nc):
    +    return string_to_pystr(pprint_to_string(nc.thisptr))
    +
    +
    +def llapi_get_kernel_status():
    +    cdef dictionary cdict = get_kernel_status()
    +    return dictionary_to_pydict(cdict)
    +
    +
    +def llapi_get_defaults(object model_name):
    +    return dictionary_to_pydict(get_model_defaults(pystr_to_string(model_name)))
    +
    +
    +def llapi_set_defaults(object model_name, object params):
    +    set_model_defaults(pystr_to_string(model_name), pydict_to_dictionary(params))
    +
    +
    +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)
    +    set_kernel_status(params_dict)
    +
    +
    +def llapi_simulate(double t):
    +    simulate(t)
    +
    +
    +def llapi_prepare():
    +    prepare()
    +
    +
    +def llapi_run(double t):
    +    run(t)
    +
    +
    +def llapi_cleanup():
    +    cleanup()
    +
    +
    +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)
    +
    +
    +def llapi_get_nc_status(NodeCollectionObject nc, object key=None):
    +    cdef dictionary statuses = get_nc_status(nc.thisptr)
    +    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)])
    +        # 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)}')
    +
    +
    +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)
    +
    +
    +def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs):
    +    cdef NodeCollectionPTR result
    +    # Using operator+() directly
    +    result = lhs.thisptr + rhs.thisptr
    +    obj = NodeCollectionObject()
    +    obj._set_nc(result)
    +    return nest.NodeCollection(obj)
    +
    +
    +def llapi_eq_nc(NodeCollectionObject lhs, NodeCollectionObject rhs):
    +    return equal(lhs.thisptr, rhs.thisptr)
    +
    +
    +def llapi_nc_contains(NodeCollectionObject nc, long node_id):
    +    return contains(nc.thisptr, node_id)
    +
    +
    +def llapi_nc_find(NodeCollectionObject nc, long node_id):
    +    return find(nc.thisptr, node_id)
    +
    +
    +def llapi_get_nc_metadata(NodeCollectionObject nc):
    +    return dictionary_to_pydict(get_metadata(nc.thisptr))
    +
    +
    +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
    +
    +    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=int)
    +        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)
    +
    +
    +def llapi_create_parameter(object specs):
    +    cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
    +    cdef ParameterPTR parameter
    +    parameter = create_parameter(specs_dictionary)
    +    obj = ParameterObject()
    +    obj._set_parameter(parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_get_param_value(ParameterObject parameter):
    +    return get_value(parameter.thisptr)
    +
    +
    +def llapi_param_is_spatial(ParameterObject parameter):
    +    return is_spatial(parameter.thisptr)
    +
    +
    +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))
    +    else:
    +        return tuple(apply(parameter.thisptr, pydict_to_dictionary(pos_or_nc)))
    +
    +
    +def llapi_multiply_parameter(ParameterObject first, ParameterObject second):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = multiply_parameter(first.thisptr, second.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_divide_parameter(ParameterObject first, ParameterObject second):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = divide_parameter(first.thisptr, second.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_add_parameter(ParameterObject first, ParameterObject second):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = add_parameter(first.thisptr, second.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_subtract_parameter(ParameterObject first, ParameterObject second):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = subtract_parameter(first.thisptr, second.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_compare_parameter(ParameterObject first, ParameterObject second, object pydict):
    +    cdef ParameterPTR 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)
    +
    +
    +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)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_min_parameter(ParameterObject parameter, double other_value):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = min_parameter(parameter.thisptr, other_value)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_max_parameter(ParameterObject parameter, double other_value):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = max_parameter(parameter.thisptr, other_value)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +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)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_exp_parameter(ParameterObject parameter):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = exp_parameter(parameter.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_sin_parameter(ParameterObject parameter):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = sin_parameter(parameter.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_cos_parameter(ParameterObject parameter):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = cos_parameter(parameter.thisptr)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_pow_parameter(ParameterObject parameter, double exponent):
    +    cdef ParameterPTR new_parameter
    +    new_parameter = pow_parameter(parameter.thisptr, exponent)
    +    obj = ParameterObject()
    +    obj._set_parameter(new_parameter)
    +    return nest.Parameter(obj)
    +
    +
    +def llapi_dimension_parameter(object list_of_pos_params):
    +    cdef ParameterPTR 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)
    +
    +
    +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)
    +
    +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)
    +
    +    connection_statuses = get_connection_status(conn_deque)
    +
    +    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)
    +
    +    # 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, tuple)):
    +        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')
    +
    +
    +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):
    +        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.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')
    +
    +    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 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
    +    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 )
    diff --git a/pynest/nestkernel_exceptions.h b/pynest/nestkernel_exceptions.h
    new file mode 100644
    index 0000000000..c3312d6e3d
    --- /dev/null
    +++ b/pynest/nestkernel_exceptions.h
    @@ -0,0 +1,122 @@
    +/*
    + *  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 "nest_exception_names.h"
    +
    +static struct PyModuleDef
    +  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_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 );
    +
    +  for ( auto name : nest_exceptions )
    +  {
    +    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 );
    +  }
    +}
    +
    +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_map[ exn.exception_name() ], exn.what() );
    +  }
    +  catch ( const std::bad_alloc& exn )
    +  {
    +    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 ( ... )
    +  {
    +    PyErr_SetString( PyExc_RuntimeError, "Unexpected C++ exception" );
    +  }
    +}
    diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd
    deleted file mode 100644
    index 7a766f4696..0000000000
    --- a/pynest/pynestkernel.pxd
    +++ /dev/null
    @@ -1,196 +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 cpython.ref cimport PyObject
    -from libcpp cimport bool as cbool
    -from libcpp.string cimport string
    -from libcpp.vector cimport vector
    -
    -
    -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 MaskDatum:
    -        MaskDatum(const MaskDatum&)
    -
    -cdef extern from "parameter.h":
    -    cppclass ParameterDatum:
    -        ParameterDatum(const ParameterDatum&)
    -
    -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()
    -
    -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 "interpret.h":
    -    cppclass SLIInterpreter:
    -        SLIInterpreter() except +
    -        int execute(const string&) except +
    -        TokenStack OStack
    -
    -cdef extern from "neststartup.h":
    -    int neststartup(int*, char***, SLIInterpreter&, string) except +
    -    void nestshutdown(int) except +
    -    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*)
    -    Datum* unpackConnectionGeneratorDatum "CYTHON_unpackConnectionGeneratorDatum" (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 c3b673882e..0000000000
    --- a/pynest/pynestkernel.pyx
    +++ /dev/null
    @@ -1,625 +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 cpython cimport array
    -from cpython.object cimport Py_EQ, Py_GE, Py_GT, Py_LE, Py_LT, Py_NE
    -from cpython.ref cimport PyObject
    -from cython.operator cimport dereference as deref
    -from cython.operator cimport preincrement as inc
    -from libc.stdlib cimport free, malloc
    -from libc.string cimport memcpy
    -from libcpp.string cimport string
    -from libcpp.vector cimport vector
    -
    -import nest
    -from nest.lib.hl_api_exceptions import NESTError, NESTErrors, NESTMappedException
    -
    -
    -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:
    -
    -    cdef SLIInterpreter* pEngine
    -
    -    def __cinit__(self):
    -
    -        self.pEngine = NULL
    -
    -    def __dealloc__(self):
    -
    -        nestshutdown( 0 )
    -
    -        del self.pEngine
    -
    -        self.pEngine = NULL
    -
    -    def set_communicator(self, comm):
    -        # extract mpi_comm from mpi4py
    -        if nest_has_mpi4py():
    -            c_set_communicator(comm)
    -        else:
    -            raise NESTError("set_communicator: "
    -                            "NEST not compiled with MPI4PY")
    -
    -    def init(self, argv, modulepath):
    -        if self.pEngine is not NULL:
    -            raise NESTErrors.PyNESTError("engine already initialized")
    -
    -        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
    -
    -            self.pEngine = new SLIInterpreter()
    -            modulepath_bytes = modulepath.encode()
    -
    -            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
    -            argv.extend(str(argvi.decode()) for argvi in argv_chars[:argc])
    -        finally:
    -            free(argv_chars)
    -
    -        return True
    -
    -    def run(self, cmd):
    -
    -        if self.pEngine is NULL:
    -            raise NESTErrors.PyNESTError("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 NESTErrors.PyNESTError("engine uninitialized")
    -        self.pEngine.OStack.push(python_object_to_datum(obj))
    -
    -    def pop(self):
    -
    -        if self.pEngine is NULL:
    -            raise NESTErrors.PyNESTError("engine uninitialized")
    -
    -        if self.pEngine.OStack.empty():
    -            raise NESTErrors.PyNESTError("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
    -
    -    def take_array_index(self, node_collection, array):
    -        if self.pEngine is NULL:
    -            raise NESTErrors.PyNESTError("engine uninitialized")
    -
    -        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 == 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=int)
    -                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 self.pEngine is NULL:
    -            raise NESTErrors.PyNESTError("engine uninitialized")
    -        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_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 len(sources) != len(targets):
    -            raise ValueError('Sources and targets must be arrays of the same length.')
    -        if weights is not None and len(sources) != len(weights):
    -                raise ValueError('weights must be an array of the same length as sources and targets.')
    -        if delays is not None and 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=int)
    -        cdef long* sources_ptr = &sources_mv[0]
    -
    -        cdef long[::1] targets_mv = numpy.ascontiguousarray(targets, dtype=int)
    -        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 key in syn_param_keys:
    -                param_keys_ptr.push_back(key.encode('utf8'))
    -
    -        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):
    -        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 = 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 = 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/nest/neststartup.h b/pynest/pynestkernel_aux.h
    similarity index 53%
    rename from nest/neststartup.h
    rename to pynest/pynestkernel_aux.h
    index 72b790ecd1..dc69ea59a5 100644
    --- a/nest/neststartup.h
    +++ b/pynest/pynestkernel_aux.h
    @@ -1,5 +1,5 @@
     /*
    - *  neststartup.h
    + *  pynestkernel_aux.h
      *
      *  This file is part of NEST.
      *
    @@ -20,52 +20,45 @@
      *
      */
     
    -#ifndef NEST_STARTUP_H
    -#define NEST_STARTUP_H
    +#ifndef PYNESTKERNEL_AUX_H
    +#define PYNESTKERNEL_AUX_H
     
     // Generated includes:
     #include "config.h"
     
    -#if defined( HAVE_LIBNEUROSIM ) && defined( _IS_PYNEST )
    -#include "datum.h"
    +#if defined( HAVE_LIBNEUROSIM )
    +
    +// External includes:
     #include <neurosim/pyneurosim.h>
    +
    +// Includes from conngen:
    +#include "conngenmodule.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;
    +Datum*
    +CYTHON_unpackConnectionGeneratorDatum( PyObject* obj )
    +{
    +  Datum* ret = NULL;
    +  ConnectionGenerator* cg = NULL;
     
    -#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
    +  cg = PNS::unpackConnectionGenerator( obj );
    +  if ( cg != NULL )
    +  {
    +    ret = static_cast< Datum* >( new nest::ConnectionGeneratorDatum( cg ) );
    +  }
     
    -void nestshutdown( int exitcode );
    +  return ret;
    +}
     
    -SLIInterpreter& get_engine();
    +#else // #if defined( HAVE_LIBNEUROSIM )
     
    -#ifdef _IS_PYNEST
    -#include <Python.h>
    -// Call only with GIL
    -void set_communicator( PyObject* );
    +#define CYTHON_isConnectionGenerator( x ) 0
    +#define CYTHON_unpackConnectionGeneratorDatum( x ) NULL
     
    -inline bool
    -nest_has_mpi4py()
    -{
    -#ifdef HAVE_MPI4PY
    -  return true;
    -#else
    -  return false;
    -#endif // HAVE_MPI4PY
    -}
    +#endif // #if defined( HAVE_LIBNEUROSIM )
     
    -#endif // _IS_PYNEST
    +#define CYTHON_DEREF( x ) ( *x )
    +#define CYTHON_ADDR( x ) ( &x )
     
    -#endif // #ifndef NEST_STARTUP_H
    +#endif // #ifndef PYNESTKERNEL_AUX_H
    diff --git a/sli/CMakeLists.txt b/sli/CMakeLists.txt
    deleted file mode 100644
    index 38391d0623..0000000000
    --- a/sli/CMakeLists.txt
    +++ /dev/null
    @@ -1,148 +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
    -    allocator.h allocator.cpp
    -    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 517c803061..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 sli::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 4c75e1dd21..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 <>
    -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory( sizeof( ArrayDatum ), 10240, 1 );
    -template <>
    -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory( sizeof( ProcedureDatum ), 10240, 1 );
    -template <>
    -sli::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 6d06173b16..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 <>
    -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory;
    -template <>
    -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory;
    -template <>
    -sli::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 3a70a98e7b..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"
    -
    -sli::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 b623475568..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 sli::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 b40ec9e1e5..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 <>
    -sli::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 0be68ed544..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 <>
    -sli::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 5878285941..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 78a916c747..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"
    -
    -sli::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 39208d4720..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 sli::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 14cc714511..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 occurred 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 3d2dd7e414..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 <>
    -sli::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 30513fa4ab..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 <>
    -sli::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 b4b73d166a..0000000000
    --- a/sli/interpret.cc
    +++ /dev/null
    @@ -1,1360 +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 occurred 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 occurred while loading module " + m->name() ).c_str() );
    -    message( M_ERROR, "SLIInterpreter", e.what() );
    -    return;
    -  }
    -  catch ( ... )
    -  {
    -    message(
    -      M_ERROR, "SLIInterpreter", ( "An unspecified exception occurred 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, "CppException" );
    -  }
    -}
    -
    -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
    -{
    -  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 );
    -    }
    -  }
    -}
    -
    -void
    -SLIInterpreter::message( std::ostream& out,
    -  const char levelname[],
    -  const char from[],
    -  const char text[],
    -  const char errorname[] ) const
    -{
    -  // Only one thread may write at a time to ensure tidy output.
    -#pragma omp critical( message )
    -  {
    -    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 ) - static_cast< int >( i )
    -            > static_cast< int >( width ) - static_cast< int >( 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( static_cast< int >( width ) - static_cast< int >( pos ) == 0 and text_str.at( i ) == ' ' ) )
    -        {
    -          // Print the actual character.
    -          out << text_str.at( i );
    -        }
    -
    -        ++pos;
    -      }
    -    }
    -    out << std::endl;
    -  } // #pragma omp critical
    -}
    -
    -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 ( static_cast< 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 occurred." );
    -    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 occurred." );
    -    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 occurred." );
    -    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 occurred." );
    -    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 ab75c4ba87..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 <>
    -sli::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory( sizeof( NameDatum ), 10240, 1 );
    -template <>
    -sli::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 e3bc937417..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 <>
    -sli::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory;
    -
    -template <>
    -sli::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 67c6221fc5..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 sli::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 79f70bcba4..0000000000
    --- a/sli/parser.h
    +++ /dev/null
    @@ -1,105 +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 = nullptr;
    -
    -  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& );
    -  ~Parser()
    -  {
    -    delete s;
    -  }
    -
    -  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 1a9f8f5c63..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 occurred!
    -    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 occurred
    -  {
    -    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 occurred!
    -    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 occurred!
    -    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 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_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 occurred!
    -    //           i->raiseerror(systemerror(i));
    -    //         }
    -    //       else
    -    //         {// no error or EAGAIN or ESPIPE occurred
    -    //           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 occurred. 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 occurred!
    -  }
    -
    -  // 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 occurred!
    -    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 4e8263d3bc..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, static_cast< char >( 161 ), static_cast< 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 = static_cast< unsigned char >( 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 a788f7a0a5..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 occurred 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 a3502a0782..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 = static_cast< long >( std::floor( d ) );
    -      if ( n > 0 )
    -      {
    -        ad->reserve( n );
    -        for ( long j = 1; j <= n; ++j )
    -        {
    -          ad->push_back( static_cast< 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 = static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 >= static_cast< 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 < static_cast< size_t >( nrow ); ++r )
    -  {
    -    const double y = ymin + r * dy;
    -    for ( size_t c = 0; c < static_cast< 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 < static_cast< size_t >( nrow ); ++r )
    -  {
    -    const double y = ymin + r * dy;
    -    col.assign( ncol, 0.0 ); // clear contents
    -    for ( size_t c = 0; c < static_cast< 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 bb48a39654..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 occurred. 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( static_cast< long >( realtime ) );
    -  Token utime( static_cast< long >( foo.tms_utime ) );
    -  Token stime( static_cast< long >( foo.tms_stime ) );
    -  Token cutime( static_cast< long >( foo.tms_cutime ) );
    -  Token cstime( static_cast< 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 42c3df623c..0000000000
    --- a/sli/slidata.cc
    +++ /dev/null
    @@ -1,1681 +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 occurred 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 ( static_cast< 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 " << static_cast< 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 ( static_cast< size_t >( id->get() ) < obj->size() ) ) )
    -    {
    -      std::ostringstream sout;
    -      sout << "At position " << static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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 ( static_cast< 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::strtod( obj->c_str(), nullptr ) ) );
    -  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 ( static_cast< 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 );
    -
    -  const size_t p = s1->find( *s2 );
    -
    -  if ( p == s1->npos )
    -  {
    -    i->OStack.pop();
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -  else
    -  {
    -    StringDatum* s3 = new StringDatum();
    -
    -    const 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 35bd6f34bb..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 dictionary 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 dictionary.
    -
    -   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 2d0585450c..0000000000
    --- a/sli/sliexceptions.h
    +++ /dev/null
    @@ -1,481 +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;
    -
    -
    -/**
    - * @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 )
    -    : InterpreterError( "DictError" )
    -  {
    -  }
    -};
    -
    -// -------------------- 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 occurred 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 occurred 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( "UnaccessedDictionaryEntry" )
    -    , 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 62eb4ac353..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( static_cast< 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( static_cast< 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 = static_cast< long >( w->get() );
    -  long height = static_cast< long >( h->get() );
    -  long maxval = static_cast< 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 ( static_cast< 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 9f0346b5f1..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 df6fd38d6c..0000000000
    --- a/sli/slistack.cc
    +++ /dev/null
    @@ -1,499 +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 );
    -  }
    -
    -  const 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;
    -  }
    -
    -  const long k = idk->get();
    -
    -  i->EStack.pop();
    -  i->OStack.pop( 2 );
    -
    -  i->OStack.roll( n, k );
    -}
    -
    -/** @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 a090c701f9..0000000000
    --- a/sli/slistartup.cc
    +++ /dev/null
    @@ -1,465 +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" )
    -  , version_git_info_name( "git_info" )
    -  , version_git_hash_name( "hash" )
    -  , version_git_branch_name( "branch" )
    -  , version_git_remote_name( "remote" )
    -  , 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_boost_name( "have_boost" )
    -  , have_libneurosim_name( "have_libneurosim" )
    -  , have_sionlib_name( "have_sionlib" )
    -  , have_hdf5_name( "have_hdf5" )
    -  , 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_skipped_no_boost_name( "skipped_no_boost" )
    -  , 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 ) );
    -
    -    const std::string myarg = argv[ i ];
    -
    -    if ( myarg == "-d" or myarg == "--debug" )
    -    {
    -      debug_ = true;
    -      verbosity_ = SLIInterpreter::M_ALL; // make the interpreter verbose.
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=ALL" )
    -    {
    -      verbosity_ = SLIInterpreter::M_ALL;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=DEBUG" )
    -    {
    -      verbosity_ = SLIInterpreter::M_DEBUG;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=STATUS" )
    -    {
    -      verbosity_ = SLIInterpreter::M_STATUS;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=INFO" )
    -    {
    -      verbosity_ = SLIInterpreter::M_INFO;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=DEPRECATED" )
    -    {
    -      verbosity_ = SLIInterpreter::M_DEPRECATED;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=WARNING" )
    -    {
    -      verbosity_ = SLIInterpreter::M_WARNING;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=ERROR" )
    -    {
    -      verbosity_ = SLIInterpreter::M_ERROR;
    -      continue;
    -    }
    -    if ( myarg == "--verbosity=FATAL" )
    -    {
    -      verbosity_ = SLIInterpreter::M_FATAL;
    -      continue;
    -    }
    -    if ( myarg == "--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 ) ) );
    -#ifdef NEST_VERSION_GIT
    -  DictionaryDatum rcsinfodict( new Dictionary() );
    -  rcsinfodict->insert( version_git_hash_name, Token( new StringDatum( NEST_VERSION_GIT_HASH ) ) );
    -  rcsinfodict->insert( version_git_branch_name, Token( new StringDatum( NEST_VERSION_GIT_BRANCH ) ) );
    -  rcsinfodict->insert( version_git_remote_name, Token( new StringDatum( NEST_VERSION_GIT_REMOTE ) ) );
    -  statusdict->insert( version_git_info_name, Token( rcsinfodict ) );
    -#endif
    -  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_BOOST
    -  statusdict->insert( have_boost_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_boost_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 HAVE_HDF5
    -  statusdict->insert( have_hdf5_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_hdf5_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_skipped_no_boost_name, Token( new IntegerDatum( EXITCODE_SKIPPED_NO_BOOST ) ) );
    -  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 a9edb14312..0000000000
    --- a/sli/slistartup.h
    +++ /dev/null
    @@ -1,165 +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
    -#define EXITCODE_SKIPPED_NO_BOOST 206
    -
    -
    -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 version_git_info_name;
    -  Name version_git_hash_name;
    -  Name version_git_branch_name;
    -  Name version_git_remote_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_boost_name;
    -  Name have_libneurosim_name;
    -  Name have_sionlib_name;
    -  Name have_hdf5_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_skipped_no_boost_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 191037204a..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 <>
    -sli::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 5d55917993..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 <>
    -sli::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 01c20b9764..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 <>
    -sli::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 8b3a5b6c95..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 <>
    -sli::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 965339c6eb..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 + static_cast< 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 abaeee5193..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 static_cast< size_t >( begin_of_free_storage - p );
    -  }
    -
    -  size_t
    -  capacity() const
    -  {
    -    return static_cast< 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 0c2fa0ed41..0000000000
    --- a/sli/tokenarray.h
    +++ /dev/null
    @@ -1,517 +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 >& );
    -
    -  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
    -
    -  /**
    -   * Insert element at end.
    -   *
    -   * @note Calling with literal value can lead to undefined behavior. The following seems safe:
    -   *
    -   * TokenArray ta;
    -   * const size_t zero = 0;
    -   * ta.push_back( zero );
    -   */
    -  void
    -  push_back( const Token& t )
    -  {
    -    clone();
    -    data->push_back( t );
    -  }
    -
    -  /**
    -   * Insert element at end.
    -   *
    -   * @note Calling with literal value can lead to undefined behavior. The following seems safe:
    -   *
    -   * TokenArray ta;
    -   * const size_t zero = 0;
    -   * ta.push_back( zero );
    -   */
    -  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& );
    -
    -  bool
    -  operator==( const TokenArray& a ) const
    -  {
    -    return *data == *a.data;
    -  }
    -
    -  bool
    -  empty() const
    -  {
    -    return size() == 0;
    -  }
    -
    -  /** 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 5a51707475..0000000000
    --- a/sli/tokenstack.h
    +++ /dev/null
    @@ -1,199 +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( long 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 4a070c3158..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"
    -
    -sli::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 2e0eebc8ad..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 sli::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 8553593ca8..d9c445a873 100644
    --- a/testsuite/CMakeLists.txt
    +++ b/testsuite/CMakeLists.txt
    @@ -18,25 +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( unittests/sli2py_ignore )
     add_subdirectory( regressiontests )
    -add_subdirectory( regressiontests/sli2py_ignore )
    -add_subdirectory( mpi_selftests/fail )
    -add_subdirectory( mpi_selftests/pass )
    -add_subdirectory( mpitests )
    -add_subdirectory( musictests )
     add_subdirectory( cpptests )
     
     install( DIRECTORY ${TESTSUBDIRS}
    @@ -48,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/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/cpptests/CMakeLists.txt b/testsuite/cpptests/CMakeLists.txt
    index dd4c267953..4176d49d65 100644
    --- a/testsuite/cpptests/CMakeLists.txt
    +++ b/testsuite/cpptests/CMakeLists.txt
    @@ -21,16 +21,14 @@ if ( HAVE_BOOST )
       include_directories( ${BOOST_INCLUDE_DIR} )
     
       add_executable( run_all_cpptests run_all.cpp )
    -  add_dependencies( run_all_cpptests sli nest )
     
    -  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
         ${PROJECT_BINARY_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/models
         ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${PROJECT_SOURCE_DIR}/sli
         ${PROJECT_SOURCE_DIR}/thirdparty
         )
     
    diff --git a/testsuite/cpptests/test_parameter.h b/testsuite/cpptests/test_parameter.h
    index 9e565329e7..b75147b62f 100644
    --- a/testsuite/cpptests/test_parameter.h
    +++ b/testsuite/cpptests/test_parameter.h
    @@ -32,7 +32,8 @@
     #include <boost/test/unit_test.hpp>
     
     // Includes from nestkernel
    -#include "nest_datums.h"
    +#include "kernel_manager.h"
    +#include "parameter.h"
     #include "random_generators.h"
     
     BOOST_AUTO_TEST_SUITE( test_parameter )
    @@ -46,12 +47,14 @@ 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;
    -  ParameterDatum uniform_pd = new nest::UniformParameter( d );
    +  nest::KernelManager::create_kernel_manager();
    +
    +  dictionary d;
    +  d[ nest::names::min ] = 0.0;
    +  d[ nest::names::max ] = 1.0;
    +  nest::ParameterPTR 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 );
    +  nest::ParameterPTR redraw_pd( nest::redraw_parameter( uniform_pd, -1.0, -0.5 ) );
     
       // We need to go via a factory to avoid compiler confusion. Two somewhat arbitrary sequences are used for seeding.
       nest::RngPtr rng = nest::RandomGeneratorFactory< std::mt19937_64 >().create( { 1234567890, 23423423 } );
    @@ -66,12 +69,14 @@ 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;
     
    -  DictionaryDatum d = new Dictionary();
    -  ( *d )[ nest::names::max ] = max;
    -  ParameterDatum uniform_int_pd = new nest::UniformIntParameter( d );
    +  dictionary d;
    +  d[ nest::names::max ] = max;
    +  nest::ParameterPTR uniform_int_pd( new nest::UniformIntParameter( d ) );
     
       // We need to go via a factory to avoid compiler confusion
       nest::RandomGeneratorFactory< std::mt19937_64 > rf;
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 8234350003..2226120de0 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -102,7 +102,7 @@ if test "${PYTHON}"; then
           PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
     fi
     
    -if ! python3 -c "import junitparser" >/dev/null 2>&1; then
    +if ! ${PYTHON} -c "import junitparser" >/dev/null 2>&1; then
         echo "Error: Required Python package 'junitparser' not found."
         exit 1
     fi
    @@ -125,32 +125,29 @@ TEST_OUTFILE="${REPORTDIR}/output.log"
     TEST_RETFILE="${REPORTDIR}/output.ret"
     TEST_RUNFILE="${REPORTDIR}/runtest.sh"
     
    -echo "TEST_BASEDIR=${TEST_BASEDIR}"
    -echo "TEST_LOGFILE=${TEST_LOGFILE}"
    -echo "TEST_OUTFILE=${TEST_OUTFILE}"
    -echo "TEST_RETFILE=${TEST_RETFILE}"
    -echo "TEST_RUNFILE=${TEST_RUNFILE}"
    -
    -echo "${TEST_BASEDIR}"
    -ls -la "${TEST_BASEDIR}"
    +get_build_info ()
    +{
    +  ${PYTHON} -c "import nest; print(nest.build_info['$1'])" --quiet
    +}
     
    -NEST="nest_serial"
    -HAVE_MPI="$(sli -c 'statusdict/have_mpi :: =only')"
    -HAVE_OPENMP="$(sli -c 'is_threaded =only')"
    +HAVE_MPI="$(get_build_info have_mpi)"
    +HAVE_OPENMP="$(get_build_info have_threads)"
     
    -if test "${HAVE_MPI}" = "true"; then
    -    MPI_LAUNCHER="$(sli -c 'statusdict/mpiexec :: =only')"
    +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 [[ ! "$(sli -c 'statusdict/mpiexec_preflags :: =only')" =~ "--oversubscribe" ]]; then
    -	    export SLI_MPIEXEC_PREFLAGS="--oversubscribe"
    +	if [[ ! "$(get_build_info mpiexec_preflags)" =~ "--oversubscribe" ]]; then
    +	    MPI_LAUNCHER_PREFLAGS="${MPI_LAUNCHER_PREFLAGS} --oversubscribe"
     	fi
         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.
    -echo "INFO_OS=${INFO_OS}"
     if test "x${INFO_OS}" = "xDarwin"; then
         TEST_CRSTATE="$( defaults read com.apple.CrashReporter DialogType )" || true
         echo "TEST_CRSTATE=$TEST_CRSTATE"
    @@ -168,8 +165,7 @@ echo "  NEST testsuite"
     echo "  Date: $(date -u)"
     echo "  Sysinfo: $(uname -s -r -m)"
     echo
    -NEST_VERSION="$(sli -c "statusdict/version :: =only")"
    -echo "  NEST executable .... $NEST (version $NEST_VERSION)"
    +echo "  NEST version ....... $(get_build_info version)"
     echo "  PREFIX ............. $PREFIX"
     if test -n "${MUSIC}"; then
         MUSIC_VERSION="$("${MUSIC}" --version | head -n1 | cut -d' ' -f2)"
    @@ -182,7 +178,7 @@ if test -n "${PYTHON}"; then
         echo "  Pytest version ..... $PYTEST_VERSION"
         echo "         timeout ..... $TIME_LIMIT s"
     fi
    -if test "${HAVE_MPI}" = "true"; then
    +if test "${HAVE_MPI}" = "True"; then
         echo "  Running MPI tests .. yes"
         echo "         launcher .... $MPI_LAUNCHER"
         echo "         version ..... $MPI_LAUNCHER_VERSION"
    @@ -195,298 +191,11 @@ echo "  PATH ............... `print_paths ${PATH}`"
     echo
     echo "================================================================================"
     
    -HEADLINE="$(nest -v) testsuite log"
    +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}"
     
    -CODES_SKIPPED=\
    -' 200 Skipped,'\
    -' 201 Skipped (MPI required),'\
    -' 202 Skipped (build with-mpi=OFF required),'\
    -' 203 Skipped (Threading required),'\
    -' 204 Skipped (GSL required),'\
    -' 205 Skipped (MUSIC required),'
    -
    -echo
    -echo 'Phase 1: Testing if SLI can execute scripts and report errors'
    -echo '-------------------------------------------------------------'
    -
    -junit_open '01_basetests'
    -
    -CODES_SUCCESS=' 0 Success'
    -CODES_FAILURE=
    -for test_name in test_pass.sli test_goodhandler.sli test_lazyhandler.sli ; do
    -    run_test "selftests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -done
    -
    -CODES_SUCCESS=' 126 Success'
    -CODES_FAILURE=
    -for test_name in test_fail.sli test_stop.sli test_badhandler.sli ; do
    -    run_test "selftests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -done
    -
    -junit_close
    -
    -# At this point, we are sure that
    -#
    -#  * NEST will return 0 after finishing a script
    -#  * NEST will return 126 when a script raises an unhandled error
    -#  * Error handling in stopped contexts works
    -
    -echo
    -echo "Phase 2: Testing SLI's unittest library"
    -echo "---------------------------------------"
    -
    -junit_open '02_selftests'
    -
    -# assert_or_die uses pass_or_die, so pass_or_die should be tested first.
    -
    -CODES_SUCCESS=' 2 Success'
    -CODES_FAILURE=' 126 Failed: error in test script'
    -
    -run_test selftests/test_pass_or_die.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -CODES_SUCCESS=' 1 Success'
    -CODES_FAILURE=\
    -' 2 Failed: error in tested code block,'\
    -' 126 Failed: error in test script,'
    -
    -run_test selftests/test_assert_or_die_b.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -run_test selftests/test_assert_or_die_p.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -CODES_SUCCESS=' 3 Success'
    -CODES_FAILURE=\
    -' 1 Failed: missed assertion,'\
    -' 2 Failed: error in tested code block,'\
    -' 126 Failed: error in test script,'
    -
    -run_test selftests/test_fail_or_die.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -CODES_SUCCESS=' 3 Success'
    -CODES_FAILURE=\
    -' 1 Failed: missed assertion,'\
    -' 2 Failed: error in tested code block,'\
    -' 126 Failed: error in test script,'
    -
    -run_test selftests/test_crash_or_die.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -CODES_SUCCESS=' 3 Success'
    -CODES_FAILURE=\
    -' 1 Failed: missed assertion,'\
    -' 2 Failed: error in tested code block,'\
    -' 126 Failed: error in test script,'
    -
    -run_test selftests/test_failbutnocrash_or_die_crash.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -run_test selftests/test_failbutnocrash_or_die_pass.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -CODES_SUCCESS=' 3 Success'
    -CODES_FAILURE=\
    -' 1 Failed: missed assertion,'\
    -' 2 Failed: error in tested code block,'\
    -' 126 Failed: error in test script,'
    -
    -run_test selftests/test_passorfailbutnocrash_or_die.sli "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -
    -junit_close
    -
    -# At this point, we are sure that
    -#
    -#  * unittest::pass_or_die works
    -#  * unittest::assert_or_die works
    -#  * unittest::fail_or_die works
    -#  * unittest::crash_or_die works
    -
    -# These are the default exit codes and their explanations
    -CODES_SUCCESS=' 0 Success'
    -CODES_FAILURE=\
    -' 1 Failed: missed SLI assertion,'\
    -' 2 Failed: error in tested code block,'\
    -' 3 Failed: tested code block failed to fail,'\
    -' 4 Failed: re-run serial,'\
    -' 10 Failed: unknown error,'\
    -' 20 Failed: inconsistent copyright header(s),'\
    -' 30 Failed: inconsistent Name definition(s)/declaration(s),'\
    -' 31 Failed: unused Name definition(s),'\
    -' 125 Failed: unknown C++ exception,'\
    -' 126 Failed: error in test script,'\
    -' 127 Failed: fatal error,'\
    -' 134 Failed: missed C++ assertion,'\
    -' 139 Failed: segmentation fault,'
    -
    -echo
    -echo "Phase 3: Running NEST unit tests"
    -echo "--------------------------------"
    -
    -junit_open '03_unittests'
    -
    -tests_collect=sli
    -if test "${PYTHON}"; then
    -  tests_collect="$tests_collect py"
    -fi
    -for test_ext in ${tests_collect} ; do
    -    for test_name in $(ls "${TEST_BASEDIR}/unittests/" | grep ".*\.${test_ext}\$") ; do
    -        run_test "unittests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -    for test_name in $(ls "${TEST_BASEDIR}/unittests/sli2py_ignore/" | grep ".*\.${test_ext}\$") ; do
    -        run_test "unittests/sli2py_ignore/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -done
    -
    -junit_close
    -
    -echo
    -echo "Phase 4: Running regression tests"
    -echo "---------------------------------"
    -
    -junit_open '04_regressiontests'
    -
    -for test_ext in ${tests_collect} ; do
    -    for test_name in $(ls "${TEST_BASEDIR}/regressiontests/" | grep ".*\.${test_ext}$") ; do
    -        run_test "regressiontests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -    for test_name in $(ls "${TEST_BASEDIR}/regressiontests/sli2py_ignore/" | grep ".*\.${test_ext}$") ; do
    -        run_test "regressiontests/sli2py_ignore/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -done
    -
    -junit_close
    -
    -echo
    -echo "Phase 5: Running MPI tests"
    -echo "--------------------------"
    -if test "${HAVE_MPI}" = "true"; then
    -    junit_open '05_mpitests'
    -
    -    NEST="nest_indirect"
    -    for test_name in $(ls "${TEST_BASEDIR}/mpi_selftests/pass" | grep '.*\.sli$'); do
    -        run_test "mpi_selftests/pass/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -
    -    # tests meant to fail
    -    SAVE_CODES_SUCCESS=${CODES_SUCCESS}
    -    SAVE_CODES_FAILURE=${CODES_FAILURE}
    -    CODES_SUCCESS=' 1 Success (expected failure)'
    -    CODES_FAILURE=' 0 Failed: Unittest failed to detect error.'
    -    for test_name in $(ls "${TEST_BASEDIR}/mpi_selftests/fail" | grep '.*\.sli$'); do
    -        run_test "mpi_selftests/fail/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -    CODES_SUCCESS=${SAVE_CODES_SUCCESS}
    -    CODES_FAILURE=${SAVE_CODES_FAILURE}
    -
    -    for test_name in $(ls "${TEST_BASEDIR}/mpitests/" | grep '.*\.sli$'); do
    -        run_test "mpitests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
    -    done
    -
    -    junit_close
    -else
    -  echo "  Not running MPI tests because NEST was compiled without support"
    -  echo "  for distributed computing."
    -fi
    -
    -echo
    -echo "Phase 6: Running MUSIC tests"
    -echo "----------------------------"
    -if test "${MUSIC}"; then
    -    junit_open '06_musictests'
    -
    -    # Create a temporary directory with a unique name.
    -    BASEDIR="$PWD"
    -    TMPDIR_MUSIC="$(mktemp -d)"
    -
    -    TESTDIR="${TEST_BASEDIR}/musictests/"
    -
    -    for test_name in $(ls ${TESTDIR} | grep '.*\.music$') ; do
    -        music_file="${TESTDIR}/${test_name}"
    -
    -        # Collect the list of SLI files from the '.music' file.
    -        sli_files=$(grep '\.sli' ${music_file} | sed -e "s#args=#${TESTDIR}#g")
    -        sli_files=$(for f in ${sli_files}; do if test -f ${f}; then echo ${f}; fi; done)
    -        sli_files=${sli_files//$'\n'/ }
    -
    -        # Check if there is an accompanying shell script for the test.
    -        sh_file="${TESTDIR}/$(basename ${music_file} .music).sh"
    -        if test ! -f "${sh_file}"; then sh_file=""; fi
    -
    -        # Check if there is an accompanying input data file
    -        input_file="${TESTDIR}/$(basename ${music_file} .music)0.dat"
    -        if test ! -f "${input_file}"; then input_file=""; fi
    -
    -        # Calculate the total number of processes from the '.music' file.
    -        np=$(($(sed -n 's/np=//p' ${music_file} | paste -sd'+' -)))
    -        test_command="$(sli -c "${np} (${MUSIC}) (${test_name}) mpirun =only")"
    -
    -        proc_txt="processes"
    -        if test $np -eq 1; then proc_txt="process"; fi
    -        echo          "Running test '${test_name}' with $np $proc_txt... " >> "${TEST_LOGFILE}"
    -        printf '%s' "  Running test '${test_name}' with $np $proc_txt... "
    -
    -        # Copy everything to TMPDIR_MUSIC.
    -        # Variables might also be empty. To prevent 'cp' from terminating in such a case,
    -        # the exit code is suppressed.
    -        cp ${music_file} ${sh_file} ${input_file} ${sli_files} ${TMPDIR_MUSIC} 2>/dev/null || true
    -
    -        # Create the runner script in TMPDIR_MUSIC.
    -        cd "${TMPDIR_MUSIC}"
    -        echo "#!/bin/sh" >  runner.sh
    -        echo "set +e" >> runner.sh
    -        echo "NEST_DATA_PATH=\"${TMPDIR_MUSIC}\"" >> runner.sh
    -        echo "${test_command} > ${TEST_OUTFILE} 2>&1" >> runner.sh
    -        if test -n "${sh_file}"; then
    -            chmod 755 "$(basename "${sh_file}")"
    -            echo "./$(basename "${sh_file}")" >> runner.sh
    -        fi
    -        echo "echo \$? > exit_code ; exit 0" >> runner.sh
    -
    -        # Run the script and measure execution time. Copy the output to the logfile.
    -        music_path=$(dirname ${MUSIC})
    -        chmod 755 runner.sh
    -        TIME_ELAPSED=$(PATH=$PATH:${music_path} time_cmd ./runner.sh )
    -        TIME_TOTAL=$(( ${TIME_TOTAL:-0} + ${TIME_ELAPSED} ))
    -        sed -e 's/^/   > /g' ${TEST_OUTFILE} >> "${TEST_LOGFILE}"
    -
    -        # Retrieve the exit code. This is either the one of the mpirun call
    -        # or of the accompanying shell script if present.
    -        exit_code=$(cat exit_code)
    -
    -        # Count the total number of tests, the tests skipped, and the tests with error.
    -        # The values will be stored in the XML report at 'junit_close'.
    -        # Test failures and diagnostic information are also stored in the xml-report file
    -        # with 'unit_write'.
    -        JUNIT_TESTS=$(( ${JUNIT_TESTS:-0} + 1 ))
    -        if test -z $(echo ${test_name} | grep failure); then
    -            if test $exit_code -eq 0; then
    -                echo "Success"
    -            elif test $exit_code -ge 200 && $exit_code -le 215; then
    -                echo "Skipped"
    -                JUNIT_SKIPS=$(( ${JUNIT_SKIPS} + 1 ))
    -            else
    -                echo "Failure"
    -                JUNIT_FAILURES=$(( ${JUNIT_FAILURES} + 1 ))
    -                junit_write "musictests" "${test_name}" "failure" "$(cat "${TEST_OUTFILE}")"
    -            fi
    -        else
    -            if test $exit_code -ne 0; then
    -                echo "Success (expected failure)"
    -            elif test $exit_code -ge 200 && $exit_code -le 215; then
    -                echo "Skipped"
    -                JUNIT_SKIPS=$(( ${JUNIT_SKIPS} + 1 ))
    -            else
    -                echo "Failure (test failed to fail)"
    -                JUNIT_FAILURES=$(( ${JUNIT_FAILURES} + 1 ))
    -                junit_write "musictests" "${test_name}" "failure" "$(cat "${TEST_OUTFILE}")"
    -            fi
    -        fi
    -
    -        cd "${BASEDIR}"
    -    done
    -
    -    junit_close
    -else
    -  echo "  Not running MUSIC tests because NEST was compiled without support"
    -  echo "  for it."
    -fi
    -
     echo
     echo "Phase 7: Running PyNEST tests"
     echo "-----------------------------"
    @@ -499,12 +208,13 @@ 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}"
    +    ${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
     
         # 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
    +    if test "${HAVE_MPI}" = "True" && test "${HAVE_OPENMP}" = "true" ; then
     	XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
     	env
     	set +e
    @@ -514,22 +224,23 @@ if test "${PYTHON}"; then
         fi
     
         # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
    -    if test "${HAVE_MPI}" = "true"; then
    +    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
    -		    PYTEST_ARGS="${PYTEST_ARGS} -m 'not requires_many_cores'"
    +		    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
    -
    -		# We need to use eval here because $() splits run_command in weird ways
    -                run_command="$(sli -c "${numproc} (${PYTHON} -m pytest) (${PYTEST_ARGS}) mpirun =only")"
    -		eval "${run_command}" 2>&1 | tee -a "${TEST_LOGFILE}"
     		set -e
                 done
             fi
    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-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/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_get_nodes.sli b/testsuite/mpitests/test_get_nodes.sli
    deleted file mode 100644
    index ab5f6c7870..0000000000
    --- a/testsuite/mpitests/test_get_nodes.sli
    +++ /dev/null
    @@ -1,168 +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
    -*/
    -
    -skip_if_not_threaded
    -
    -(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_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 a0986ad423..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_5.sli
    +++ /dev/null
    @@ -1,104 +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
    -*/
    -
    -skip_if_not_threaded
    -
    -(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 9e10b99794..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_6.sli
    +++ /dev/null
    @@ -1,117 +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
    -*/
    -
    -skip_if_not_threaded
    -
    -(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 f91116a032..0000000000
    --- a/testsuite/mpitests/test_spatial_distributed_positions.sli
    +++ /dev/null
    @@ -1,53 +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
    -
    -  /layer_spec
    -  << /positions [ 1 4 ] { 0 2 arraystore } Table
    -    /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 ebfdb39874..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_source.sli
    +++ /dev/null
    @@ -1,101 +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/>.
    - *
    - */
    -
    -skip_if_not_threaded
    -
    -(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 2b73dfffbc..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_target.sli
    +++ /dev/null
    @@ -1,101 +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/>.
    - *
    - */
    -
    -skip_if_not_threaded
    -
    -(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/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/pytests/conftest.py b/testsuite/pytests/conftest.py
    index 67d8428ce6..52bec328e2 100644
    --- a/testsuite/pytests/conftest.py
    +++ b/testsuite/pytests/conftest.py
    @@ -78,7 +78,7 @@ def safety_reset():
     
     @pytest.fixture(scope="session")
     def have_threads():
    -    return nest.ll_api.sli_func("is_threaded")
    +    return nest.build_info["have_threads"]
     
     
     @pytest.fixture(scope="session")
    @@ -98,7 +98,7 @@ def skipif_missing_threads(request, have_threads):
     
     @pytest.fixture(scope="session")
     def have_mpi():
    -    return nest.ll_api.sli_func("statusdict/have_mpi ::")
    +    return nest.build_info["have_mpi"]
     
     
     @pytest.fixture(autouse=True)
    @@ -113,7 +113,7 @@ def skipif_missing_mpi(request, have_mpi):
     
     @pytest.fixture(scope="session")
     def have_gsl():
    -    return nest.ll_api.sli_func("statusdict/have_gsl ::")
    +    return nest.build_info["have_gsl"]
     
     
     @pytest.fixture(autouse=True)
    @@ -128,7 +128,7 @@ def skipif_missing_gsl(request, have_gsl):
     
     @pytest.fixture(scope="session")
     def have_hdf5():
    -    return nest.ll_api.sli_func("statusdict/have_hdf5 ::")
    +    return nest.build_info["have_hdf5"]
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/connect_test_base.py b/testsuite/pytests/connect_test_base.py
    index 12124080ba..6c69a3d0e0 100644
    --- a/testsuite/pytests/connect_test_base.py
    +++ b/testsuite/pytests/connect_test_base.py
    @@ -76,14 +76,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):
    @@ -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/mpi/2/test_connect_arrays_mpi.py b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    index d20e8c9311..d5ba57fbf0 100644
    --- a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    +++ b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    @@ -31,11 +31,11 @@
     except ImportError:
         HAVE_MPI4PY = False
     
    -HAVE_MPI = nest.ll_api.sli_func("statusdict/have_mpi ::")
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_MPI = nest.build_info["have_mpi"]
    +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")
     @unittest.skipIf(not HAVE_MPI4PY, "mpi4py is not available")
     class TestConnectArraysMPICase(unittest.TestCase):
         """
    @@ -52,7 +52,14 @@ class TestConnectArraysMPICase(unittest.TestCase):
         if HAVE_MPI4PY:
             comm = MPI.COMM_WORLD.Clone()
     
    -    def assert_connections(self, expected_sources, expected_targets, expected_weights, expected_delays, rule):
    +    def assert_connections(
    +        self,
    +        expected_sources,
    +        expected_targets,
    +        expected_weights,
    +        expected_delays,
    +        rule,
    +    ):
             """Gather connections from all processes and assert against expected connections"""
             conns = nest.GetConnections()
             projections = [[s, t] for s, t in zip(conns.source, conns.target)]
    @@ -129,14 +136,10 @@ def test_connect_arrays_threaded(self):
             sources = np.arange(1, n + 1, dtype=np.uint64)
             targets = self.non_unique
             syn_model = "static_synapse"
    -        weights = np.linspace(0.6, 1.5, len(sources))  # Interval endpoints are carefully selected to get nice values,
    -        delays = np.linspace(0.4, 1.3, len(sources))  # that is, a step of 0.1 between values.
    -
    -        nest.Connect(
    -            sources,
    -            targets,
    -            conn_spec="one_to_one",
    -            syn_spec={"weight": weights, "delay": delays, "synapse_model": syn_model},
    -        )
    +        weights = np.linspace(0.6, 1.5, len(sources))  # Interval endpoints are carefully selected to get
    +        delays = np.linspace(0.4, 1.3, len(sources))  # nice values, i.e., a step of 0.1 between values.
    +
    +        syn_spec = {"weight": weights, "delay": delays, "synapse_model": syn_model}
    +        nest.Connect(sources, targets, conn_spec="one_to_one", syn_spec=syn_spec)
     
             self.assert_connections(sources, targets, weights, delays, "one_to_one")
    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
    diff --git a/testsuite/pytests/mpi/2/test_issue_576.py b/testsuite/pytests/mpi/2/test_issue_576.py
    index 63095a95c3..7aa3bb0408 100644
    --- a/testsuite/pytests/mpi/2/test_issue_576.py
    +++ b/testsuite/pytests/mpi/2/test_issue_576.py
    @@ -24,7 +24,7 @@
     
     import nest
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(nest.NumProcesses() < 2, "Requires >= 2 MPI process")
    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/mpi/4/test_set_status_resolution_nthreads.py b/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py
    similarity index 76%
    rename from testsuite/pytests/mpi/4/test_set_status_resolution_nthreads.py
    rename to testsuite/pytests/mpi/4/test_set_resolution_nthreads.py
    index bdf5a1d6f9..ee0ba9c458 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.
     #
    @@ -22,7 +22,7 @@
     import nest
     import pytest
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +pytestmark = pytest.mark.skipif_missing_threads
     
     
     @pytest.fixture
    @@ -30,8 +30,7 @@ def reset():
         nest.ResetKernel()
     
     
    -@pytest.mark.skipif(not HAVE_OPENMP, reason="NEST was compiled without multi-threading")
    -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
    @@ -41,8 +40,7 @@ def testSetStatus_resolution_before_nthreads(reset):
         assert nest.local_num_threads == 4
     
     
    -@pytest.mark.skipif(not HAVE_OPENMP, reason="NEST was compiled without multi-threading")
    -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/sli2py_connect/test_common_properties_setting.py b/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    index 2d1f2ee687..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.kernel.NESTErrors.DictError):
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
             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_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_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..254024fa8d 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,11 @@ 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):
    +
    +    # 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,
                 supported_nrn,
    @@ -160,7 +164,11 @@ 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):
    +
    +    # 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,
                 unsupported_nrn,
    @@ -176,7 +184,11 @@ def test_diffusion_connection_set_weight_and_delay_disallowed(syn_param):
         """
     
         supported_nrn = nest.Create("siegert_neuron")
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +
    +    # 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,
                 supported_nrn,
    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_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)
    diff --git a/testsuite/pytests/sli2py_neurons/test_model_node_init.py b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    index 6f7c1df880..b9083cc7e8 100644
    --- a/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    +++ b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    @@ -30,6 +30,7 @@
     """
     
     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 = voltmeter.events["V_m"]
     
         return (volts, nc.get())
     
    diff --git a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    index c8f8406eea..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
     
     
    @@ -42,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)
     
     
    @@ -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_neurons/test_neurons_handle_multiplicity.py b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    index 0ed52cac1f..042c68490e 100644
    --- a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    +++ b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    @@ -100,10 +100,8 @@ def reset():
     def test_spike_multiplicity_parrot_neuron():
         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")
     
    @@ -112,7 +110,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)
    @@ -142,9 +140,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",
    @@ -159,16 +157,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_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_other/test_multiple_random_source_stepping.py b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    index f13fa9eb47..0aa263954c 100644
    --- a/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    +++ b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    @@ -42,8 +42,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 b1834d2252..b6a6eeea64 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")
    @@ -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_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))
    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_recording/test_compare_delta.py b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    index 7af5f8f5ec..dd8c1a65eb 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
    @@ -49,9 +50,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})
     
    @@ -61,7 +61,8 @@ def test_simulation_completes():
     
         nest.Simulate(200.0)
     
    -    spike_recs = spike_recorder.get("events", ["senders", "times"])
    +    times = spike_recorder.events["times"]
    +    senders = 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..c4216c172d 100644
    --- a/testsuite/pytests/sli2py_recording/test_corr_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_det.py
    @@ -21,15 +21,20 @@
     
     
     """
    -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
    +import numpy.testing as nptest
     import pytest
     
     
    @@ -81,7 +86,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
     
    @@ -128,19 +133,16 @@ 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")
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert (n_events == spikes_times_size).all()
     
    -    detector_histogram = detector.get("histogram")
    -    assert (detector_histogram == 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():
    @@ -148,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])
     
     
    @@ -159,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 = np.any(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(detector.get("n_events") == 0)
    -        assert np.all(detector.get("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 83%
    rename from testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    rename to testsuite/pytests/sli2py_recording/test_corr_matrix_det.py
    index e8639efe60..50fdde577c 100644
    --- a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_matrix_det.py
    @@ -21,15 +21,20 @@
     
     
     """
    -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
     import numpy as np
    +import numpy.testing as nptest
     import pytest
     
     
    @@ -100,7 +105,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
     
     
    @@ -136,25 +141,23 @@ 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
         nest.SetDefaults("correlomatrix_detector", {"delta_tau": 0.5, "tau_max": 2.0, "N_channels": 2})
     
         detector = prepare_correlomatrix_detector(spikes_times)
    -
    -    n_events = detector.get("n_events")
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert (n_events == spikes_times_size).all()
     
    -    covariance = detector.get("covariance")[0][1]
    -    assert (covariance == 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():
    @@ -166,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 = 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)
    -        assert np.all(detector.get("n_events") == 0)
    -        assert np.all(detector.get("covariance")[0][0] == 0.0)
    +        nptest.assert_equal(detector.covariance[0][0], 0.0)
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py b/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    index b0526f932e..53f1305b9e 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 = mm.events["V_m"]
    +    senders = 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_multimeter_offset.py b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    index e9818b19c9..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)
    @@ -101,7 +97,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
     
     
    @@ -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_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():
    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_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_1140.py b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    index e7aa9722fa..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)
     
    @@ -59,7 +60,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_regressions/test_issue_1242.py b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    index 483f6466fc..fecaa36e09 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    @@ -39,5 +39,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 d887295e8f..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)
     
    @@ -49,5 +49,5 @@ def test_resolution_rounding_invalid():
     
         target_resolution = 0.1002
     
    -    with pytest.raises(nest.kernel.NESTError):
    -        nest.set(resolution=target_resolution, tics_per_ms=1000.0)
    +    with pytest.raises(nest.NESTError):
    +        nest.set(resolution=target_resolution, tics_per_ms=1000)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2282.py b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    index 9a951b1277..a9bf37eb62 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    @@ -47,14 +47,14 @@ 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)
     
         nest.Simulate(2.0)
     
    -    recording = mm.events.get("I")
    +    recording = mm.events["I"]
     
         return recording
     
    @@ -73,5 +73,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 af2b798dc2..8479ce04d1 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    @@ -54,7 +54,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])
     
     
    @@ -68,5 +68,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 8fec1a7e6a..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():
    @@ -48,7 +48,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)
     
     
    @@ -62,7 +62,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})
     
     
    @@ -76,6 +76,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_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/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_regressions/test_issue_351.py b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    index abe416a983..11abf08396 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_351.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    @@ -68,5 +68,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 a06fda3f8a..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})
    @@ -60,7 +60,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)
    @@ -107,14 +107,14 @@ 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})
     
         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 a8d9080cb3..d1f6f75c33 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_410.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_410.py
    @@ -40,10 +40,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_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_issue_545.py b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    index 0fa7aea74b..42e4e76181 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.kernel.NESTErrors.BadProperty):
    +    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.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             n.set({"tau_m": -10})
     
    +
    +def test_set_bad_property_on_synapse_raises():
         # test synapse
    -    with pytest.raises(nest.kernel.NESTErrors.BadDelay):
    +    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/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})
    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)
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_459.py b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    index ae75759f3d..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
     
     
    @@ -41,17 +42,17 @@ 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
         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 = nest.GetStatus(nrn)[0]
    +    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_80_175_179.py b/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    index 35e0e66a55..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.get("events", "times")
    -    vms_reference = vms.get("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.get("events", "times")
    -    vms_recs = vms.get("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_regressions/test_ticket_903.py b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    index bbee43a3c6..34486e98aa 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    @@ -42,7 +42,7 @@ 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.binomtest(sum(np.array(delays) == 2.0), indegree).pvalue > significance
    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..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):
    @@ -38,10 +37,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():
    @@ -50,9 +49,9 @@ 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", {"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")
    @@ -81,18 +80,11 @@ def test_different_connections():
         assert nest.num_connections == 5
     
         nest.Simulate(10.0)
    -    spike_recs = spike_recorder.get("events", ["times"])
    -    assert np.all(
    -        spike_recs["times"]
    -        == pytest.approx(
    -            [
    -                3.0,
    -                4.0,
    -                5.0,
    -            ]
    -        )
    -    )
     
    -    synapses = nest.GetConnections(source=pn1, target=pn2).get("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_regressions/test_ticket_949.py b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    index 5636271961..2cc323c7d4 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    @@ -29,9 +29,9 @@
     
     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")
    -    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_regressions/test_ticket_959.py b/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    index 17ba1dea1c..fd549b7081 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}
     
    @@ -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_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")
    diff --git a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    index 14da9eb4c2..b7563b2f52 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    @@ -37,40 +37,37 @@ 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()
     
         # 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):
    @@ -78,23 +75,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 66040d48f4..bea3c960c8 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.NESTErrors.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 13b839cad2..bb9eab1b10 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -62,7 +62,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)
     
     
    @@ -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)
    @@ -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)
    @@ -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
    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)
    diff --git a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    index d92ae1d1b3..e853187026 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    @@ -39,9 +39,10 @@ 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.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]})
     
     
    @@ -49,9 +50,11 @@ 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.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)
     
     
    @@ -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,
    @@ -80,8 +84,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)
    @@ -94,9 +98,11 @@ 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.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)
     
     
    @@ -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],
    @@ -112,8 +119,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)
    @@ -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,9 +162,9 @@ 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 +189,9 @@ 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)
    @@ -205,24 +213,26 @@ 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):
         """
         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(
    @@ -247,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)
     
    @@ -267,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
     
    @@ -277,7 +290,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_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/sli2py_synapses/test_cont_delay_synapse.py b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    index 8d5bb52413..e6d5d5d36b 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"})
    @@ -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
     
     
    @@ -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_beta_gap_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    index 9f0911da1f..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
    @@ -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
    @@ -127,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 49889ba8a1..800b82518a 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)
    @@ -187,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"]
    -    assert sr_events_times == [2]
    +    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/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index 3960a8552c..372ce636ba 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
    @@ -46,29 +47,23 @@
     @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):
         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",
    +        "eprop_synapse_hpc",
    +        "eprop_synapse_bsshslm_2020_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
     
    @@ -77,9 +72,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 +87,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 +104,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})
    @@ -137,32 +132,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/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_aeif_cond_alpha_multisynapse.py b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    index 7aeea2c701..6629d04ff8 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, report_dir):
     
             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].get("events")["V_m"] - V_m_steadystate
    +            summed_V_m += singlesynapse_neuron_vm[i].events["V_m"] - 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, report_dir):
     
                 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.get("events")["times"], error, label="error")
     
                 fig.savefig(report_dir / "test_aeif_cond_alpha_multisynapse.png")
     
    @@ -247,7 +247,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_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_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py
    index 845dc3414e..ef14306c23 100644
    --- a/testsuite/pytests/test_aeif_lsodar.py
    +++ b/testsuite/pytests/test_aeif_lsodar.py
    @@ -52,7 +52,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.build_info["have_gsl"]
     path = os.path.abspath(os.path.dirname(__file__))
     
     # --------------------------------------------------------------------------- #
    @@ -229,16 +229,18 @@ def compute_difference(self, multimeters, params, reference, recordables):
             V_lim = (params["V_th"] + params["V_peak"]) / 2.0
     
             for model, mm in iter(multimeters.items()):
    -            dmm = nest.GetStatus(mm, "events")[0]
    +            dmm = mm.events
                 for record in recordables:
    +                reference_record = np.array(reference[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]
    +                rds = np.abs(reference_record - dmm_record)
    +                nonzero = np.where(~np.isclose(reference_record, 0.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.0:
    -                    spiking = dmm[record] > V_lim
    +                    spiking = dmm_record > V_lim
                         rds = rds[~spiking]
                     rel_diff[model][record] = np.average(rds)
             return rel_diff
    @@ -271,13 +273,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, ["V_m", "w"])
    @@ -311,13 +314,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.0 if key == "psc" else 1.0
                 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.0 if key == "psc" else 1.0
                 nest.Connect(pn, refs[syn_type], syn_spec={"weight": weight})
    @@ -326,7 +329,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]}, aeif_DT0, ref_data, recordables[syn_type])
                 self.assert_pass_tolerance(rel_diff, di_tolerances_iaf)
    @@ -349,11 +352,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)
    @@ -361,7 +364,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, ref_data, ["V_m"])
                 self.assert_pass_tolerance(rel_diff, di_tolerances_iaf)
     
    diff --git a/testsuite/pytests/test_astrocyte.py b/testsuite/pytests/test_astrocyte.py
    index db73bd6a27..a2ef80a37a 100644
    --- a/testsuite/pytests/test_astrocyte.py
    +++ b/testsuite/pytests/test_astrocyte.py
    @@ -61,9 +61,9 @@ 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)
    diff --git a/testsuite/pytests/test_bernoulli_synapse.py b/testsuite/pytests/test_bernoulli_synapse.py
    index ab1c8f60cc..f6960d246d 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")
    @@ -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
    @@ -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_changing_tic_base.py b/testsuite/pytests/test_changing_tic_base.py
    index 6caa62b353..d60cbdb570 100644
    --- a/testsuite/pytests/test_changing_tic_base.py
    +++ b/testsuite/pytests/test_changing_tic_base.py
    @@ -25,7 +25,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class TestChangingTicBase(unittest.TestCase):
         eps = 1e-7  # Tolerance value
     
    @@ -61,12 +60,12 @@ def test_models(self):
                     continue
                 try:
                     reference[model] = nest.GetDefaults(model)
    -            except nest.kernel.NESTError:
    +            except nest.NESTError:
                     # If we can't get the defaults, we ignore the model.
                     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
    @@ -76,10 +75,12 @@ def test_models(self):
             for model in reference.keys():
                 model_reference = reference[model]
                 model_defaults = nest.GetDefaults(model)
    +
                 # Remove entries where the item contains more than one value, as this causes issues when comparing.
                 array_keys = [
                     key for key, value in model_defaults.items() if isinstance(value, (list, tuple, dict, np.ndarray))
                 ]
    +
                 for key in array_keys:
                     del model_defaults[key]
                     del model_reference[key]
    @@ -91,6 +92,7 @@ def test_models(self):
     
                     # value may not be a number, so we test for equality first.
                     # If it's not equal to the reference value, we assume it is a number.
    +
                     if value != model_reference[key] and abs(value - model_reference[key]) > self.eps:
                         print(value - model_reference[key])
                         keydiff.append([key, model_reference[key], value])
    @@ -105,9 +107,9 @@ def test_models(self):
     
         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.kernel.NESTError, msg=f'after calling "{after_call}"'):
    +        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_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 89967e143a..887b3001e6 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -28,10 +28,9 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.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"""
    @@ -39,7 +38,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",
    @@ -61,13 +60,13 @@ def test_ConnectNeuronsWithClopathSynapse(self):
                 n = nest.Create(nm, 2)
     
                 # try to connect with clopath_rule
    -            with self.assertRaises(nest.kernel.NESTError):
    +            with self.assertRaises(nest.NESTError):
                     nest.Connect(n, n, {"rule": "all_to_all"}, {"synapse_model": "clopath_synapse"})
     
         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
    @@ -170,7 +169,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])
     
    @@ -189,7 +188,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
    @@ -217,9 +216,9 @@ def test_SynapseFunctionWithAeifModel(self):
             nest.Simulate(20.0)
     
             # 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 1f9058b7b5..0b8948dfc9 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
    @@ -233,8 +233,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.0})
    +    n_neat = nest.Create("cm_default", params={"V_th": 100.0})
     
         n_neat.V_th = 100.0
         n_neat.compartments = [
    @@ -245,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
    @@ -351,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
    @@ -487,7 +486,6 @@ def create_2tdend_4comp(dt=0.1):
         return (n_neat, m_neat), (aa, bb), ss
     
     
    -@nest.ll_api.check_stack
     class CompartmentsTestCase(unittest.TestCase):
         """tests for compartmental NEST models"""
     
    @@ -502,17 +500,14 @@ 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
     
             # run the NEST model for 2 timesteps (input arrives only on second step)
             nest.Simulate(3.0 * dt)
    -        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)])
     
             # construct numpy solution
    @@ -543,18 +538,15 @@ 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
     
             # run the NEST model for 1 timestep
             nest.Simulate(2.0 * 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)])
    +        events_neat = m_neat.events
    +        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)
    @@ -574,15 +566,12 @@ 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", {"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)
    -            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.0 * dt)) - 1]
    @@ -613,15 +602,12 @@ 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", {"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)
    -        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
    @@ -660,16 +646,13 @@ 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)
    -        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
    @@ -697,41 +680,41 @@ def test_spike_transmission(self, dt=0.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"}})
    +        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)
     
    -        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):
    -        sg_01 = nest.Create("spike_generator", 1, {"spike_times": [10.0]})
    -        sg_02 = nest.Create("spike_generator", 1, {"spike_times": [15.0]})
    +    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", 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")
    @@ -742,10 +725,9 @@ def test_setstatus_combinations(self, dt=0.1):
             nest.Connect(sg_02, n_neat_0, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 1})
     
             # set status with single call
    -        n_neat_1 = nest.Create("cm_default")
    -        nest.SetStatus(
    -            n_neat_1,
    -            {
    +        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"}],
                 },
    @@ -754,20 +736,20 @@ def test_setstatus_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)
     
    -        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}, {"parent_idx": 0, "params": DP[0]}]
             n_neat.receptors = [{"comp_idx": 1, "receptor_type": "AMPA"}, {"comp_idx": 0, "receptor_type": "GABA"}]
    @@ -808,22 +790,15 @@ def test_error_handling(self):
             # test double root
             n_neat = nest.Create("cm_default")
     
    -        with self.assertRaisesRegex(
    -            nest.kernel.NESTError,
    -            "UnknownCompartment in SLI function SetStatus_id: "
    -            "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
             n_neat = nest.Create("cm_default")
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError,
    -            "UnknownCompartment in SLI function SetStatus_id: "
    -            "Compartment 15 does not exist in tree, "
    -            "but was specified as a parent.",
    +            nest.NESTError,
    +            "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}]
     
    @@ -831,33 +806,26 @@ def test_error_handling(self):
             n_neat = nest.Create("cm_default")
             n_neat.compartments = {"parent_idx": -1, "params": SP}
     
    -        with self.assertRaisesRegex(
    -            nest.kernel.NESTError,
    -            "UnknownCompartment in SLI function SetStatus_id: 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
             n_neat = nest.Create("cm_default")
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError,
    -            "UnknownCompartment in SLI function Simulate_d: "
    -            "Compartment 0 does not exist in tree, "
    -            "meaning that no compartments have been added.",
    +            nest.NESTError,
    +            "Compartment 0 does not exist in tree, meaning that no compartments have been added.",
             ):
                 nest.Simulate(10.0)
     
             # test connection port out of range for current input
             n_neat = nest.Create("cm_default")
             n_neat.compartments = [{"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: "
    -            r"Port with id 3 does not exist. Valid current "
    -            r"receptor ports for cm_default are in \[0, 2\[.",
    +            nest.NESTError,
    +            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})
     
    @@ -869,26 +837,22 @@ 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.kernel.NESTError,
    -            r"UnknownPort in SLI function Connect_g_g_D_D: "
    -            r"Port with id 3 does not exist. Valid spike "
    -            r"receptor ports for cm_default are in \[0, 3\[.",
    +            nest.NESTError,
    +            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})
     
             # 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.kernel.NESTError,
    -            "IllegalConnection in SLI function Connect_g_g_D_D: "
    -            "Creation of connection is not possible because:\n"
    -            "Cannot connect with unknown recordable v_comp1",
    +            nest.NESTError,
    +            "Creation of connection is not possible because:\nCannot connect with unknown recordable v_comp1",
             ):
                 nest.Connect(mm, n_neat)
     
    @@ -897,15 +861,15 @@ def test_error_handling(self):
             n_neat.compartments = {"parent_idx": -1, "params": SP}
             n_neat.receptors = {"comp_idx": 0, "receptor_type": "GABA"}
     
    -        with self.assertRaisesRegex(nest.kernel.NESTError, "'compartments' is already defined for this model"):
    +        with self.assertRaisesRegex(nest.NESTError, "'compartments' is already defined for this model"):
                 n_neat.compartments = {"parent_idx": 0, "params": SP}
     
    -        with self.assertRaisesRegex(nest.kernel.NESTError, "'receptors' is already defined for this model"):
    +        with self.assertRaisesRegex(nest.NESTError, "'receptors' is already defined for this model"):
                 n_neat.receptors = {"comp_idx": 0, "receptor_type": "GABA"}
     
             n_neat = nest.Create("cm_default")
             n_neat.compartments = {"parent_idx": -1, "params": SP}
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 n_neat.compartments = {"parent_idx": 0, "params": SP}
     
         def test_continuerun(self, dt=0.1):
    @@ -915,55 +879,53 @@ def test_continuerun(self, dt=0.1):
             nest.ResetKernel()
             nest.SetKernelStatus(dict(resolution=dt))
     
    -        n_neat = nest.Create("cm_default")
    -        nest.SetStatus(
    -            n_neat,
    -            {
    +        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.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)
     
    -        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,
    -            {
    +        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.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)
     
             # test the case where we continue a run without resetting the neural state
             nest.Simulate(12.0)
             nest.Simulate(88.0)
     
    -        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])
    @@ -1103,19 +1065,12 @@ def test_unused_dict_entries(self):
             # test unused compartment param
             cm = nest.Create("cm_default")
     
    -        with self.assertRaisesRegex(
    -            nest.kernel.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.kernel.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},
                 ]
    @@ -1126,9 +1081,7 @@ def test_unused_dict_entries(self):
                 {"parent_idx": -1, "params": sp_real},
             ]
     
    -        with self.assertRaisesRegex(
    -            nest.kernel.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},
                 ]
    @@ -1139,9 +1092,7 @@ def test_unused_dict_entries(self):
                 {"parent_idx": -1, "params": sp_real},
             ]
     
    -        with self.assertRaisesRegex(
    -            nest.kernel.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},
                 ]
    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_connect_all_to_all.py b/testsuite/pytests/test_connect_all_to_all.py
    index 157f54942d..ab164c4906 100644
    --- a/testsuite/pytests/test_connect_all_to_all.py
    +++ b/testsuite/pytests/test_connect_all_to_all.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 TestAllToAll(connect_test_base.ConnectTestBase):
         # specify connection pattern
         rule = "all_to_all"
    @@ -126,7 +125,10 @@ def testRPortDistribution(self):
                 M = M.flatten()
                 unique, counts = np.unique(M, return_counts=True)
                 frequencies = np.asarray((unique, counts)).T
    -            self.assertTrue(np.array_equal(frequencies[:, 0], np.arange(1, n_rport + 1)), "Missing or invalid rports")
    +            self.assertTrue(
    +                np.array_equal(frequencies[:, 0], np.arange(1, n_rport + 1)),
    +                "Missing or invalid rports",
    +            )
                 chi, p = scipy.stats.chisquare(frequencies[:, 1])
                 self.assertGreater(p, self.pval)
     
    diff --git a/testsuite/pytests/test_connect_array_fixed_indegree.py b/testsuite/pytests/test_connect_array_fixed_indegree.py
    index 80313e7793..2b7942c419 100644
    --- a/testsuite/pytests/test_connect_array_fixed_indegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_indegree.py
    @@ -29,7 +29,6 @@
     import nest
     
     
    -@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 f867b4e161..bbaccc576d 100644
    --- a/testsuite/pytests/test_connect_array_fixed_outdegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_outdegree.py
    @@ -28,11 +28,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")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class ConnectArrayFixedOutdegreeTestCase(unittest.TestCase):
         """Tests of connections with fixed outdegree and parameter arrays"""
     
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index 23833ce351..0a8c30cd4b 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -24,9 +24,9 @@
     import nest
     import numpy as np
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
     class TestConnectArrays(unittest.TestCase):
    @@ -120,7 +120,7 @@ def test_connect_arrays_different_weights_delays(self):
             np.testing.assert_array_almost_equal(conns.weight, weights)
             np.testing.assert_array_almost_equal(conns.delay, delays)
     
    -    @unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +    @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
         def test_connect_arrays_threaded(self):
             """Connecting NumPy arrays, threaded"""
             nest.local_num_threads = 2
    @@ -239,19 +239,15 @@ def test_connect_arrays_additional_synspec_params(self):
             alpha = 0.1 * np.ones(len(sources))
             tau = 20.0 * np.ones(len(sources))
     
    -        nest.Connect(
    -            sources,
    -            targets,
    -            conn_spec="one_to_one",
    -            syn_spec={
    -                "weight": weights,
    -                "delay": delays,
    -                "synapse_model": syn_model,
    -                "receptor_type": receptor_type,
    -                "alpha": alpha,
    -                "tau": tau,
    -            },
    -        )
    +        syn_spec = {
    +            "weight": weights,
    +            "delay": delays,
    +            "synapse_model": syn_model,
    +            "receptor_type": receptor_type,
    +            "alpha": alpha,
    +            "tau": tau,
    +        }
    +        nest.Connect(sources, targets, conn_spec="one_to_one", syn_spec=syn_spec)
     
             conns = nest.GetConnections()
     
    @@ -275,12 +271,8 @@ def test_connect_arrays_syn_lbl(self):
             syn_model = "static_synapse_lbl"
             syn_label = 2
     
    -        nest.Connect(
    -            sources,
    -            targets,
    -            conn_spec="one_to_one",
    -            syn_spec={"weight": weights, "delay": delays, "synapse_model": syn_model, "synapse_label": syn_label},
    -        )
    +        syn_spec = {"weight": weights, "delay": delays, "synapse_model": syn_model, "synapse_label": syn_label}
    +        nest.Connect(sources, targets, conn_spec="one_to_one", syn_spec=syn_spec)
     
             conns = nest.GetConnections()
     
    @@ -302,18 +294,14 @@ 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):
    -            nest.Connect(
    -                sources,
    -                targets,
    -                conn_spec="one_to_one",
    -                syn_spec={
    -                    "weight": weights,
    -                    "delay": delays,
    -                    "synapse_model": syn_model,
    -                    "receptor_type": receptor_type,
    -                },
    -            )
    +        with self.assertRaises(nest.NESTError):
    +            syn_spec = {
    +                "weight": weights,
    +                "delay": delays,
    +                "synapse_model": syn_model,
    +                "receptor_type": receptor_type,
    +            }
    +            nest.Connect(sources, targets, conn_spec="one_to_one", syn_spec=syn_spec)
     
         def test_connect_arrays_wrong_dtype(self):
             """Raises exception when connecting NumPy arrays with wrong dtype"""
    @@ -323,9 +311,15 @@ def test_connect_arrays_wrong_dtype(self):
             targets = np.array(self.non_unique, dtype=np.double)
             weights = np.ones(n)
             delays = np.ones(n)
    +        syn_model = "static_synapse"
     
    -        with self.assertRaises(nest.kernel.NESTErrors.ArgumentType):
    -            nest.Connect(sources, targets, syn_spec={"weight": weights, "delay": delays}, conn_spec="one_to_one")
    +        with self.assertRaises(TypeError):
    +            nest.Connect(
    +                sources,
    +                targets,
    +                syn_spec={"weight": weights, "delay": delays},
    +                conn_spec="one_to_one",
    +            )
     
         def test_connect_arrays_unknown_nodes(self):
             """Raises exception when connecting NumPy arrays with unknown nodes"""
    @@ -337,10 +331,18 @@ def test_connect_arrays_unknown_nodes(self):
             delays = np.ones(len(sources))
             syn_model = "static_synapse"
     
    -        with self.assertRaises(nest.kernel.NESTErrors.UnknownNode):
    -            nest.Connect(sources, targets, syn_spec={"weight": weights, "delay": delays, "synapse_model": syn_model})
    +        with self.assertRaises(nest.NESTError):
    +            nest.Connect(
    +                sources,
    +                targets,
    +                syn_spec={
    +                    "weight": weights,
    +                    "delay": delays,
    +                    "synapse_model": syn_model,
    +                },
    +            )
     
    -    @unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +    @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
         def test_connect_arrays_receptor_type(self):
             """Connecting NumPy arrays with receptor type specified, threaded"""
     
    @@ -352,12 +354,17 @@ def test_connect_arrays_receptor_type(self):
             targets = self.non_unique
     
             weights = len(sources) * [2.0]
    -        nest.Connect(sources, targets, conn_spec="one_to_one", syn_spec={"weight": weights, "receptor_type": 0})
    +        nest.Connect(
    +            sources,
    +            targets,
    +            conn_spec="one_to_one",
    +            syn_spec={"weight": weights, "receptor_type": 0},
    +        )
     
             self.assertEqual(len(sources) * [0], nest.GetConnections().receptor)
     
    -    @unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -    def test_connect_arrays_differnt_alpha(self):
    +    @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
    +    def test_connect_arrays_different_alpha(self):
             """Connecting NumPy arrays with different alpha values in a threaded environment"""
     
             nest.local_num_threads = 4
    @@ -373,12 +380,8 @@ def test_connect_arrays_differnt_alpha(self):
             # Need to make sure the correct alpha value is used with the correct source
             src_alpha_ref = {key: val for key, val in zip(source, alpha)}
     
    -        nest.Connect(
    -            source,
    -            target,
    -            conn_spec="one_to_one",
    -            syn_spec={"alpha": alpha, "receptor_type": 0, "weight": weights, "synapse_model": "stdp_synapse"},
    -        )
    +        syn_spec = {"alpha": alpha, "receptor_type": 0, "weight": weights, "synapse_model": "stdp_synapse"}
    +        nest.Connect(source, target, conn_spec="one_to_one", syn_spec=syn_spec)
     
             conns = nest.GetConnections()
             src = conns.source
    diff --git a/testsuite/pytests/test_connect_conngen.py b/testsuite/pytests/test_connect_conngen.py
    index 8b8317cf11..22913f9c59 100644
    --- a/testsuite/pytests/test_connect_conngen.py
    +++ b/testsuite/pytests/test_connect_conngen.py
    @@ -34,11 +34,16 @@
     except ImportError:
         HAVE_CSA = False
     
    -nest.ll_api.sli_run("statusdict/have_libneurosim ::")
    -HAVE_LIBNEUROSIM = nest.ll_api.sli_pop()
    +try:
    +    import numpy
    +
    +    HAVE_NUMPY = True
    +except ImportError:
    +    HAVE_NUMPY = False
    +
    +HAVE_LIBNEUROSIM = nest.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, "NEST was built without support for libneurosim")
     class ConngenTestCase(unittest.TestCase):
    @@ -128,7 +133,7 @@ def test_Conngen_error_unknown_synapse(self):
     
             pop = nest.Create("iaf_psc_alpha", n_neurons)
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "UnknownSynapseType", nest.Connect, pop, pop, connspec, synspec)
    +        self.assertRaisesRegex(nest.NESTError, "UnknownSynapseType", nest.Connect, pop, pop, connspec, synspec)
     
         def test_Conngen_error_collocated_synapses(self):
             """
    @@ -144,7 +149,7 @@ def test_Conngen_error_collocated_synapses(self):
     
             pop = nest.Create("iaf_psc_alpha", 3)
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec)
    +        self.assertRaisesRegex(nest.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec)
     
         def test_Conngen_error_weight_and_delay_in_synspec_and_conngen(self):
             """
    @@ -165,11 +170,11 @@ def test_Conngen_error_weight_and_delay_in_synspec_and_conngen(self):
     
             pop = nest.Create("iaf_psc_alpha", n_neurons)
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_w)
    +        self.assertRaisesRegex(nest.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_w)
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_d)
    +        self.assertRaisesRegex(nest.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_d)
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_wd)
    +        self.assertRaisesRegex(nest.NESTError, "BadProperty", nest.Connect, pop, pop, connspec, synspec_wd)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_connect_fixed_indegree.py b/testsuite/pytests/test_connect_fixed_indegree.py
    index 9324f27dc3..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"
    @@ -58,7 +57,7 @@ def testErrorMessages(self):
             conn_params["indegree"] = self.N1 + 1
             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_connect_fixed_outdegree.py b/testsuite/pytests/test_connect_fixed_outdegree.py
    index 01240a58d3..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"
    @@ -56,7 +55,7 @@ def testErrorMessages(self):
             conn_params["outdegree"] = self.N2 + 1
             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_connect_fixed_total_number.py b/testsuite/pytests/test_connect_fixed_total_number.py
    index d56ade993d..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"
    @@ -57,7 +56,7 @@ def testErrorMessages(self):
             conn_params["N"] = self.N1 * self.N2 + 1
             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_connect_node_collection.py b/testsuite/pytests/test_connect_node_collection.py
    index 94808aa1a8..4b78a7b516 100644
    --- a/testsuite/pytests/test_connect_node_collection.py
    +++ b/testsuite/pytests/test_connect_node_collection.py
    @@ -60,11 +60,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_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_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_connect_symmetric_pairwise_bernoulli.py b/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    index f7c663fe7d..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
    @@ -72,7 +71,7 @@ def testAutapsesTrue(self):
     
             # test that autapses are not permitted
             pop = nest.Create("iaf_psc_alpha", N)
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(pop, pop, conn_params)
     
         def testAutapsesFalse(self):
    @@ -95,7 +94,7 @@ def testMultapses(self):
             # test that multapses must be permitted
             nest.ResetKernel()
             pop = nest.Create("iaf_psc_alpha", N)
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(pop, pop, conn_params)
     
             # test that multapses can only arise from symmetric
    @@ -120,7 +119,7 @@ def testCannotSetMSFalse(self):
             conn_params["make_symmetric"] = False
             nest.ResetKernel()
             pop = nest.Create("iaf_psc_alpha", N)
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(pop, pop, conn_params)
     
         def testMakeSymmetric(self):
    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)
    diff --git a/testsuite/pytests/test_copy_model.py b/testsuite/pytests/test_copy_model.py
    index 9458209365..f99cbaf829 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"""
     
    @@ -107,7 +106,8 @@ def test_cannot_copy_to_existing_model(self, org_model):
             except KeyError:
                 org_name = nest.GetDefaults(org_model)["synapse_model"]
     
    -        with pytest.raises(nest.kernel.NESTError, match="NewModelNameExists"):
    +        # TODO-PYNEST-NG
    +        with pytest.raises(nest.NESTError, match="is the name of an existing model and cannot be"):
                 nest.CopyModel(org_model, org_model)
     
         @pytest.mark.parametrize("org_model", [nest.node_models[0], nest.synapse_models[0]])
    @@ -118,5 +118,6 @@ def test_cannot_copy_twice(self, org_model):
     
             new_model = f"{org_model}_copy"
             nest.CopyModel(org_model, new_model)
    -        with pytest.raises(nest.kernel.NESTError, match="NewModelNameExists"):
    +        # TODO-PYNEST-NG
    +        with pytest.raises(nest.NESTError, match="is the name of an existing model and cannot be"):
                 nest.CopyModel(org_model, new_model)
    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_create.py b/testsuite/pytests/test_create.py
    index 235c2e5935..04d4f08b44 100644
    --- a/testsuite/pytests/test_create.py
    +++ b/testsuite/pytests/test_create.py
    @@ -20,112 +20,147 @@
     # 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 as np
    +import numpy.testing as nptest
    +import pytest
     
     
    -@nest.ll_api.check_stack
    -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(nest.GetStatus(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
    -        nest_errors = nest.kernel.NESTErrors
    -        params = [
    -            (tuple(), TypeError),
    -            ({"V_m": [-50]}, IndexError),
    -            ({"V_mm": num_nodes * [-50.0]}, nest_errors.DictError),
    -        ]
     
    -        for p, err 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))
    +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(nest.GetStatus(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_array_equal(nodes.V_m, V_m)
     
     
    -def run():
    -    runner = unittest.TextTestRunner(verbosity=2)
    -    runner.run(suite())
    +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})
     
    -if __name__ == "__main__":
    -    run()
    +    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(
    +    "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")
    +
    +        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)
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index 40aeeae577..a0a4838724 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -29,7 +29,6 @@
     import numpy
     
     
    -@nest.ll_api.check_stack
     class CurrentRecordingGeneratorTestCase(unittest.TestCase):
         """
         Test if currents from generators are recorded properly. Specifically:
    @@ -40,7 +39,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
    @@ -142,24 +141,25 @@ def test_RecordedCurrentVectors(self):
             nest.Simulate(50)
     
             # retrieve vectors
    -        events_Vm = nest.GetStatus(m_Vm)[0]["events"]
    -        v_Vm = events_Vm["V_m"]
    +        events_Vm = m_Vm.events
    +        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"]
    +        events_ac = m_ac.events
    +        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"]
    +        events_dc = m_dc.events
    +        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"]
    +        events_step = m_step.events
    +        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"]
    +        events_noise = m_noise.events
    +        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), "Incorrect current vector length for AC generator"
    diff --git a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    index 69ed7d8fff..13a48a8125 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"]
    @@ -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_bsshslm_2020"})
     
     
    @@ -207,10 +207,10 @@ def test_eprop_regression():
             "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]
     
    @@ -299,7 +299,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
     
    @@ -326,7 +326,7 @@ def generate_superimposed_sines(steps_sequence, periods):
             "amplitude_values": np.tile(target_signal, n_iter * batch_size),
         }
     
    -    nest.SetStatus(gen_rate_target, params_gen_rate_target)
    +    gen_rate_target.set(params_gen_rate_target)
     
         # Simulate
     
    @@ -591,11 +591,11 @@ def test_eprop_classification(batch_size, loss_nest_reference):
             "stop": duration["total_offset"] + duration["task"],
         }
     
    -    mm_reg = nest.Create("multimeter", params_mm_reg)
    -    mm_ad = nest.Create("multimeter", params_mm_ad)
    -    mm_out = nest.Create("multimeter", params_mm_out)
    -    sr = nest.Create("spike_recorder", params_sr)
    -    wr = nest.Create("weight_recorder", params_wr)
    +    mm_reg = nest.Create("multimeter", params=params_mm_reg)
    +    mm_ad = nest.Create("multimeter", params=params_mm_ad)
    +    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_reg_record = nrns_reg[:n_record]
         nrns_ad_record = nrns_ad[:n_record]
    @@ -765,8 +765,8 @@ def generate_evidence_accumulation_input_output(batch_size, n_in, steps, input):
             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
     
    @@ -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
     
    diff --git a/testsuite/pytests/test_erfc_neuron.py b/testsuite/pytests/test_erfc_neuron.py
    index 4c1f2ac559..400caecaa8 100644
    --- a/testsuite/pytests/test_erfc_neuron.py
    +++ b/testsuite/pytests/test_erfc_neuron.py
    @@ -35,8 +35,9 @@ 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"]
    +    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
         times = np.hstack((times, T))
    @@ -83,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_errors.py b/testsuite/pytests/test_errors.py
    index f980171226..9d1acd6cbb 100644
    --- a/testsuite/pytests/test_errors.py
    +++ b/testsuite/pytests/test_errors.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class ErrorTestCase(unittest.TestCase):
         """Tests if errors are handled correctly"""
     
    @@ -39,24 +38,10 @@ def raise_custom_exception(exc, msg):
                 raise exc(msg)
     
             message = "test"
    -        exception = nest.kernel.NESTError
    +        exception = nest.NESTError
     
             self.assertRaisesRegex(exception, message, raise_custom_exception, exception, message)
     
    -    def test_StackUnderFlow(self):
    -        """Stack underflow"""
    -
    -        nest.ResetKernel()
    -
    -        self.assertRaisesRegex(nest.kernel.NESTError, "StackUnderflow", nest.ll_api.sr, "clear ;")
    -
    -    def test_DivisionByZero(self):
    -        """Division by zero"""
    -
    -        nest.ResetKernel()
    -
    -        self.assertRaisesRegex(nest.kernel.NESTError, "DivisionByZero", nest.ll_api.sr, "1 0 div")
    -
         def test_InvalidNodeCollection(self):
             """Invalid NodeCollection"""
     
    @@ -85,11 +70,11 @@ def slice_test_composite():
                 return nc_c[8:9]
     
             msg = "InvalidNodeCollection"
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, add_test_primitive)
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, add_test_composite)
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, add_test_pc)
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, slice_test_primitive)
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, slice_test_composite)
    +        self.assertRaisesRegex(nest.NESTError, msg, add_test_primitive)
    +        self.assertRaisesRegex(nest.NESTError, msg, add_test_composite)
    +        self.assertRaisesRegex(nest.NESTError, msg, add_test_pc)
    +        self.assertRaisesRegex(nest.NESTError, msg, slice_test_primitive)
    +        self.assertRaisesRegex(nest.NESTError, msg, slice_test_composite)
     
         def test_UnknownNode(self):
             """Unknown node"""
    @@ -99,16 +84,16 @@ def test_UnknownNode(self):
             nc = nest.Create("iaf_psc_alpha", 10)  # noqa: F841
             nest.ResetKernel()
     
    -        msg = "UnknownNode"
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, nest.NodeCollection, [99])
    +        msg = "Node with id 99 does not exist."
    +        self.assertRaisesRegex(nest.NESTError, msg, nest.NodeCollection, [99])
     
         def test_UnknownModel(self):
             """Unknown model name"""
     
             nest.ResetKernel()
     
    -        msg = "UnknownModelName"
    -        self.assertRaisesRegex(nest.kernel.NESTError, msg, nest.Create, -1)
    +        msg = "not a known model name"
    +        self.assertRaisesRegex(nest.NESTError, msg, nest.Create, "unknown_model")
     
     
     def suite():
    diff --git a/testsuite/pytests/test_events.py b/testsuite/pytests/test_events.py
    index 0e3ba9f68b..c3ddb682f7 100644
    --- a/testsuite/pytests/test_events.py
    +++ b/testsuite/pytests/test_events.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class EventsTestCase(unittest.TestCase):
         """Tests of the Connect API"""
     
    @@ -37,14 +36,13 @@ def test_EventsVoltage(self):
     
             nest.ResetKernel()
     
    -        nest.ll_api.sr("20 setverbosity")
             n = nest.Create("iaf_psc_alpha")
             vm = nest.Create("voltmeter", params={"interval": 1.0})
     
             nest.Connect(vm, n)
             nest.Simulate(10)
     
    -        d = nest.GetStatus(vm, "events")[0]
    +        d = vm.events
     
             self.assertEqual(len(d["V_m"]), 9)
     
    @@ -53,15 +51,13 @@ def test_EventsSpikes(self):
     
             nest.ResetKernel()
     
    -        nest.ll_api.sr("20 setverbosity")
    -
             n = nest.Create("iaf_psc_alpha", params={"I_e": 1000.0})
             sr = nest.Create("spike_recorder")
     
             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 d5c794f6f4..d64927b302 100644
    --- a/testsuite/pytests/test_facetshw_stdp.py
    +++ b/testsuite/pytests/test_facetshw_stdp.py
    @@ -46,7 +46,7 @@ def test_facetshw_stdp(self):
             # configuration
             lut_0 = [2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15]
             lut_1 = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13]
    -        lut_2 = range(16)  # identity
    +        lut_2 = list(range(16))  # identity
             config_0 = [0, 0, 1, 0]
             config_1 = [0, 1, 0, 0]
             reset_pattern = 6 * [1]  # reset all
    @@ -82,10 +82,9 @@ def test_facetshw_stdp(self):
             }
     
             # 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_get_set.py b/testsuite/pytests/test_get_set.py
    deleted file mode 100644
    index 4de6a7bc5f..0000000000
    --- a/testsuite/pytests/test_get_set.py
    +++ /dev/null
    @@ -1,597 +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
    -
    -
    -@nest.ll_api.check_stack
    -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
    -
    -
    -@nest.ll_api.check_stack
    -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_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.kernel.NESTError):
    -            nest.SetStatus(n, {"V_m": -40.0})
    -        with self.assertRaises(nest.kernel.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.
    -
    -        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=np.float64)
    -        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=np.float64)
    -
    -        # 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=np.float64, name="start"),
    -        )
    -
    -        # With data in events
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -        pg = nest.Create("poisson_generator", {"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", {"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.kernel.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.kernel.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_getconnections.py b/testsuite/pytests/test_getconnections.py
    index 1f52e9bcc8..26126bcb7d 100644
    --- a/testsuite/pytests/test_getconnections.py
    +++ b/testsuite/pytests/test_getconnections.py
    @@ -27,10 +27,9 @@
     
     import nest
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
    -@nest.ll_api.check_stack
     class GetConnectionsTestCase(unittest.TestCase):
         """Find connections and test if values can be set."""
     
    @@ -45,24 +44,22 @@ 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)
    +        c3.set(d1)
    +        self.assertEqual(c3.weight, 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)
             c5.set(d1)
    -        s2 = c5.get("weight")
    -        self.assertEqual(s2, list(weights))
    +        self.assertEqual(c5.get("weight"), weights)
     
             c6 = nest.GetConnections()
             self.assertEqual(c1, c6)
    @@ -75,7 +72,7 @@ def test_GetConnectionsTargetModels(self):
                 try:
                     other = nest.Create(model)
                     nest.Connect(alpha, other)
    -            except nest.kernel.NESTError:
    +            except nest.NESTError:
                     # If we can't create a node with this model, or connect
                     # to a node of this model, we ignore it.
                     continue
    @@ -97,7 +94,7 @@ def test_GetConnectionsSourceModels(self):
                 try:
                     other = nest.Create(model)
                     nest.Connect(other, alpha)
    -            except nest.kernel.NESTError:
    +            except nest.NESTError:
                     # If we can't create a node with this model, or connect
                     # to a node of this model, we ignore it.
                     continue
    @@ -129,7 +126,7 @@ def test_GetConnectionsSynapseModel(self):
                 try:
                     # Connect with specified synapse
                     nest.Connect(src, tgt, syn_spec={"synapse_model": synapse_model})
    -            except nest.kernel.NESTError:
    +            except nest.NESTError:
                     # If we can't connect iaf_psc_alpha with the given synapse_model, we ignore it.
                     continue
     
    @@ -169,7 +166,7 @@ def test_GetConnectionsSynapseLabel(self):
                 try:
                     # Connect with specified synapse
                     nest.Connect(src, tgt, syn_spec={"synapse_model": synapse_model, "synapse_label": label})
    -            except nest.kernel.NESTError:
    +            except nest.NESTError:
                     # If we can't connect iaf_psc_alpha with the given synapse_model, we ignore it.
                     continue
     
    diff --git a/testsuite/pytests/test_getnodes.py b/testsuite/pytests/test_getnodes.py
    index 7bd2581e97..1249f1ba0f 100644
    --- a/testsuite/pytests/test_getnodes.py
    +++ b/testsuite/pytests/test_getnodes.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class GetNodesTestCase(unittest.TestCase):
         """Test GetNodes function"""
     
    diff --git a/testsuite/pytests/test_gif_exp.py b/testsuite/pytests/test_gif_exp.py
    index 7572f70563..efd96b6fe9 100644
    --- a/testsuite/pytests/test_gif_exp.py
    +++ b/testsuite/pytests/test_gif_exp.py
    @@ -71,18 +71,18 @@ 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)"""
             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_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_glif_cond.py b/testsuite/pytests/test_glif_cond.py
    index 4ee25f3fbe..0874b677e7 100644
    --- a/testsuite/pytests/test_glif_cond.py
    +++ b/testsuite/pytests/test_glif_cond.py
    @@ -30,7 +30,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, "GSL is not available")
    @@ -85,11 +85,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):
             """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 f5bc1f509f..9b6ada4acd 100644
    --- a/testsuite/pytests/test_glif_psc.py
    +++ b/testsuite/pytests/test_glif_psc.py
    @@ -89,11 +89,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_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_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",
         [
    diff --git a/testsuite/pytests/test_iaf_bw_2001.py b/testsuite/pytests/test_iaf_bw_2001.py
    index ac47ce7d99..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.
    @@ -236,5 +235,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..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"]}
    @@ -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_iaf_ps_psp_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    index 531b70089e..8c8caf8efe 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    @@ -109,7 +109,7 @@ def V_m_response_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 072bff1382..daedce0750 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    @@ -106,7 +106,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})
     
    @@ -125,20 +125,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_iaf_singularity.py b/testsuite/pytests/test_iaf_singularity.py
    index 6af054cf03..842b37acb3 100644
    --- a/testsuite/pytests/test_iaf_singularity.py
    +++ b/testsuite/pytests/test_iaf_singularity.py
    @@ -18,7 +18,6 @@
     #
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -from nest.ll_api import sr
     
     """
     Test for correct handling of IAF neuron propagator singularity.
    @@ -30,7 +29,6 @@
     import pytest
     
     
    -@nest.ll_api.check_stack
     class TestIAFSingularity:
         """
         Test that iaf neurons handle singularities for ``tau_syn = tau_m`` correctly.
    @@ -41,7 +39,7 @@ class TestIAFSingularity:
     
         @pytest.mark.parametrize("model", ["iaf_psc_exp", "iaf_psc_alpha"])
         @pytest.mark.parametrize("h", [0.001, 0.1])
    -    @pytest.mark.parametrize("tau_m", [1, 10, 100])
    +    @pytest.mark.parametrize("tau_m", [1.0, 10.0, 100.0])
         def test_smooth_response(self, model, h, tau_m):
             """
             Drive single neuron with single spike through excitatory and inhibitory synapse.
    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()
    diff --git a/testsuite/pytests/test_issue_3108.py b/testsuite/pytests/test_issue_3108.py
    index de2b178b2b..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.
    @@ -38,10 +39,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)
    @@ -192,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)
    @@ -222,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
     
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index 2fc3fd324d..0e2edb4b71 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.
    @@ -84,7 +83,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
     
    @@ -152,9 +151,10 @@ 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 = 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]]
     
             weight = plastic_synapse_of_interest.weight
             return (pre_spikes, post_spikes, weight)
    diff --git a/testsuite/pytests/test_json.py b/testsuite/pytests/test_json.py
    index 668c4080d7..ef3640fb23 100644
    --- a/testsuite/pytests/test_json.py
    +++ b/testsuite/pytests/test_json.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class StatusTestCase(unittest.TestCase):
         """Tests of data in JSON format"""
     
    @@ -50,21 +49,15 @@ def test_kernel_status_JSON(self):
             d_json = nest.to_json(d)
             self.assertIsInstance(d_json, str)
     
    -    def test_GetStatus_JSON(self):
    -        """JSON data of GetStatus"""
    +    def test_get_JSON(self):
    +        """JSON data of node status"""
     
             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")
    -        self.assertIsInstance(d_json, str)
    -        self.assertEqual(d_json, "[]")
    -
     
     def suite():
         suite = unittest.makeSuite(StatusTestCase, "test")
    diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py
    index 0ff60ceec7..f5fe49a3ce 100644
    --- a/testsuite/pytests/test_labeled_synapses.py
    +++ b/testsuite/pytests/test_labeled_synapses.py
    @@ -27,10 +27,9 @@
     
     import nest
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.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"""
    @@ -128,8 +127,8 @@ def test_SetLabelToSynapseOnConnect(self):
                 c = nest.GetConnections(a, a)
                 self.assertTrue(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)
    @@ -206,7 +205,7 @@ def test_SetLabelToNotLabeledSynapse(self):
                 symm = nest.GetDefaults(syn, "requires_symmetric")
     
                 # try set a label during SetDefaults
    -            with self.assertRaises(nest.kernel.NESTError):
    +            with self.assertRaises(nest.NESTError):
                     nest.SetDefaults(syn, {"synapse_label": 123})
     
                 # plain connection
    @@ -218,7 +217,7 @@ def test_SetLabelToNotLabeledSynapse(self):
                     + self.eprop_synapses
                 ):
                     # try set on connect
    -                with self.assertRaises(nest.kernel.NESTError):
    +                with self.assertRaises(nest.NESTError):
                         nest.Connect(
                             a[:2],
                             a[-2:],
    @@ -233,7 +232,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,
    @@ -249,7 +248,7 @@ def test_SetLabelToNotLabeledSynapse(self):
                 # try set on SetStatus
                 c = nest.GetConnections(a, a)
     
    -            with self.assertRaises(nest.kernel.NESTError):
    +            with self.assertRaises(nest.NESTError):
                     c.set({"synapse_label": 123})
     
     
    diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py
    index 86f51bb14a..ec29301af4 100644
    --- a/testsuite/pytests/test_mc_neuron.py
    +++ b/testsuite/pytests/test_mc_neuron.py
    @@ -24,7 +24,7 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, "GSL is not available")
    @@ -176,10 +176,10 @@ def setUpNodes(self):
             rqs = nest.GetDefaults("iaf_cond_alpha_mc")["recordables"]
             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,
    +        self.sgs.set(
                 [
                     {"spike_times": self.rec_sp_soma_ex},
                     {"spike_times": self.rec_sp_soma_in},
    @@ -187,7 +187,7 @@ def setUpNodes(self):
                     {"spike_times": self.rec_sp_prox_in},
                     {"spike_times": self.rec_sp_dist_ex},
                     {"spike_times": self.rec_sp_dist_in},
    -            ],
    +            ]
             )
     
         def setUpNetwork(self):
    @@ -213,21 +213,22 @@ 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))
    +        assert 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))
    +        assert 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))
    +        assert 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))
    +        assert 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))
    +        assert 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))
    +        assert np.allclose(rec["g_ex.d"][self.I0 : self.I1], self.gex_dist_test)
     
     
     def suite():
    diff --git a/doc/slihelp_generator/generate_helpindex.py b/testsuite/pytests/test_memsize.py
    old mode 100755
    new mode 100644
    similarity index 53%
    rename from doc/slihelp_generator/generate_helpindex.py
    rename to testsuite/pytests/test_memsize.py
    index 2901540c9d..b27dcd613f
    --- a/doc/slihelp_generator/generate_helpindex.py
    +++ b/testsuite/pytests/test_memsize.py
    @@ -1,7 +1,6 @@
    -#!/usr/bin/env python3
     # -*- coding: utf-8 -*-
     #
    -# generate_helpindex.py
    +# test_memsize.py
     #
     # This file is part of NEST.
     #
    @@ -21,21 +20,32 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     """
    -Generate NEST helpindex
    -=======================
    +Test models with calcium concentration.
     
    -Generate the helpindex containing all help files in the given
    -help_dir.
    +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 os
    -import sys
    +import nest
    +import pytest
     
    -from writers import write_helpindex
     
    -if len(sys.argv) != 2:
    -    print("Usage: python3 generate_helpindex.py <help_dir>")
    -    sys.exit(1)
    +@pytest.fixture(autouse=True)
    +def reset_kernel():
    +    nest.ResetKernel()
     
    -help_dir = os.path.join(sys.argv[1], "help")
    -write_helpindex(help_dir)
    +
    +def test_memsize():
    +    """
    +    Verify that memsize is available and works somewhat reasonable.
    +    """
    +
    +    m_pre = nest.memory_size
    +
    +    n = nest.Create("aeif_cond_alpha", 2000)
    +    nest.Connect(n, n, syn_spec={"synapse_model": "stdp_synapse"})
    +
    +    m_post = nest.memory_size
    +
    +    assert m_pre > 0
    +    assert m_post > m_pre
    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 6e9fc3073c..1ad4f32589 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -44,7 +44,10 @@ def test_connect_multimeter_twice():
         mm = nest.Create("multimeter")
         nest.Connect(mm, nrn)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    # 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)
     
     
    @@ -58,8 +61,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)
     
    @@ -84,19 +87,20 @@ def test_recordables_are_recorded(model):
            This test does not check if the data is meaningful.
         """
     
    +    nest.resolution = 2**-3  # Set to power of two to avoid rounding issues
         recording_interval = 2
         simtime = 10
    -    num_data_expected = simtime / recording_interval - 1
    +    num_data_expected = int(simtime / recording_interval - 1)
     
         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)
     
         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
     
    @@ -116,8 +120,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_multiple_synapses.py b/testsuite/pytests/test_multiple_synapses.py
    index c85e9af2b4..399b408456 100644
    --- a/testsuite/pytests/test_multiple_synapses.py
    +++ b/testsuite/pytests/test_multiple_synapses.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class MultipleSynapsesTestCase(unittest.TestCase):
         def setUp(self):
             nest.ResetKernel()
    diff --git a/testsuite/pytests/test_nest_set_get.py b/testsuite/pytests/test_nest_set_get.py
    new file mode 100644
    index 0000000000..eba73c5180
    --- /dev/null
    +++ b/testsuite/pytests/test_nest_set_get.py
    @@ -0,0 +1,90 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_nest_set_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 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
    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_indexing_slicing.py b/testsuite/pytests/test_node_collection_indexing_slicing.py
    index 734e600f5d..2c3b54f3b0 100644
    --- a/testsuite/pytests/test_node_collection_indexing_slicing.py
    +++ b/testsuite/pytests/test_node_collection_indexing_slicing.py
    @@ -227,13 +227,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]]
     
     
    @@ -263,13 +263,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 d8764fe10f..f1c3725a1e 100644
    --- a/testsuite/pytests/test_node_collection_operations.py
    +++ b/testsuite/pytests/test_node_collection_operations.py
    @@ -116,7 +116,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
     
     
    @@ -266,5 +266,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_set.py b/testsuite/pytests/test_node_collection_set.py
    new file mode 100644
    index 0000000000..5cb0895411
    --- /dev/null
    +++ b/testsuite/pytests/test_node_collection_set.py
    @@ -0,0 +1,235 @@
    +# -*- 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)
    +    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, Vreset_ref)
    +
    +
    +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_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."""
    +
    +    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)
    +
    +    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, 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():
    +    """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
    diff --git a/testsuite/pytests/test_node_collection_to_from_object.py b/testsuite/pytests/test_node_collection_to_from_object.py
    index 2c1d9eece3..4a939c94b7 100644
    --- a/testsuite/pytests/test_node_collection_to_from_object.py
    +++ b/testsuite/pytests/test_node_collection_to_from_object.py
    @@ -47,7 +47,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)
     
     
    @@ -104,8 +104,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_node_parametrization.py b/testsuite/pytests/test_node_parametrization.py
    index e78c3c3057..323f2895fa 100644
    --- a/testsuite/pytests/test_node_parametrization.py
    +++ b/testsuite/pytests/test_node_parametrization.py
    @@ -28,48 +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(nest.GetStatus(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]
    -
    -        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref, "C_m": Cm_ref, "V_min": Vmin_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, "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 = nest.GetStatus(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 = [-80.0, -90.0, -100.0]
    -        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": np.array(Vm_ref)})
    -
    -        self.assertAlmostEqual(list(nest.GetStatus(nodes, "V_m")), Vm_ref)
    -
         def test_create_uniform(self):
             """Test Create with random.uniform as parameter"""
             min_val = -75.0
    @@ -126,158 +91,6 @@ def test_create_adding(self):
                 self.assertGreaterEqual(vm, -45.0)
                 self.assertLessEqual(vm, -25.0)
     
    -    def test_SetStatus_with_dict(self):
    -        """Test SetStatus with dict"""
    -        nodes = nest.Create("iaf_psc_alpha", 3)
    -        Vm_ref = (-60.0, -60.0, -60.0)
    -        nest.SetStatus(nodes, {"V_m": -60.0})
    -
    -        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.0, -27.0, -27.0)
    -        Cm_ref = (111.0, 111.0, 111.0)
    -        nest.SetStatus(nodes, {"V_m": -27.0, "C_m": 111.0})
    -
    -        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.0, -20.0, -88.0)
    -        nest.SetStatus(nodes, [{"V_m": -70.0}, {"V_m": -20.0}, {"V_m": -88.0}])
    -
    -        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.0, -40.0, -50.0]
    -        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.0, -12.0, -13.0]
    -        Cm_ref = 177.0
    -        tau_minus_ref = [22.0, 24.0, 26.0]
    -        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.0,)
    -        Cm_ref = (222.0,)
    -        nest.SetStatus(node, {"V_m": [-13.0], "C_m": [222.0]})
    -
    -        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.0, 2.0, 3.0]})
    -
    -        self.assertEqual(list(nest.GetStatus(sg, "spike_times")[0]), [1.0, 2.0, 3.0])
    -
    -    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.0, -33.0, -44.0])
    -        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.0, -55.0)})
    -
    -        for vm in nodes.get("V_m"):
    -            self.assertGreater(vm, -75.0)
    -            self.assertLess(vm, -55.0)
    -
    -    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.0, -55.0))
    -
    -        for vm in nodes.get("V_m"):
    -            self.assertGreater(vm, -75.0)
    -            self.assertLess(vm, -55.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)
    @@ -348,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.kernel.NESTError):
    +        with self.assertRaises(nest.NESTErrors.BadParameterValue):
                 layer.set({"V_m": nest.spatial.pos.n(-1)})
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTErrors.KernelException):
                 layer.set({"V_m": nest.spatial.pos.z})
     
         def test_conn_distance_parameter(self):
    @@ -413,10 +226,10 @@ 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.kernel.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.distance.z})
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.distance.n(-1)})
     
         def test_src_tgt_position_parameter(self):
    @@ -452,16 +265,16 @@ 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.kernel.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.source_pos.z})
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.source_pos.n(-1)})
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.target_pos.z})
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.target_pos.n(-1)})
     
         def test_exp_parameter(self):
    @@ -526,7 +339,7 @@ def test_redraw_wrong_limits(self):
             min_value = 1.5
             max_value = 1.0
             p = nest.random.normal()
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.math.redraw(p, min_value, max_value)
     
         def test_redraw_value_impossible(self):
    @@ -535,7 +348,7 @@ def test_redraw_value_impossible(self):
             min_value = 1.5
             max_value = 2.0
             p = nest.random.uniform(min=0.0, max=1.0)
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.math.redraw(p, min_value, max_value).GetValue()
     
         def test_parameter_comparison(self):
    diff --git a/testsuite/pytests/test_onetooneconnect.py b/testsuite/pytests/test_onetooneconnect.py
    index 06babb5ffc..f4a3c2f228 100644
    --- a/testsuite/pytests/test_onetooneconnect.py
    +++ b/testsuite/pytests/test_onetooneconnect.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class OneToOneConnectTestCase(unittest.TestCase):
         """Tests of Connect with OneToOne pattern"""
     
    @@ -92,8 +91,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.NESTError, "Creation of connection is not possible", nest.Connect, n, vm)
    +        self.assertRaisesRegex(nest.NESTError, "Creation of connection is not possible", nest.Connect, sr, n)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index 341d6166ac..3997f7b78e 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -28,18 +28,17 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     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
             self.spike_time = 1.0
             self.delay = 0.2
    -        self.source = nest.Create("spike_generator", 1, {"spike_times": [self.spike_time]})
    +        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,8 +54,10 @@ def test_ParrotNeuronRepeatSpike(self):
             nest.Simulate(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
    +        times = events["times"]
    +        senders = 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,8 +71,10 @@ def test_ParrotNeuronIgnoreSpike(self):
             nest.Simulate(self.spike_time + 2.0 * 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
    +        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"
     
         def test_ParrotNeuronOutgoingMultiplicity(self):
    @@ -88,14 +91,15 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
             nest.Simulate(self.spike_time + 2.0 * 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
    +        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]
             ), "Parrot neuron failed to correctly repeat multiple spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPoissonTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -126,7 +130,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
    @@ -141,12 +145,11 @@ def test_ParrotNeuronIncomingMultiplicity(self):
     
             nest.Simulate(t_sim)
     
    -        n_spikes = nest.GetStatus(spike_rec)[0]["n_events"]
    +        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
     class ParrotNeuronSTDPTestCase(unittest.TestCase):
         """
         Check STDP protocol between two parrot_neurons connected by a stdp_synapse.
    @@ -160,7 +163,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
    @@ -173,12 +176,12 @@ def run_protocol(self, dt):
             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})
    @@ -203,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_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 27240e4b5e..4f5370b081 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):
    @@ -37,12 +38,11 @@ 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"""
     
         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
    @@ -64,8 +64,9 @@ 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")]
    +        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
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -79,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 = nest.GetStatus(self.spikes)[0]["events"]
    -        post_time = events["times"][events["senders"] == self.parrot.get("global_id")]
    +        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"
     
         def test_ParrotNeuronOutgoingMultiplicity(self):
    @@ -97,14 +99,14 @@ 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 = nest.GetStatus(self.spikes)[0]["events"]
    -        post_times = events["times"][events["senders"] == self.parrot.get("global_id")]
    +        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]
             ), "Parrot neuron failed to correctly repeat multiple spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPSPoissonTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -138,7 +140,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
    @@ -153,12 +155,11 @@ def test_ParrotNeuronIncomingMultiplicity(self):
     
             nest.Simulate(_round_up(t_sim))
     
    -        n_spikes = nest.GetStatus(spike_rec)[0]["n_events"]
    +        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
     class ParrotNeuronPSSTDPTestCase(unittest.TestCase):
         """
         Check STDP protocol between two parrot_neurons_ps connected by a
    @@ -172,7 +173,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
    @@ -231,10 +232,7 @@ def test_ParrotNeuronSTDPProtocolPotentiation(self):
     
             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."
    +        assert w_pre < w_post, "Parrot neuron STDP potentiation protocol failed to elicit positive weight changes."
     
         def test_ParrotNeuronSTDPProtocolDepression(self):
             """Check post-pre spike pairings between parrot_neurons decrement
    @@ -242,10 +240,7 @@ def test_ParrotNeuronSTDPProtocolDepression(self):
     
             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."
    +        assert w_pre > w_post, "Parrot neuron STDP potentiation protocol failed to elicit negative weight changes."
     
     
     def suite():
    diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py
    index d15a15f717..e1994fc0b1 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)]) for s in np.unique(senders)]
    @@ -61,17 +61,17 @@ def test_statistical_rate_change(self):
     
             # Second simulation, with rate = 0
             rate = 0.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.0 * sim_time})
    +        sr.set({"n_events": 0, "start": float(sim_time) + resolution, "stop": 2.0 * 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.0
    -        nest.SetStatus(pg, {"rate": rate})
    -        nest.SetStatus(sr, {"n_events": 0, "start": 2.0 * sim_time, "stop": 3.0 * sim_time})
    +        pg.rate = rate
    +        sr.set({"n_events": 0, "start": 2.0 * sim_time, "stop": 3.0 * sim_time})
             nest.Simulate(sim_time)
             expon_scale = 1000 / rate
             self._kstest_first_spiketimes(sr, 2.0 * 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 7b971514ba..988e671ac8 100644
    --- a/testsuite/pytests/test_pp_psc_delta.py
    +++ b/testsuite/pytests/test_pp_psc_delta.py
    @@ -57,13 +57,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.0 / (1.0 / lam + d * 1e-3)
             ratio = rate_sim / rate_ana
    @@ -106,13 +106,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.0 / (1.0 / lam + d * 1e-3)
             ratio = rate_sim / rate_ana
    @@ -166,13 +166,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 898b1ccdc1..17a505d193 100644
    --- a/testsuite/pytests/test_pp_psc_delta_stdp.py
    +++ b/testsuite/pytests/test_pp_psc_delta_stdp.py
    @@ -53,18 +53,18 @@ def test_pp_psc_delta_stdp(self):
             print(conn2)
     
             sg_pre = nest.Create("spike_generator")
    -        nest.SetStatus(sg_pre, {"spike_times": np.arange(Dt, nsteps * Dt, 10.0 * Dt)})
    +        sg_pre.spike_times = np.arange(Dt, nsteps * Dt, 10.0 * 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
    +        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_quantal_stp_synapse.py b/testsuite/pytests/test_quantal_stp_synapse.py
    index 5ce1f4a146..0918307620 100644
    --- a/testsuite/pytests/test_quantal_stp_synapse.py
    +++ b/testsuite/pytests/test_quantal_stp_synapse.py
    @@ -27,7 +27,6 @@
     import numpy
     
     
    -@nest.ll_api.check_stack
     class QuantalSTPSynapseTestCase(unittest.TestCase):
         """Compare quantal_stp_synapse with its deterministic equivalent."""
     
    @@ -35,7 +34,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
     
    @@ -95,7 +94,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(0.1)  # flush the last voltmeter events from the queue
    diff --git a/testsuite/pytests/test_random123.py b/testsuite/pytests/test_random123.py
    index 349fd0b038..1df029cb6c 100644
    --- a/testsuite/pytests/test_random123.py
    +++ b/testsuite/pytests/test_random123.py
    @@ -38,7 +38,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 daa7903bfe..f97a9f5e8b 100644
    --- a/testsuite/pytests/test_random_parameter.py
    +++ b/testsuite/pytests/test_random_parameter.py
    @@ -35,7 +35,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 e80af03d1d..0f48778ad7 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -25,7 +25,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateCopyModelTestCase(unittest.TestCase):
         """
         Test whether a rate connection created by copy model behaves
    @@ -42,7 +41,7 @@ def test_rate_copy_model(self):
             simtime = 100.0
             dt = 0.001
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = dt
             nest.use_wfr = True
    @@ -79,10 +78,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 = 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 f9d5abc423..4eb73ca466 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -25,7 +25,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateInstantaneousAndDelayedTestCase(unittest.TestCase):
         """
         Test whether delayed rate connections have same properties as
    @@ -43,7 +42,7 @@ def test_rate_instantaneous_and_delayed(self):
             simtime = 100.0
             dt = 0.001
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = dt
             nest.use_wfr = True
    @@ -62,30 +61,22 @@ def test_rate_instantaneous_and_delayed(self):
     
             nest.Connect(multimeter, neurons, "all_to_all", {"delay": 10.0})
     
    -        nest.Connect(
    -            rate_neuron_drive,
    -            rate_neuron_1,
    -            "all_to_all",
    -            {"synapse_model": "rate_connection_instantaneous", "weight": weight},
    -        )
    +        syn_spec = {"synapse_model": "rate_connection_instantaneous", "weight": weight}
    +        nest.Connect(rate_neuron_drive, rate_neuron_1, "all_to_all", syn_spec)
     
    -        nest.Connect(
    -            rate_neuron_drive,
    -            rate_neuron_2,
    -            "all_to_all",
    -            {"synapse_model": "rate_connection_delayed", "delay": delay, "weight": weight},
    -        )
    +        syn_spec = {"synapse_model": "rate_connection_delayed", "delay": delay, "weight": weight}
    +        nest.Connect(rate_neuron_drive, rate_neuron_2, "all_to_all", syn_spec)
     
             # simulate
             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 = 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 2d2fc7f077..242e29e4df 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -31,7 +31,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateNeuronTestCase(unittest.TestCase):
         """Check rate_neuron"""
     
    @@ -47,7 +46,7 @@ def setUp(self):
             self.dt = 0.1
             self.tstart = 10.0 * 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
    @@ -55,9 +54,8 @@ def setUp(self):
             # 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}
    -        )
    +        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)
    @@ -65,17 +63,17 @@ def setUp(self):
         def test_RateNeuronMean(self):
             """Check the mean value of the rate_neurons"""
     
    -        # simulate
             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.global_id)[0]
    +        senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
    -        mean_rate_ipn = np.mean(events["rate"][senders_ipn])
    -        mean_rate_opn = np.mean(events["rate"][senders_opn])
    +        rate = events["rate"]
    +        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"], rtol=self.rtol))
             self.assertTrue(np.isclose(mean_rate_opn, self.neuron_params["mu"], rtol=self.rtol))
    @@ -83,18 +81,18 @@ 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 = 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.global_id)[0]
    +        senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
    -        noise_ipn = events["noise"][senders_ipn]
    +        noise = events["noise"]
    +        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(np.isclose(std_noise_ipn, self.neuron_params["sigma"], rtol=self.rtol))
    @@ -103,13 +101,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 = 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.global_id)[0]
     
             rate = events["rate"][senders_ipn]
             var_rate = np.var(rate)
    @@ -117,7 +114,6 @@ def test_RateNeuronVariance(self):
             # expected variance
             var_test = self.neuron_params["sigma"] ** 2 / 2.0
     
    -        # assert
             self.assertTrue(np.isclose(var_rate, var_test, rtol=self.rtol))
     
     
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index ac76144e22..58d7e2574f 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -32,7 +32,6 @@ def H(x):
         return 0.5 * (np.sign(x) + 1.0)
     
     
    -@nest.ll_api.check_stack
     class RateNeuronCommunicationTestCase(unittest.TestCase):
         """Check rate_neuron"""
     
    @@ -54,7 +53,7 @@ def setUp(self):
             self.simtime = 100.0
             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
    @@ -133,15 +132,12 @@ 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")
    -        times = events["times"][np.where(senders == rate_neuron_1_node_id)]
    -        rate_1 = 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)]
    +        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,11 +151,10 @@ 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")
    -        rate_1 = 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
    @@ -172,32 +167,25 @@ def test_RateNeuronNL(self):
             lin_sums = [True, False]
     
             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")
    -            rate_1 = 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_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_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_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])
     
                 # 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:
                     rates_test = np.array(
    @@ -227,11 +215,10 @@ 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")
    -        rate_5 = 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
    @@ -240,20 +227,18 @@ 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)]
    +        parrot_rate = events["rate"][np.where(senders == self.parrot_neuron.global_id)]
     
             value = parrot_rate[-1]
    -        g = nest.GetStatus(self.parrot_neuron)[0]["g"]
    +        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_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index f87842bcb3..5ff59e2236 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()
    @@ -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
     
    @@ -48,7 +48,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.NESTError):
                 nest.Simulate(100)
     
             nest.Cleanup()
    @@ -78,8 +78,8 @@ def testDataPrefixDataPathAndFilenameExtension(self):
                 "record_from": ["V_m"],
                 "file_extension": file_extension,
             }
    -        mm = nest.Create("multimeter", mm_params)
    -        fname = mm.get("filenames")[0]
    +        mm = nest.Create("multimeter", params=mm_params)
    +        fname = mm.filenames[0]
     
             self.assertTrue(data_path in fname)
             self.assertTrue(data_prefix in fname)
    @@ -97,11 +97,11 @@ def testLabel(self):
                 "record_from": ["V_m"],
                 "label": label,
             }
    -        mm = nest.Create("multimeter", mm_params)
    -        fname = mm.get("filenames")[0]
    +        mm = nest.Create("multimeter", params=mm_params)
    +        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,14 +115,13 @@ 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)
     
    -            nest.ll_api.sr("statusdict/version ::")
    -            version = nest.ll_api.spp()
    +            version = nest.build_info["version"]
                 self.assertEqual(lines[0], "# NEST version: {}\n".format(version))
     
                 header_2 = "# RecordingBackendASCII version:"
    @@ -143,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
     
    @@ -159,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):
             """"""
    @@ -177,15 +176,15 @@ 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.NESTError):
                 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."""
    @@ -196,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 e75a646d3c..be01c8b247 100644
    --- a/testsuite/pytests/test_recording_backend_memory.py
    +++ b/testsuite/pytests/test_recording_backend_memory.py
    @@ -22,11 +22,12 @@
     import unittest
     
     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."""
    @@ -34,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."""
    @@ -46,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(mm.get("events")["times"].size, 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(mm.get("events")["times"].size, 150)
    +        self.assertEqual(mm.n_events, 150)
    +        self.assertEqual(len(mm.events["times"]), 150)
     
             # Now with multithreading
     
    @@ -63,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(mm.get("events")["times"].size, 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(mm.get("events")["times"].size, 300)
    +        self.assertEqual(mm.n_events, 300)
    +        self.assertEqual(len(mm.events["times"]), 300)
     
         def testResetEventCounter(self):
             """"""
    @@ -82,17 +83,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.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(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(mm.get("events")["times"].size, 0)
    +        self.assertEqual(len(mm.events["times"]), 0)
     
         def testTimeInSteps(self):
             """"""
    @@ -102,24 +103,22 @@ 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(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.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.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.NESTError):
                 mm.time_in_steps = False
     
     
    diff --git a/testsuite/pytests/test_recording_backends.py b/testsuite/pytests/test_recording_backends.py
    index 0eec4c792c..8afeedaafb 100644
    --- a/testsuite/pytests/test_recording_backends.py
    +++ b/testsuite/pytests/test_recording_backends.py
    @@ -23,7 +23,7 @@
     
     import nest
     
    -HAVE_SIONLIB = nest.ll_api.sli_func("statusdict/have_sionlib ::")
    +HAVE_SIONLIB = nest.build_info["have_sionlib"]
     
     
     class TestRecordingBackends(unittest.TestCase):
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index fe49b2662a..5fdddbc918 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -140,7 +140,7 @@ def compute_reftime(self, model, sr, vm, neuron):
                 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
    @@ -148,13 +148,13 @@ def compute_reftime(self, model, sr, vm, neuron):
             elif model in neurons_interspike_ps + neurons_eprop:
                 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 first spike occurred
                 idx_spike = np.argwhere(times == spike_times[0])[0][0]
    @@ -194,12 +194,12 @@ def test_refractory_time(self):
                 # trigger almost immediate spiking => t_ref almost equals
                 # interspike
                 if model in neurons_interspike_ps + neurons_eprop:
    -                nest.SetStatus(cg, "amplitude", 10000000.0)
    +                cg.amplitude = 10000000.0
                 elif model == "ht_neuron":
                     # ht_neuron use too long time with a very large amplitude
    -                nest.SetStatus(cg, "amplitude", 2000.0)
    +                cg.amplitude = 2000.0
                 elif model in neurons_interspike:
    -                nest.SetStatus(cg, "amplitude", 15000.0)
    +                cg.amplitude = 15000.0
     
                 # Connect them and simulate
                 nest.Connect(vm, neuron)
    @@ -212,7 +212,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 + neurons_eprop:
    @@ -236,11 +236,6 @@ def test_refractory_time(self):
                     )
     
     
    -# --------------------------------------------------------------------------- #
    -#  Run the comparisons
    -# --------------------------------------------------------------------------- #
    -
    -
     def suite():
         return unittest.makeSuite(TestRefractoryCase, "test")
     
    diff --git a/testsuite/pytests/test_regression_issue-1034.py b/testsuite/pytests/test_regression_issue-1034.py
    index 37ac672fd2..e1ee0a4c67 100644
    --- a/testsuite/pytests/test_regression_issue-1034.py
    +++ b/testsuite/pytests/test_regression_issue-1034.py
    @@ -51,7 +51,7 @@ def __init__(
             self.sim_time_ = self.max_t_sp_ + 5 * self.delay_
     
         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_
    @@ -94,7 +94,7 @@ def run_post_trace_test_nest_(self, show_all_nest_trace_samples=False):
             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")
    @@ -106,7 +106,7 @@ def run_post_trace_test_nest_(self, show_all_nest_trace_samples=False):
                 )
                 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_regression_issue-1409.py b/testsuite/pytests/test_regression_issue-1409.py
    index f27d94c12e..18ee2d230e 100644
    --- a/testsuite/pytests/test_regression_issue-1409.py
    +++ b/testsuite/pytests/test_regression_issue-1409.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 MultiplePoissonGeneratorsTestCase(unittest.TestCase):
         def test_multiple_poisson_generators(self):
             """Invariable number of spikes with multiple poisson generators"""
    @@ -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 ab0339a74d..2fc326d2b6 100644
    --- a/testsuite/pytests/test_regression_issue-2125.py
    +++ b/testsuite/pytests/test_regression_issue-2125.py
    @@ -23,15 +23,15 @@
     
     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 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 190d67a4e6..42d2c29341 100644
    --- a/testsuite/pytests/test_regression_issue-2480.py
    +++ b/testsuite/pytests/test_regression_issue-2480.py
    @@ -32,7 +32,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_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index ed21a55064..7a0f38a564 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"})
     
     
    @@ -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})
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index 787a568ee5..7f0a42ef30 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -26,10 +26,9 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_GSL, "GSL is not available")
     class SiegertNeuronTestCase(unittest.TestCase):
         """
    @@ -60,7 +59,7 @@ def setUp(self):
             self.start = 100.0
     
             # reset kernel
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.dt
             nest.use_wfr = False
    @@ -101,22 +100,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_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 = 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_sonata.py b/testsuite/pytests/test_sonata.py
    index 7497c64a74..953bcbfeb8 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -22,26 +22,17 @@
     from pathlib import Path
     
     import nest
    +import numpy as np
     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]
     
    -# 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/pynest", "../../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"
    -    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
    @@ -75,6 +66,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 = spike_data["times"]
    +    post_times = srec.events["times"]
         assert post_times.size == EXPECTED_NUM_SPIKES
    diff --git a/testsuite/pytests/test_sp/test_conn_builder.py b/testsuite/pytests/test_sp/test_conn_builder.py
    index d2346d4304..266dbcafee 100644
    --- a/testsuite/pytests/test_sp/test_conn_builder.py
    +++ b/testsuite/pytests/test_sp/test_conn_builder.py
    @@ -39,7 +39,7 @@ def test_synapse_initialisation_one_to_one(self):
                 {"synaptic_elements": {"SE1": {"z": 0.0, "growth_rate": 0.0}, "SE2": {"z": 0.0, "growth_rate": 0.0}}},
             )
             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"])
    @@ -53,7 +53,7 @@ def test_synapse_initialisation_all_to_all(self):
                 {"synaptic_elements": {"SE1": {"z": 0.0, "growth_rate": 0.0}, "SE2": {"z": 0.0, "growth_rate": 0.0}}},
             )
             nest.Connect(neurons, neurons, "all_to_all", syn_dict)
    -        status_list = nest.GetStatus(neurons, "synaptic_elements")
    +        status_list = neurons.synaptic_elements
             for status in status_list:
                 self.assertEqual(2, status["SE1"]["z_connected"])
                 self.assertEqual(2, status["SE2"]["z_connected"])
    @@ -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.kernel.NESTError as e:
    -                msg = "This connection rule is not implemented for structural plasticity"
    -                self.assertRegex(str(e), msg)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py
    index 79ad552435..fd92bae31d 100644
    --- a/testsuite/pytests/test_sp/test_disconnect.py
    +++ b/testsuite/pytests/test_sp/test_disconnect.py
    @@ -30,14 +30,14 @@
     except ImportError:
         have_mpi4py = False
     
    -have_mpi = nest.ll_api.sli_func("statusdict/have_mpi ::")
    +have_mpi = nest.build_info["have_mpi"]
     test_with_mpi = have_mpi and have_mpi4py and nest.num_processes > 1
     
     
     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()
    @@ -111,7 +111,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_sp/test_disconnect_multiple.py b/testsuite/pytests/test_sp/test_disconnect_multiple.py
    index a3eeebf0ed..c3d81ae2bf 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",
    @@ -87,7 +87,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"])
    @@ -101,7 +101,7 @@ def test_multiple_synapse_deletion_all_to_all(self):
                     conndictionary = {"rule": "all_to_all"}
                     syndictionary = {"synapse_model": syn_model}
                     nest.Disconnect(src_neurons, tgt_neurons, conn_spec=conndictionary, syn_spec=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"])
    @@ -134,7 +134,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"])
    @@ -148,7 +148,7 @@ def test_multiple_synapse_deletion_one_to_one(self):
                     conndictionary = {"rule": "one_to_one"}
                     syndictionary = {"synapse_model": syn_model}
                     nest.Disconnect(src_neurons, tgt_neurons, conn_spec=conndictionary, syn_spec=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"])
    @@ -199,7 +199,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"])
    @@ -210,7 +210,7 @@ def test_single_synapse_deletion_sp(self):
                     conns = nest.GetConnections(neurons[srcId], neurons[targId], syn_model)
                     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_enable_multithread.py b/testsuite/pytests/test_sp/test_enable_multithread.py
    index e4fad99d08..3a2d32313a 100644
    --- a/testsuite/pytests/test_sp/test_enable_multithread.py
    +++ b/testsuite/pytests/test_sp/test_enable_multithread.py
    @@ -30,21 +30,21 @@
     # 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_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 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):
             nest.ResetKernel()
             nest.EnableStructuralPlasticity()
             # Setting multiple threads when structural plasticity is enabled should
             # throw an exception
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.local_num_threads = 2
     
         def test_multithread_enable(self):
    @@ -52,7 +52,7 @@ def test_multithread_enable(self):
             nest.local_num_threads = 2
             # Setting multiple threads when structural plasticity is enabled should
             # throw an exception
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.EnableStructuralPlasticity()
     
     
    diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py
    index 09f51dcb7a..1c59944301 100644
    --- a/testsuite/pytests/test_sp/test_growth_curves.py
    +++ b/testsuite/pytests/test_sp/test_growth_curves.py
    @@ -27,7 +27,7 @@
     from numpy import testing
     from scipy.integrate import quad
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
     class SynapticElementIntegrator:
    @@ -256,7 +256,7 @@ def growth_curve(self, t):
             return self.growth_rate * ((2.0 / (1.0 + math.exp((self.get_ca(t) - self.eps) / self.psi))) - 1.0)
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestGrowthCurve(unittest.TestCase):
         """
         Unittest class to test the GrowthCurve used with nest
    @@ -266,7 +266,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
     
    @@ -286,8 +286,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):
    @@ -299,15 +298,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 = self.pop[n_i].get(["Ca", "synaptic_elements"])
    +                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"]
    +        tmp = self.spike_recorder.events
    +        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]
    @@ -329,15 +327,14 @@ def test_linear_growth_curve(self):
             tau_ca = 10000.0
             growth_rate = 0.0001
             eps = 0.10
    -        nest.SetStatus(
    -            self.pop,
    +        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(tau_ca=tau_ca, beta_ca=beta_ca, eps=eps, growth_rate=growth_rate))
    @@ -376,15 +373,14 @@ def test_gaussian_growth_curve(self):
             growth_rate = 0.0001
             eta = 0.05
             eps = 0.10
    -        nest.SetStatus(
    -            self.pop,
    +        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_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_sp/test_sp_manager.py b/testsuite/pytests/test_sp/test_sp_manager.py
    index 4631b613ab..0043c7817a 100644
    --- a/testsuite/pytests/test_sp/test_sp_manager.py
    +++ b/testsuite/pytests/test_sp/test_sp_manager.py
    @@ -33,7 +33,7 @@ def extract_dict_a_from_b(a, b):
     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",
    @@ -135,7 +135,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 b2dd91d223..7bd0d9891d 100644
    --- a/testsuite/pytests/test_sp/test_synaptic_elements.py
    +++ b/testsuite/pytests/test_sp/test_synaptic_elements.py
    @@ -24,31 +24,29 @@
     import nest
     from testutil import dict_is_subset_of
     
    -__author__ = "naveau"
    -
     
     class TestSynapticElements(unittest.TestCase):
         def setUp(self):
             nest.ResetKernel()
     
    -    def test_set_status(self):
    +    def test_set(self):
             synaptic_element_dict = {"SE": {"z": 15.0, "growth_curve": "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.assertTrue(dict_is_subset_of(synaptic_element_dict["SE"], neuron_synaptic_elements["SE"]))
     
    -    def test_set_status_overwrite(self):
    +    def test_set_overwrite(self):
             synaptic_element_dict1 = {"SE1": {"z": 15.0, "growth_curve": "linear"}}
             synaptic_element_dict2 = {"SE2": {"z": 10.0, "growth_curve": "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.set({"synaptic_elements": synaptic_element_dict1})
    +        neuron.set({"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.assertTrue(dict_is_subset_of(synaptic_element_dict2["SE2"], neuron_synaptic_elements["SE2"]))
    @@ -58,7 +56,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.assertTrue(dict_is_subset_of(synaptic_element_dict["SE"], neuron_synaptic_elements["SE"]))
     
    @@ -70,7 +68,7 @@ def test_set_defaults_overwrite(self):
             nest.SetDefaults("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.assertTrue(dict_is_subset_of(synaptic_element_dict2["SE2"], neuron_synaptic_elements["SE2"]))
    diff --git a/testsuite/pytests/test_sp/test_update_synaptic_elements.py b/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    index b74c807a10..02e2b9e834 100644
    --- a/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    +++ b/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    @@ -50,9 +50,8 @@ def test_update_synaptic_elements(self):
             }
             elements_to_update = {"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)
     
    @@ -60,8 +59,8 @@ def test_update_synaptic_elements(self):
             self.assertTrue(structural_p_elements["Den_ex"], neuron_synaptic_elements["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_basics.py b/testsuite/pytests/test_spatial/test_basics.py
    index a9c5addbe0..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):
    @@ -54,7 +49,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))
     
    @@ -78,9 +73,8 @@ 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):
             """Interface check on displacement calculations."""
             lshape = [5, 4]
    @@ -90,7 +84,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, 0.0) for dd in d))
    +        self.assertTrue(all(dd == [0.0, 0.0] for dd in d))
     
             # single node ID -> node IDs
             d = nest.Displacement(layer[:1], layer)
    @@ -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(tuple(all_positions), nodes.spatial["positions"])
    -        self.assertEqual(tuple(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 2357036e69..24ec7cc431 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -34,7 +34,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     class ConnectLayersTestCase(unittest.TestCase):
    @@ -357,7 +357,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.kernel.NESTError):
    +            with self.assertRaises(ValueError):
                     nest.Connect(self.layer, self.layer, conn_spec)
     
         def test_connect_oversized_mask(self):
    @@ -366,7 +366,7 @@ def test_connect_oversized_mask(self):
                 "iaf_psc_alpha", positions=nest.spatial.free([[0.0, 0.0]], edge_wrap=True, extent=[1.0, 1.0])
             )
             conn_spec = {"rule": "pairwise_bernoulli", "p": 1.0, "mask": {"circular": {"radius": 2.0}}}
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Connect(free_layer, free_layer, conn_spec)
             self.assertEqual(nest.num_connections, 0)
             conn_spec["allow_oversized_mask"] = True
    @@ -382,7 +382,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 = 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())
    @@ -396,7 +396,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 = 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 a3236b0d84..35efd2be80 100644
    --- a/testsuite/pytests/test_spatial/test_connect_sliced.py
    +++ b/testsuite/pytests/test_spatial/test_connect_sliced.py
    @@ -26,9 +26,9 @@
     
     import nest
     import numpy as np
    -import numpy.testing as np_testing
    +import numpy.testing as nptest
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     class ConnectSlicedSpatialTestCase(unittest.TestCase):
    @@ -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 6ba23a93ee..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,14 +83,14 @@ 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."""
             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):
    @@ -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_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_spatial/test_layerNodeCollection.py b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    index b13b62b719..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):
    @@ -38,18 +39,18 @@ def test_addLayerAndNodeCollection(self):
             nodes = nest.Create("iaf_psc_alpha", 10)
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[5, 5]))
     
    -        with self.assertRaises(nest.kernel.NESTError):
    -            c = nodes + layer  # noqa: F841
    -        with self.assertRaises(nest.kernel.NESTError):
    -            d = layer + nodes  # noqa: F841
    +        with self.assertRaises(nest.NESTError):
    +            c = nodes + layer
    +        with self.assertRaises(nest.NESTError):
    +            d = layer + nodes
     
         def test_addTwoLayers(self):
             "Test that concatenation of two layers is illegal"
             layer1 = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[5, 5]))
             layer2 = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[5, 5]))
     
    -        with self.assertRaises(nest.kernel.NESTError):
    -            c = layer1 + layer2  # noqa: F841
    +        with self.assertRaises(nest.NESTError):
    +            c = layer1 + layer2
     
         def test_extent_center_mask(self):
             """Correct extent and center when connecting with mask"""
    @@ -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)
     
    @@ -96,7 +95,7 @@ def test_extent_center_single(self):
             param = nest.random.uniform(-r, r)
             free_positions = nest.spatial.free(param, num_dimensions=2, edge_wrap=True)
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Create("iaf_psc_alpha", positions=free_positions)
     
             extent = [2 * r, 2 * r]
    @@ -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"], tuple(extent))
    +        nptest.assert_array_equal(spatial["center"], spatial["positions"][0])
    +        nptest.assert_array_equal(spatial["extent"], extent)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py b/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py
    deleted file mode 100644
    index b36bd24f42..0000000000
    --- a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py
    +++ /dev/null
    @@ -1,125 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# test_layer_GetStatus_SetStatus.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/>.
    -
    -"""
    -Tests for GetStatus, SetStatus, get and set calls for layer NodeCollections.
    -"""
    -
    -import unittest
    -
    -import nest
    -
    -
    -class GetSetTestCase(unittest.TestCase):
    -    def setUp(self):
    -        nest.ResetKernel()
    -
    -    def test_LayerSetStatus(self):
    -        """Test SetStatus on layer NodeCollection."""
    -
    -        layer = nest.Create(
    -            "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):
    -            nest.SetStatus(layer, {"center": [1.0, 1.0]})
    -
    -        nest.SetStatus(layer, "V_m", -50.0)
    -
    -        self.assertEqual(nest.GetStatus(layer, "V_m"), (-50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0))
    -
    -    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)
    -        )
    -
    -        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]
    -
    -        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)
    -
    -        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_SingleElementLayerSpatial(self):
    -        """Test spatial parameter on single element layer."""
    -
    -        layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[1, 1]))
    -
    -        self.assertEqual(len(layer), 1)
    -        center = layer.spatial["center"]
    -        columns = layer.spatial["shape"][0]
    -        all_values = layer.spatial
    -
    -        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"""
    -
    -        layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[2, 2]))
    -
    -        self.assertEqual(layer.get("V_m"), (-70.0, -70.0, -70.0, -70.0))
    -
    -    def test_LayerSet(self):
    -        """Test set function on layer NodeCollection."""
    -
    -        layer = nest.Create(
    -            "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):
    -            layer.set({"center": [1.0, 1.0]})
    -
    -        layer.set(V_m=-50.0)
    -
    -        self.assertEqual(layer.get("V_m"), (-50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0))
    -
    -
    -def suite():
    -    suite = unittest.makeSuite(GetSetTestCase, "test")
    -    return suite
    -
    -
    -if __name__ == "__main__":
    -    runner = unittest.TextTestRunner(verbosity=2)
    -    runner.run(suite())
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    new file mode 100644
    index 0000000000..5cd59a9dc3
    --- /dev/null
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -0,0 +1,153 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_layer_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/>.
    +
    +"""
    +Tests for ``get`` and ``set`` functions for spatial ``NodeCollection``.
    +"""
    +
    +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)
    +
    +
    +def test_layer_set_attribute_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.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)
    +
    +
    +def test_layer_set_nonexistent_param_raises():
    +    """Test that ``set`` with non-existent parameter raises exception."""
    +
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=[3, 3],
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
    +
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        layer.set(center=[1.0, 1.0])
    +
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        layer.center = [1.0, 1.0]
    +
    +
    +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]))
    +
    +    nptest.assert_equal(layer.get("V_m"), -70.0)
    +
    +
    +@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,
    +        ),
    +    )
    +    nptest.assert_equal(layer.spatial[spatial_param], expected_value)
    +
    +
    +def test_layer_get_all_spatial_params_at_once():
    +    """Test getting all spatial parameters on layered ``NodeCollection`` at once."""
    +
    +    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]))
    +
    +    assert len(layer) == 1
    +
    +    center = layer.spatial["center"]
    +    columns = layer.spatial["shape"][0]
    +    all_spatial_params = layer.spatial
    +
    +    nptest.assert_equal(center, [0.0, 0.0])
    +    assert columns == 1
    +    nptest.assert_equal(all_spatial_params["center"], [0.0, 0.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 d10c0b2dbf..ab81545101 100644
    --- a/testsuite/pytests/test_spatial/test_parameter_apply.py
    +++ b/testsuite/pytests/test_spatial/test_parameter_apply.py
    @@ -45,7 +45,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)
     
     
    @@ -103,7 +103,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_spatial/test_rotated_rect_mask.py b/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    index 8412c9c931..dd4a6a8c10 100644
    --- a/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    +++ b/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    @@ -124,7 +124,7 @@ def test_RotatedRectangularMask(self):
             # Test that an error is raised if we send in a polar angle to a 2D
             # mask.
             maskdict = {"lower_left": [-1.5, -0.5], "upper_right": [1.5, 0.5], "polar_angle": 45.0}
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 mask = nest.CreateMask("rectangular", maskdict)
     
         def test_RotatedBoxMaskByAzimuthAngle(self):
    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_spike_train_injector.py b/testsuite/pytests/test_spike_train_injector.py
    index 07e000b0d6..55fba3e095 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",
    @@ -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_spike_transmission.py b/testsuite/pytests/test_spike_transmission.py
    index 58b95e7f1a..d738c452c4 100644
    --- a/testsuite/pytests/test_spike_transmission.py
    +++ b/testsuite/pytests/test_spike_transmission.py
    @@ -24,19 +24,19 @@
     """
     
     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
     # 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.
    @@ -92,8 +92,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)
    +
    +        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])
    @@ -108,8 +109,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)
    +
    +        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])
    @@ -124,9 +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 all(spike_data["senders"] == num_neurons * post_pop.tolist())
    -        assert all(spike_data["times"] == self.t_arrival)
    +        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])
    @@ -143,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(spike_data["times"] == self.t_arrival)
    +
    +        nptest.assert_array_equal(sorted(spike_data["senders"]), sorted(num_neurons * post_pop.tolist()))
    +        nptest.assert_equal(spike_data["times"], self.t_arrival)
    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)
    diff --git a/testsuite/pytests/test_stack.py b/testsuite/pytests/test_stack.py
    deleted file mode 100644
    index 54c94657b5..0000000000
    --- a/testsuite/pytests/test_stack.py
    +++ /dev/null
    @@ -1,177 +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 <http://www.gnu.org/licenses/>.
    -
    -"""
    -Stack tests
    -"""
    -
    -import unittest
    -from array import array
    -
    -import nest
    -
    -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.0, 2.0, 3.0]))
    -        self.assertTrue((nest.ll_api.spp() == numpy.array((1.0, 2.0, 3.0))).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.0, 2.0, 3.0))[1]
    -        a3 = numpy.array(2)
    -        a4 = numpy.array(2.0)
    -
    -        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.0)
    -
    -    @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_status.py b/testsuite/pytests/test_status.py
    index ca4916b4b4..33c0bdc591 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -19,18 +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
     
     
    -@nest.ll_api.check_stack
     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"""
    @@ -88,7 +83,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")
    @@ -114,107 +109,7 @@ def test_SetDefaults(self):
                     self.assertEqual(nest.GetDefaults(model, "V_m"), v_m)
     
                     self.assertRaisesRegex(
    -                    nest.kernel.NESTError, "DictError", nest.SetDefaults, model, "nonexistent_status_key", 0
    -                )
    -
    -    def test_GetStatus(self):
    -        """GetStatus"""
    -
    -        for model in nest.node_models:
    -            if "V_m" in nest.GetDefaults(model):
    -                nest.ResetKernel()
    -
    -                n = nest.Create(model)
    -
    -                d = nest.GetStatus(n)
    -                self.assertIsInstance(d, tuple)
    -                self.assertIsInstance(d[0], dict)
    -                self.assertGreater(len(d[0]), 1)
    -
    -                v1 = nest.GetStatus(n)[0]["V_m"]
    -                v2 = nest.GetStatus(n, "V_m")[0]
    -                self.assertEqual(v1, v2)
    -
    -                n = nest.Create(model, 10)
    -                d = nest.GetStatus(n, "V_m")
    -                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"""
    -
    -        for model in nest.node_models:
    -            if "V_m" in nest.GetDefaults(model):
    -                nest.ResetKernel()
    -                n = nest.Create(model)
    -                nest.SetStatus(n, {"V_m": 1.0})
    -                self.assertEqual(nest.GetStatus(n, "V_m")[0], 1.0)
    -
    -    def test_SetStatusList(self):
    -        """SetStatus with list"""
    -
    -        for model in nest.node_models:
    -            if "V_m" in nest.GetDefaults(model):
    -                nest.ResetKernel()
    -                n = nest.Create(model)
    -                nest.SetStatus(n, [{"V_m": 2.0}])
    -                self.assertEqual(nest.GetStatus(n, "V_m")[0], 2.0)
    -
    -    def test_SetStatusParam(self):
    -        """SetStatus with parameter"""
    -
    -        for model in nest.node_models:
    -            if "V_m" in nest.GetDefaults(model):
    -                nest.ResetKernel()
    -                n = nest.Create(model)
    -                nest.SetStatus(n, "V_m", 3.0)
    -                self.assertEqual(nest.GetStatus(n, "V_m")[0], 3.0)
    -
    -    def test_SetStatusVth_E_L(self):
    -        """SetStatus of reversal and threshold potential"""
    -
    -        excluded = ["a2eif_cond_exp_HW", "mat2_psc_exp", "amat2_psc_exp"]
    -        models = nest.node_models + nest.synapse_models
    -
    -        for model in [m for m in models if m not in excluded]:
    -            if all(key in nest.GetDefaults(model) for key in ("V_th", "E_L")):
    -                nest.ResetKernel()
    -
    -                neuron1 = nest.Create(model)
    -                neuron2 = nest.Create(model)
    -
    -                # must not depend on the order
    -                new_EL = -90.0
    -                new_Vth = -10.0
    -
    -                if "V_reset" in nest.GetDefaults(model):
    -                    nest.SetStatus(neuron1 + neuron2, {"V_reset": new_EL})
    -
    -                nest.SetStatus(neuron1, {"E_L": new_EL})
    -                nest.SetStatus(neuron2, {"V_th": new_Vth})
    -                nest.SetStatus(neuron1, {"V_th": new_Vth})
    -                nest.SetStatus(neuron2, {"E_L": new_EL})
    -                vth1, vth2 = nest.GetStatus(neuron1 + neuron2, "V_th")
    -                self.assertEqual(vth1, vth2)
    -
    -    def test_SetStatusV_th_smaller_V_reset(self):
    -        """SetStatus of reversal and threshold potential
    -        check if error is raised if V_reset > V_th"""
    -
    -        for model in nest.node_models + nest.synapse_models:
    -            if all(key in nest.GetDefaults(model) for key in ("V_th", "V_reset")):
    -                nest.ResetKernel()
    -
    -                neuron = nest.Create(model)
    -
    -                # should raise exception
    -                self.assertRaisesRegex(
    -                    nest.kernel.NESTError, "BadProperty", nest.SetStatus, neuron, {"V_reset": 10.0, "V_th": 0.0}
    +                    nest.NESTError, "Unaccessed", nest.SetDefaults, model, "nonexistent_status_key", 0
                     )
     
     
    diff --git a/testsuite/pytests/test_stdp_multiplicity.py b/testsuite/pytests/test_stdp_multiplicity.py
    index 465ee52f0a..263192244d 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.
    @@ -113,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
    @@ -121,7 +120,7 @@ def run_protocol(self, pre_post_shift):
             # k spikes will be emitted at these two times
             pre_spike_times_base = [100.0, 200.0]
     
    -        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 7707b525d9..51931e7cf8 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -29,7 +29,6 @@
     import pytest
     
     
    -@nest.ll_api.check_stack
     class TestSTDPNNSynapses:
         """
         Test the weight change by STDP
    @@ -89,9 +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=synapse_model + " test: "
    -            "Resulting synaptic weight %e "
    -            "differs from expected %e" % (weight_by_nest, weight_reproduced_independently),
             )
     
         def do_the_nest_simulation(self):
    @@ -100,7 +96,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
     
    @@ -156,10 +152,12 @@ 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]
    +        all_spikes = spike_recorder.events
    +        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
             return (pre_spikes, post_spikes, weight)
     
         def reproduce_weight_drift(self, _pre_spikes, _post_spikes, _initial_weight):
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index 4243ccc004..48f306ba06 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.
    @@ -131,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(
                 {
    @@ -199,12 +198,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]]
    +        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 = 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_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index ccd0981c6d..1e5eef4526 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -41,7 +41,6 @@
     RESOLUTION = 0.1  # [ms]
     
     
    -@nest.ll_api.check_stack
     class TestSTDPSynapse:
         """
         Compare the STDP synaptic plasticity model against a self-contained Python reference.
    @@ -150,7 +149,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(
                 {
    @@ -208,7 +207,9 @@ def do_the_nest_simulation(self):
                 syn_spec={"synapse_model": "static_synapse", "weight": 3000.0},
             )
             nest.Connect(
    -            presynaptic_neuron + postsynaptic_neuron, spike_recorder, syn_spec={"synapse_model": "static_synapse"}
    +            presynaptic_neuron + postsynaptic_neuron,
    +            spike_recorder,
    +            syn_spec={"synapse_model": "static_synapse"},
             )
     
             # The synapse of interest itself
    @@ -218,12 +219,14 @@ 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]]
    +        all_spikes = spike_recorder.events
    +        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 = 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
     
    @@ -233,7 +236,10 @@ def reproduce_weight_drift(self, pre_spikes, post_spikes, initial_weight, fname_
             def facilitate(w, Kpre):
                 norm_w = (w / self.synapse_parameters["Wmax"]) + (
                     self.synapse_parameters["lambda"]
    -                * pow(1 - (w / self.synapse_parameters["Wmax"]), self.synapse_parameters["mu_plus"])
    +                * pow(
    +                    1 - (w / self.synapse_parameters["Wmax"]),
    +                    self.synapse_parameters["mu_plus"],
    +                )
                     * Kpre
                 )
                 if norm_w < 1.0:
    @@ -245,7 +251,10 @@ def depress(w, Kpost):
                 norm_w = (w / self.synapse_parameters["Wmax"]) - (
                     self.synapse_parameters["alpha"]
                     * self.synapse_parameters["lambda"]
    -                * pow(w / self.synapse_parameters["Wmax"], self.synapse_parameters["mu_minus"])
    +                * pow(
    +                    w / self.synapse_parameters["Wmax"],
    +                    self.synapse_parameters["mu_minus"],
    +                )
                     * Kpost
                 )
                 if norm_w > 0.0:
    diff --git a/testsuite/pytests/test_stdp_triplet_synapse.py b/testsuite/pytests/test_stdp_triplet_synapse.py
    index e311298c59..afed1bb3b5 100644
    --- a/testsuite/pytests/test_stdp_triplet_synapse.py
    +++ b/testsuite/pytests/test_stdp_triplet_synapse.py
    @@ -28,12 +28,11 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     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
    @@ -113,8 +112,8 @@ def setupProperty(property):
                 nest.Connect(self.pre_neuron, self.post_neuron, syn_spec=bad_syn_spec)
     
             def badPropertyWith(content, parameters):
    -            msg = "BadProperty(.+)" + content
    -            self.assertRaisesRegex(nest.kernel.NESTError, msg, setupProperty, parameters)
    +            msg = content
    +            self.assertRaisesRegex(nest.NESTError, msg, setupProperty, parameters)
     
             badPropertyWith("Kplus", {"Kplus": -1.0})
             badPropertyWith("Kplus_triplet", {"Kplus_triplet": -1.0})
    @@ -262,10 +261,9 @@ def test_maxWeightStaturatesWeight(self):
             self.assertAlmostEqualDetailed(limited_weight, self.status("weight"), "weight should have been limited")
     
     
    -@nest.ll_api.check_stack
     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 ab317adbba..80edd8f806 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -25,7 +25,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class StepRateGeneratorTestCase(unittest.TestCase):
         """
         Test whether the step_rate_generator produces and
    @@ -35,7 +34,7 @@ class StepRateGeneratorTestCase(unittest.TestCase):
         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
    @@ -47,7 +46,7 @@ def test_step_rate_generator(self):
             mm = nest.Create("multimeter", params={"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", {"synapse_model": "rate_connection_delayed", "weight": 1.0})
    @@ -58,9 +57,10 @@ def test_step_rate_generator(self):
             nest.Simulate(301.0)
     
             # 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"))])
    +        data = mm.events
    +        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_synapsecollection.py b/testsuite/pytests/test_synapsecollection.py
    index 67a590d4d8..fda1fc8e0d 100644
    --- a/testsuite/pytests/test_synapsecollection.py
    +++ b/testsuite/pytests/test_synapsecollection.py
    @@ -35,7 +35,6 @@
         HAVE_PANDAS = False
     
     
    -@nest.ll_api.check_stack
     class TestSynapseCollection(unittest.TestCase):
         """SynapseCollection tests"""
     
    @@ -86,7 +85,7 @@ def test_get_set(self):
             self.assertEqual(delay, [11.0, 11.0, 11.0, 11.0])
             self.assertEqual(weight, [6.0, 6.0, 6.0, 6.0])
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 get_conns.set(source=2)
     
             nest.ResetKernel()
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index dc3d2840cc..36bb965627 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -28,14 +28,13 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class ThreadTestCase(unittest.TestCase):
         """Tests for multi-threading"""
     
         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.build_info["have_threads"]
     
         def test_Threads(self):
             """Multiple threads"""
    @@ -48,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 +100,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_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,
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index fdc8803586..f8f92d865b 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -25,7 +25,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class Tsodyks2SynapseTest(unittest.TestCase):
         """
         Functional test for the "tsodyks2" synapse: compare NEST implementation to
    @@ -66,7 +65,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
     
    @@ -95,10 +94,11 @@ 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 = 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 bff1e45789..989f44744b 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(
    @@ -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)
    @@ -185,7 +186,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")
    @@ -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 0b057fdd0a..e47ea80f2d 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -28,10 +28,9 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    +HAVE_GSL = nest.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"""
    @@ -39,7 +38,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"]
    @@ -70,7 +69,7 @@ def test_ConnectNeuronsWithUrbanczikSynapse(self):
                 n = nest.Create(nm, 2)
     
                 # try to connect with urbanczik synapse
    -            with self.assertRaises(nest.kernel.NESTError):
    +            with self.assertRaises(nest.NESTError):
                     nest.Connect(
                         n, n, {"rule": "all_to_all"}, {"synapse_model": "urbanczik_synapse", "receptor_type": r_type}
                     )
    @@ -78,15 +77,13 @@ 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
             nest.resolution = resolution
     
    -        """
    -        neuron parameters
    -        """
    +        # neuron parameters
             nrn_model = "pp_cond_exp_mc_urbanczik"
             nrn_params = {
                 "t_ref": 3.0,  # refractory period
    @@ -116,9 +113,7 @@ def test_SynapseDepressionFacilitation(self):
                 "theta": -55.0,
             }
     
    -        """
    -        synapse params
    -        """
    +        # synapse params
             syns = nest.GetDefaults(nrn_model)["receptor_types"]
             init_w = 100.0
             syn_params = {
    @@ -131,9 +126,7 @@ def test_SynapseDepressionFacilitation(self):
                 "delay": resolution,
             }
     
    -        """
    -        neuron and devices
    -        """
    +        # neuron and devices
             nest.SetDefaults(nrn_model, nrn_params)
             nrn = nest.Create(nrn_model)
     
    @@ -147,9 +140,8 @@ def test_SynapseDepressionFacilitation(self):
             # 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"]
    @@ -161,30 +153,19 @@ def test_SynapseDepressionFacilitation(self):
             # for recording the spiking of the soma
             sr_soma = nest.Create("spike_recorder")
     
    -        """
    -        create connections
    -        """
    +        # 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})
     
    -        """
    -        simulation
    -        """
             nest.Simulate(100.0)
     
    -        """
    -        read out devices
    -        """
             # multimeter
    -        rec = nest.GetStatus(mm)[0]["events"]
    +        rec = mm.events
             t = rec["times"]
             V_w = rec["V_m.p"]
     
    @@ -195,11 +176,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)
    -        weights = data[0]["events"]["weights"]
    +        data = wr.events
    +        senders = data["senders"]
    +        targets = data["targets"]
    +        weights = data["weights"]
    +        times = data["times"]
     
             # spike recorder
    -        data = nest.GetStatus(sr_soma)[0]["events"]
    +        data = sr_soma.events
             spike_times_soma = data["times"]
     
             # compute predicted rate
    @@ -250,7 +234,6 @@ def test_SynapseDepressionFacilitation(self):
             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)
    -
             self.assertTrue(abs(realtive_error) < 0.001)
     
     
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index ee9d465c8b..5ac62a1d8e 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -90,11 +90,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())
    @@ -106,11 +106,11 @@ 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)
    -        nest.Simulate(100)
    +        nest.Simulate(100.0)
     
             # Test with data from device
             plt.close("all")
    @@ -118,7 +118,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"]
    @@ -133,7 +133,8 @@ 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})
    +        nest.overwrite_files = True
    +        pg = nest.Create("poisson_generator", params={"rate": 1000.0})
             sr = nest.Create("spike_recorder")
             if to_file:
                 parrot = nest.Create("parrot_neuron")
    @@ -142,10 +143,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):
    @@ -164,34 +165,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 = sr.events["times"]
    +        senders = 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)
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index fa4e748667..997d428865 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -27,13 +27,12 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class VogelsSprekelerConnectionTestCase(unittest.TestCase):
         """Check vogels_sprekeler_synapse model properties."""
     
         def setUp(self):
             """Set up the test."""
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # settings
    @@ -96,8 +95,8 @@ def setupProperty(property):
                 nest.Connect(self.pre_neuron, self.post_neuron, syn_spec=bad_syn_spec)
     
             def badPropertyWith(content, parameters):
    -            msg = "BadProperty(.+)" + content
    -            self.assertRaisesRegex(nest.kernel.NESTError, msg, setupProperty, parameters)
    +            msg = content
    +            self.assertRaisesRegex(nest.NESTError, msg, setupProperty, parameters)
     
             badPropertyWith("Kplus", {"Kplus": -1.0})
     
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index 36309374e1..be482fec6e 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -28,12 +28,11 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::")
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_GSL = nest.build_info["have_gsl"]
    +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 WeightRecorderTestCase(unittest.TestCase):
         """Tests for the Weight Recorder"""
     
    @@ -76,13 +75,14 @@ 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 = nest.GetStatus(wr, "events")[0]["weights"]
    +        wr_weights = wr.events["weights"]
     
             self.addTypeEqualityFunc(type(wr_weights), self.is_subset)
             self.assertEqual(wr_weights, weights)
     
    +    @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
         def testMultipleThreads(self):
             """Weight Recorder Multi Threaded"""
     
    @@ -104,9 +104,9 @@ 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 = 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,15 +127,15 @@ 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([])
             for i in range(100):
                 nest.Simulate(1)
    -            senders = np.append(senders, connections.get("source"))
    +            senders = np.append(senders, connections.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)
    @@ -156,15 +156,15 @@ 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([])
             for i in range(100):
                 nest.Simulate(1)
    -            targets = np.append(targets, connections.get("target"))
    +            targets = np.append(targets, connections.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)
    @@ -185,7 +185,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)
    @@ -195,9 +195,9 @@ 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 = nest.GetStatus(wr, "events")[0]["targets"]
    +        wr_targets = wr.events["targets"]
     
             self.addTypeEqualityFunc(type(wr_targets), self.is_subset)
             self.assertEqual(wr_targets, targets)
    @@ -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"""
    @@ -263,7 +267,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"]
    @@ -303,14 +307,14 @@ 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)
     
    -        wr_events = nest.GetStatus(wr, "events")[0]
    +        wr_events = wr.events
             senders = wr_events["senders"]
             targets = wr_events["targets"]
             rports = wr_events["receptors"]
    diff --git a/testsuite/pytests/test_weights_as_lists.py b/testsuite/pytests/test_weights_as_lists.py
    index ec9cc08199..b6042765f1 100644
    --- a/testsuite/pytests/test_weights_as_lists.py
    +++ b/testsuite/pytests/test_weights_as_lists.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class WeightsAsListTestCase(unittest.TestCase):
         """Test weights given as lists"""
     
    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)
    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-737-threads.sli b/testsuite/regressiontests/issue-737-threads.sli
    deleted file mode 100644
    index 751c073629..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 << /volume_transmitter 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 << /volume_transmitter 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 << /volume_transmitter 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 << /volume_transmitter 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-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-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/sli2py_ignore/issue-2052.sli b/testsuite/regressiontests/sli2py_ignore/issue-2052.sli
    deleted file mode 100644
    index a704d5cddb..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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/sli2py_ignore/ticket-235.sli b/testsuite/regressiontests/sli2py_ignore/ticket-235.sli
    deleted file mode 100644
    index ede7b9e3f5..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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
    diff --git a/testsuite/regressiontests/sli2py_ignore/ticket-475.sli b/testsuite/regressiontests/sli2py_ignore/ticket-475.sli
    deleted file mode 100644
    index e0b71b5f26..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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
    diff --git a/testsuite/regressiontests/sli2py_ignore/ticket-537.sli b/testsuite/regressiontests/sli2py_ignore/ticket-537.sli
    deleted file mode 100644
    index 8ff0fedb33..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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 occurred 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
    diff --git a/testsuite/regressiontests/sli2py_ignore/ticket-580.sli b/testsuite/regressiontests/sli2py_ignore/ticket-580.sli
    deleted file mode 100644
    index 20c3be0f42..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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/sli2py_ignore/ticket-733.sli b/testsuite/regressiontests/sli2py_ignore/ticket-733.sli
    deleted file mode 100644
    index 0624e5583a..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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
    diff --git a/testsuite/regressiontests/sli2py_ignore/ticket-777.sli b/testsuite/regressiontests/sli2py_ignore/ticket-777.sli
    deleted file mode 100644
    index e1053b7b4d..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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/sli2py_ignore/ticket-784.sli b/testsuite/regressiontests/sli2py_ignore/ticket-784.sli
    deleted file mode 100644
    index 61163433da..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/ticket-784.sli
    +++ /dev/null
    @@ -1,43 +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/sli2py_ignore/ticket-785.sli b/testsuite/regressiontests/sli2py_ignore/ticket-785.sli
    deleted file mode 100644
    index 78c4461fb4..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/ticket-785.sli
    +++ /dev/null
    @@ -1,46 +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/sli2py_ignore/ticket-787.sli b/testsuite/regressiontests/sli2py_ignore/ticket-787.sli
    deleted file mode 100644
    index 3a6aead493..0000000000
    --- a/testsuite/regressiontests/sli2py_ignore/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-386.sli b/testsuite/regressiontests/ticket-386.sli
    deleted file mode 100644
    index b620443b72..0000000000
    --- a/testsuite/regressiontests/ticket-386.sli
    +++ /dev/null
    @@ -1,83 +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 a8ccb8b038..0000000000
    --- a/testsuite/regressiontests/ticket-421.sli
    +++ /dev/null
    @@ -1,104 +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 or require special resolution
    -/exclude_models [/aeif_cond_exp /aeif_cond_alpha /a2eif_cond_exp /a2eif_cond_exp_HW
    -                 /aeif_cond_alpha_multisynapse /aeif_psc_delta_clopath /aeif_cond_alpha_astro
    -                 /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
    -		             /eprop_iaf_bsshslm_2020 /eprop_iaf_adapt_bsshslm_2020 /eprop_readout_bsshslm_2020
    -		             /eprop_iaf /eprop_iaf_adapt /eprop_iaf_psc_delta /eprop_iaf_psc_delta_adapt /eprop_readout] def
    -
    -% use power-of-two resolution to avoid round-off 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-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-478.sli b/testsuite/regressiontests/ticket-478.sli
    deleted file mode 100644
    index 8a76febcc5..0000000000
    --- a/testsuite/regressiontests/ticket-478.sli
    +++ /dev/null
    @@ -1,124 +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 and sic_connections not relevant for spiking devices as senders
    -/excluded_synapses [ /gap_junction /sic_connection /rate_connection_delayed
    -                     /rate_connection_instantaneous ] 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-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-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-618.sli b/testsuite/regressiontests/ticket-618.sli
    deleted file mode 100644
    index fe56d45ebd..0000000000
    --- a/testsuite/regressiontests/ticket-618.sli
    +++ /dev/null
    @@ -1,123 +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
    -
    -/excluded_models [ /eprop_iaf_bsshslm_2020 /eprop_iaf_adapt_bsshslm_2020 /eprop_readout_bsshslm_2020
    -                   /eprop_iaf /eprop_iaf_adapt /eprop_iaf_psc_delta /eprop_iaf_psc_delta_adapt /eprop_readout /iaf_bw_2001 ] def
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    ResetKernel
    -
    -    /model Set
    -    /modelprops model GetDefaults def
    -
    -    /result true def % pass by default
    -
    -    % skip models without V_m
    -    excluded_models model MemberQ not
    -    modelprops /V_m known and
    -    {
    -      % 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 88cdacbc1c..0000000000
    --- a/testsuite/regressiontests/ticket-643.sli
    +++ /dev/null
    @@ -1,56 +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.
    -
    -*/
    -
    -skip_if_not_threaded
    -
    -(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 a6005cc2aa..0000000000
    --- a/testsuite/regressiontests/ticket-686-positive-parameters.sli
    +++ /dev/null
    @@ -1,197 +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
    -
    -% SLI2PY TODO: iaf_tum_2000 should be removed from skipped_models when porting
    -% this test. The reason it is skipped in the SLI version of the test, is that
    -% tau_fac can be set to 0.0 to turn facilitation off. The logic of the test
    -% needs to be updated to accommodate for this possibility.
    -
    -% 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
    -    /iaf_tum_2000   % tau_fac == 0 is permitted
    -    /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 540161899d..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
    -
    -/vt /volume_transmitter Create def
    -/stdp_dopamine_synapse << /volume_transmitter vt >> 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 vt 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-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-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-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-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 093d95670d..0000000000
    --- a/testsuite/regressiontests/ticket-85.sli
    +++ /dev/null
    @@ -1,117 +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? Needs only one neuron type
    -  /parrot_neuron_ps /model Set
    -  model ==
    -  { 
    -    ResetKernel
    -    /pg
    -      /poisson_generator_ps << /rate 100 >> 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 dup ==
    -    ini_weight dup == neq
    -  } assert_or_die
    -
    -     
    diff --git a/testsuite/regressiontests/ticket-881.sli b/testsuite/regressiontests/ticket-881.sli
    deleted file mode 100644
    index 7f2578dc52..0000000000
    --- a/testsuite/regressiontests/ticket-881.sli
    +++ /dev/null
    @@ -1,100 +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
    -*/
    -
    -
    -skip_if_not_threaded
    -
    -(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/run_test.sh b/testsuite/run_test.sh
    index 71f72f61f3..ff6a3c9937 100755
    --- a/testsuite/run_test.sh
    +++ b/testsuite/run_test.sh
    @@ -177,5 +177,4 @@ run_test ()
         fi
     
         rm -f "${TEST_OUTFILE}" "${TEST_RETFILE}"
    -
     }
    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/sli2py_ignore/CMakeLists.txt b/testsuite/unittests/sli2py_ignore/CMakeLists.txt
    deleted file mode 100644
    index 89e0e18cb3..0000000000
    --- a/testsuite/unittests/sli2py_ignore/CMakeLists.txt
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -# testsuite/unittests/sli2py_ignore/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/sli2py_ignore files
    -file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )
    -
    -foreach( script ${scripts} )
    -    add_test( NAME unittests/sli2py_ignore/${script}
    -        COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
    -        ${CMAKE_INSTALL_FULL_DOCDIR}/unittests/sli2py_ignore/${script} # use the installed version
    -    )
    -endforeach()
    diff --git a/testsuite/unittests/sli2py_ignore/test_DoubleVector_IntVector.sli b/testsuite/unittests/sli2py_ignore/test_DoubleVector_IntVector.sli
    deleted file mode 100644
    index d7fd37e6a9..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_DoubleVector_IntVector.sli
    +++ /dev/null
    @@ -1,89 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_Map.sli b/testsuite/unittests/sli2py_ignore/test_Map.sli
    deleted file mode 100644
    index dbe370dc77..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_Map.sli
    +++ /dev/null
    @@ -1,56 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_MapIndexed.sli b/testsuite/unittests/sli2py_ignore/test_MapIndexed.sli
    deleted file mode 100644
    index 34330d2f0e..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_MapIndexed.sli
    +++ /dev/null
    @@ -1,50 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_connect.sli b/testsuite/unittests/sli2py_ignore/test_connect.sli
    deleted file mode 100644
    index f89fac4aa8..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_connect.sli
    +++ /dev/null
    @@ -1,222 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -
    -/** @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/sli2py_ignore/test_cva.sli b/testsuite/unittests/sli2py_ignore/test_cva.sli
    deleted file mode 100644
    index ea72ca5b06..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_cva.sli
    +++ /dev/null
    @@ -1,53 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_cvi.sli b/testsuite/unittests/sli2py_ignore/test_cvi.sli
    deleted file mode 100644
    index cf9fdcf96f..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_cvi.sli
    +++ /dev/null
    @@ -1,58 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_dirname.sli b/testsuite/unittests/sli2py_ignore/test_dirname.sli
    deleted file mode 100644
    index 9e0d812602..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_dirname.sli
    +++ /dev/null
    @@ -1,73 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_fast_operators.sli b/testsuite/unittests/sli2py_ignore/test_fast_operators.sli
    deleted file mode 100644
    index 0841ef5ccf..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_fast_operators.sli
    +++ /dev/null
    @@ -1,55 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    - /** @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/sli2py_ignore/test_lambertw.sli b/testsuite/unittests/sli2py_ignore/test_lambertw.sli
    deleted file mode 100644
    index d57a5c1f1a..0000000000
    --- a/testsuite/unittests/sli2py_ignore/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/sli2py_ignore/test_message.sli b/testsuite/unittests/sli2py_ignore/test_message.sli
    deleted file mode 100644
    index 01554974c7..0000000000
    --- a/testsuite/unittests/sli2py_ignore/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/sli2py_ignore/test_round.sli b/testsuite/unittests/sli2py_ignore/test_round.sli
    deleted file mode 100644
    index 517a05a5a8..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_round.sli
    +++ /dev/null
    @@ -1,44 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_rows_cols_pos.sli b/testsuite/unittests/sli2py_ignore/test_rows_cols_pos.sli
    deleted file mode 100644
    index b87a2926f0..0000000000
    --- a/testsuite/unittests/sli2py_ignore/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/sli2py_ignore/test_sort.sli b/testsuite/unittests/sli2py_ignore/test_sort.sli
    deleted file mode 100644
    index 0f738bc2bd..0000000000
    --- a/testsuite/unittests/sli2py_ignore/test_sort.sli
    +++ /dev/null
    @@ -1,43 +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/>.
    - *
    - */
    -
    -% SLI2PY: Ignore
    -
    -/** @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/sli2py_ignore/test_spike_dilutor.sli b/testsuite/unittests/sli2py_ignore/test_spike_dilutor.sli
    deleted file mode 100644
    index 3f7c9f71d2..0000000000
    --- a/testsuite/unittests/sli2py_ignore/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_gamma_sup_generator.sli b/testsuite/unittests/test_gamma_sup_generator.sli
    deleted file mode 100644
    index 1128eb8ffa..0000000000
    --- a/testsuite/unittests/test_gamma_sup_generator.sli
    +++ /dev/null
    @@ -1,334 +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/>.
    - *
    - */
    -
    -
    -% SLI2PYComplexity: Medium
    -
    -/** @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_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 01baeba6b3..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 whether 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 wished 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 c47ac8ae1e..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 being 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 0c98944845..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
    -amplitude. 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_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_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_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_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_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