pynestml.cocos package¶
Submodules¶
pynestml.cocos.co_co module¶
- class pynestml.cocos.co_co.CoCo¶
Bases:
objectThis class represents an abstract super-class for all concrete context conditions to check. All concrete CoCos have to inherit from this class. Hereby, the description can be used to state the condition the CoCo checks. .. attribute:: description type
This field can be used to give a short description regarding the properties which are checked by this coco.
- type
str
- abstract check_co_co(node)¶
This is an abstract method which should be implemented by all concrete cocos. :param node: a single neuron instance on which the coco will be checked. :type node: ast_neuron :return: True, if CoCo holds, otherwise False. :rtype: bool
- description = None¶
pynestml.cocos.co_co_all_variables_defined module¶
pynestml.cocos.co_co_continuous_input_port_not_qualified module¶
pynestml.cocos.co_co_convolve_cond_correctly_built module¶
pynestml.cocos.co_co_correct_numerator_of_unit module¶
pynestml.cocos.co_co_correct_order_in_equation module¶
pynestml.cocos.co_co_each_neuron_block_unique_and_defined module¶
pynestml.cocos.co_co_each_synapse_block_unique_and_defined module¶
pynestml.cocos.co_co_equations_only_for_init_values module¶
pynestml.cocos.co_co_function_argument_template_types_consistent module¶
pynestml.cocos.co_co_function_calls_consistent module¶
pynestml.cocos.co_co_function_unique module¶
- class pynestml.cocos.co_co_function_unique.CoCoFunctionUnique¶
Bases:
pynestml.cocos.co_co.CoCoThis Coco ensures that each function is defined exactly once (thus no redeclaration occurs).
- classmethod check_co_co(node)¶
Checks if each function is defined uniquely. :param node: a single neuron :type node: ast_neuron
pynestml.cocos.co_co_illegal_expression module¶
pynestml.cocos.co_co_inline_expressions_have_rhs module¶
pynestml.cocos.co_co_inline_max_one_lhs module¶
pynestml.cocos.co_co_input_port_data_type module¶
pynestml.cocos.co_co_input_port_not_assigned_to module¶
pynestml.cocos.co_co_input_port_qualifier_unique module¶
pynestml.cocos.co_co_integrate_odes_called_if_equations_defined module¶
pynestml.cocos.co_co_invariant_is_boolean module¶
pynestml.cocos.co_co_kernel_type module¶
pynestml.cocos.co_co_neuron_name_unique module¶
- class pynestml.cocos.co_co_neuron_name_unique.CoCoNeuronNameUnique¶
Bases:
pynestml.cocos.co_co.CoCoThis coco ensures that for all elements in a single compile units, the names of all neurons are pairwise distinct. Allowed:
- neuron a:
…
- neuron b:
…
end
- Not allowed:
- neuron a:
…
- neuron a: <- neuron with the same name
…
end
- classmethod check_co_co(compilation_unit)¶
Checks the coco for the handed over compilation unit. :param compilation_unit: a single compilation unit. :type compilation_unit: ASTCompilationUnit
pynestml.cocos.co_co_no_duplicate_compilation_unit_names module¶
pynestml.cocos.co_co_no_kernels_except_in_convolve module¶
pynestml.cocos.co_co_no_nest_name_space_collision module¶
- class pynestml.cocos.co_co_no_nest_name_space_collision.CoCoNoNestNameSpaceCollision¶
Bases:
pynestml.cocos.co_co.CoCo- This coco tests that no functions are defined which collide with the nest namespace, which are:
“update”, “calibrate”, “handle”, “connect_sender”, “check_connection”, “get_status”, “set_status”, “init_state_”, “init_buffers_”
- Allowed:
function fun(…)
- Not allowed:
function handle(…) <- collision
- classmethod check_co_co(node)¶
Ensures the coco for the handed over neuron. :param node: a single neuron instance. :type node: ast_neuron
- nest_name_space = ['update', 'calibrate', 'handle', 'connect_sender', 'check_connection', 'get_status', 'set_status', 'init_state_', 'init_buffers_']¶
pynestml.cocos.co_co_ode_functions_have_consistent_units module¶
pynestml.cocos.co_co_odes_have_consistent_units module¶
pynestml.cocos.co_co_output_port_defined_if_emit_call module¶
pynestml.cocos.co_co_parameters_assigned_only_in_parameter_block module¶
pynestml.cocos.co_co_simple_delta_function module¶
pynestml.cocos.co_co_state_variables_initialized module¶
pynestml.cocos.co_co_sum_has_correct_parameter module¶
pynestml.cocos.co_co_user_defined_function_correctly_defined module¶
pynestml.cocos.co_co_variable_once_per_scope module¶
- class pynestml.cocos.co_co_variable_once_per_scope.CoCoVariableOncePerScope¶
Bases:
pynestml.cocos.co_co.CoCoThis coco ensures that each variables is defined at most once per scope, thus no redeclaration occurs.
- classmethod check_co_co(node)¶
Checks if each variable is defined at most once per scope. Obviously, this test does not check if a declaration is shadowed by an embedded scope. :param node: a single neuron :type node: ast_neuron