From ddaa78b93ee9c0ac958b3615e474fe3f21be405b Mon Sep 17 00:00:00 2001 From: Pooja Babu <75320801+pnbabu@users.noreply.github.com> Date: Mon, 4 Sep 2023 17:44:48 +0200 Subject: [PATCH] Remove units from spiking input ports (#882) --- doc/models_library/aeif_cond_alpha.rst | 2 +- doc/models_library/aeif_cond_exp.rst | 2 +- doc/models_library/hh_cond_exp_destexhe.rst | 2 +- doc/models_library/hh_cond_exp_traub.rst | 2 +- doc/models_library/hh_moto_5ht.rst | 137 ++ doc/models_library/hh_psc_alpha.rst | 2 +- doc/models_library/hill_tononi.rst | 2 +- doc/models_library/iaf_chxk_2008.rst | 2 +- doc/models_library/iaf_cond_alpha.rst | 2 +- doc/models_library/iaf_cond_beta.rst | 2 +- doc/models_library/iaf_cond_exp.rst | 2 +- doc/models_library/iaf_cond_exp_sfa_rr.rst | 2 +- doc/models_library/iaf_psc_alpha.rst | 2 +- doc/models_library/iaf_psc_delta.rst | 4 +- doc/models_library/iaf_psc_exp.rst | 2 +- doc/models_library/iaf_psc_exp_dend.rst | 2 +- doc/models_library/iaf_psc_exp_htum.rst | 2 +- doc/models_library/ignore_and_fire.rst | 2 +- doc/models_library/izhikevich.rst | 2 +- doc/models_library/izhikevich_psc_alpha.rst | 4 +- doc/models_library/mat2_psc_exp.rst | 2 +- doc/models_library/neuromodulated_stdp.rst | 2 +- doc/models_library/noisy_synapse.rst | 2 +- doc/models_library/static_synapse.rst | 38 + doc/models_library/stdp.rst | 2 +- doc/models_library/stdp_nn_pre_centered.rst | 2 +- doc/models_library/stdp_nn_restr_symm.rst | 2 +- doc/models_library/stdp_nn_symm.rst | 2 +- doc/models_library/stdp_triplet.rst | 2 +- doc/models_library/stdp_triplet_nn.rst | 2 +- doc/models_library/terub_gpe.rst | 2 +- doc/models_library/terub_stn.rst | 2 +- doc/models_library/third_factor_stdp.rst | 2 +- doc/models_library/traub_cond_multisyn.rst | 2 +- doc/models_library/traub_psc_alpha.rst | 2 +- doc/models_library/wb_cond_exp.rst | 2 +- doc/models_library/wb_cond_multisyn.rst | 2 +- doc/nestml_language/neurons_in_nestml.rst | 74 +- doc/nestml_language/synapses_in_nestml.rst | 8 +- .../nestml_active_dendrite_tutorial.ipynb | 10 +- .../izhikevich/izhikevich_solution.nestml | 4 +- .../izhikevich/izhikevich_task.nestml | 4 +- .../nestml_ou_noise_tutorial.ipynb | 4 +- .../models/iaf_psc_alpha.nestml | 6 +- .../models/iaf_psc_alpha_adapt_curr.nestml | 6 +- .../models/iaf_psc_alpha_adapt_thresh.nestml | 6 +- .../iaf_psc_alpha_adapt_thresh_OU.nestml | 6 +- .../stdp_dopa_synapse/stdp_dopa_synapse.ipynb | 6 +- doc/tutorials/stdp_windows/stdp_windows.ipynb | 12 +- .../triplet_stdp_synapse.ipynb | 8 +- models/neurons/aeif_cond_alpha.nestml | 8 +- models/neurons/aeif_cond_exp.nestml | 8 +- models/neurons/hh_cond_exp_destexhe.nestml | 8 +- models/neurons/hh_cond_exp_traub.nestml | 8 +- models/neurons/hh_moto_5ht.nestml | 8 +- models/neurons/hh_psc_alpha.nestml | 8 +- models/neurons/hill_tononi.nestml | 16 +- models/neurons/iaf_chxk_2008.nestml | 8 +- models/neurons/iaf_cond_alpha.nestml | 8 +- models/neurons/iaf_cond_beta.nestml | 8 +- models/neurons/iaf_cond_exp.nestml | 8 +- models/neurons/iaf_cond_exp_sfa_rr.nestml | 8 +- models/neurons/iaf_psc_alpha.nestml | 6 +- models/neurons/iaf_psc_delta.nestml | 6 +- models/neurons/iaf_psc_exp.nestml | 6 +- models/neurons/iaf_psc_exp_dend.nestml | 6 +- models/neurons/iaf_psc_exp_htum.nestml | 6 +- models/neurons/ignore_and_fire.nestml | 2 +- models/neurons/izhikevich.nestml | 4 +- models/neurons/izhikevich_psc_alpha.nestml | 8 +- models/neurons/mat2_psc_exp.nestml | 6 +- models/neurons/terub_gpe.nestml | 8 +- models/neurons/terub_stn.nestml | 8 +- models/neurons/traub_cond_multisyn.nestml | 16 +- models/neurons/traub_psc_alpha.nestml | 8 +- models/neurons/wb_cond_exp.nestml | 8 +- models/neurons/wb_cond_multisyn.nestml | 16 +- models/synapses/neuromodulated_stdp.nestml | 6 +- models/synapses/noisy_synapse.nestml | 2 +- models/synapses/static_synapse.nestml | 2 +- models/synapses/stdp_nn_pre_centered.nestml | 4 +- models/synapses/stdp_nn_restr_symm.nestml | 4 +- models/synapses/stdp_nn_symm.nestml | 4 +- models/synapses/stdp_synapse.nestml | 4 +- models/synapses/stdp_triplet_naive.nestml | 4 +- .../synapses/third_factor_stdp_synapse.nestml | 4 +- models/synapses/triplet_stdp_synapse.nestml | 4 +- pynestml/cocos/__init__.py | 2 - ..._co_continuous_input_port_not_qualified.py | 66 - pynestml/cocos/co_co_input_port_data_type.py | 74 - pynestml/cocos/co_cos_manager.py | 20 - .../codegeneration/nest_code_generator.py | 10 +- .../directives/BufferDeclaration.jinja2 | 4 +- pynestml/generated/PyNestMLParser.interp | 5 +- pynestml/generated/PyNestMLParser.py | 1324 +++++++++-------- pynestml/generated/PyNestMLParserVisitor.py | 9 +- pynestml/grammars/PyNestMLParser.g4 | 17 +- pynestml/utils/ast_utils.py | 34 +- pynestml/visitors/ast_builder_visitor.py | 30 +- .../visitors/ast_function_call_visitor.py | 8 +- pynestml/visitors/ast_symbol_table_visitor.py | 19 +- .../visitors/comment_collector_visitor.py | 6 +- tests/cocos_test.py | 34 +- ...ntinuousInputPortQualifierSpecified.nestml | 36 - ...oCoConvolveNotCorrectlyParametrized.nestml | 2 +- .../CoCoConvolveNotCorrectlyProvided.nestml | 2 +- tests/invalid/CoCoEachBlockUnique.nestml | 4 +- .../CoCoInputPortWithRedundantTypes.nestml | 2 +- .../CoCoPrioritiesCorrectlySpecified.nestml | 4 +- .../CoCoValueAssignedToInputPort.nestml | 4 +- .../CoCoVectorInputPortSizeAndType.nestml | 4 +- .../BiexponentialPostSynapticResponse.nestml | 18 +- tests/nest_tests/resources/FIR_filter.nestml | 4 +- tests/nest_tests/resources/InputPorts.nestml | 15 +- .../resources/RecordableVariables.nestml | 4 +- .../resources/TimeVariableSynapse.nestml | 2 +- .../resources/add_spikes_to_ode.nestml | 6 +- .../dopa_synapse_second_order.nestml | 4 +- .../resources/iaf_cond_exp_Istep.nestml | 8 +- .../resources/iaf_psc_exp_multisynapse.nestml | 8 +- .../iaf_psc_exp_multisynapse_vectors.nestml | 4 +- .../iaf_psc_exp_nonlineardendrite.nestml | 12 +- .../iaf_psc_exp_resolution_test.nestml | 6 +- tests/resources/CommentTest.nestml | 2 +- tests/resources/NestMLPrinterTest.nestml | 2 +- .../resources/SynapseEventSequenceTest.nestml | 4 +- .../random_number_generators_test.nestml | 4 +- .../synapse_event_inv_priority_test.nestml | 4 +- .../synapse_event_priority_test.nestml | 4 +- .../CoCoAssignmentToInlineExpression.nestml | 2 +- ...ntinuousInputPortQualifierSpecified.nestml | 34 - ...oCoConvolveNotCorrectlyParametrized.nestml | 4 +- .../CoCoConvolveNotCorrectlyProvided.nestml | 2 +- .../CoCoInputPortWithRedundantTypes.nestml | 2 +- .../CoCoOutputPortDefinedIfEmitCall.nestml | 4 +- .../CoCoPrioritiesCorrectlySpecified.nestml | 4 +- tests/valid/CoCoResolutionLegallyUsed.nestml | 2 +- .../CoCoSpikeInputPortWithoutType.nestml | 2 +- .../valid/CoCoValueAssignedToInputPort.nestml | 4 +- .../CoCoVectorInputPortSizeAndType.nestml | 6 +- 140 files changed, 1310 insertions(+), 1246 deletions(-) create mode 100644 doc/models_library/hh_moto_5ht.rst create mode 100644 doc/models_library/static_synapse.rst delete mode 100644 pynestml/cocos/co_co_continuous_input_port_not_qualified.py delete mode 100644 pynestml/cocos/co_co_input_port_data_type.py delete mode 100644 tests/invalid/CoCoContinuousInputPortQualifierSpecified.nestml delete mode 100644 tests/valid/CoCoContinuousInputPortQualifierSpecified.nestml diff --git a/doc/models_library/aeif_cond_alpha.rst b/doc/models_library/aeif_cond_alpha.rst index 6f6952c9e..0df791b8b 100644 --- a/doc/models_library/aeif_cond_alpha.rst +++ b/doc/models_library/aeif_cond_alpha.rst @@ -109,4 +109,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.943078 \ No newline at end of file + Generated at 2023-08-22 14:29:44.564178 \ No newline at end of file diff --git a/doc/models_library/aeif_cond_exp.rst b/doc/models_library/aeif_cond_exp.rst index 57da9797d..5a905d9d3 100644 --- a/doc/models_library/aeif_cond_exp.rst +++ b/doc/models_library/aeif_cond_exp.rst @@ -110,4 +110,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.899673 \ No newline at end of file + Generated at 2023-08-22 14:29:44.513192 \ No newline at end of file diff --git a/doc/models_library/hh_cond_exp_destexhe.rst b/doc/models_library/hh_cond_exp_destexhe.rst index 33c93ca66..e48294cda 100644 --- a/doc/models_library/hh_cond_exp_destexhe.rst +++ b/doc/models_library/hh_cond_exp_destexhe.rst @@ -125,4 +125,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:49.081867 \ No newline at end of file + Generated at 2023-08-22 14:29:44.766222 \ No newline at end of file diff --git a/doc/models_library/hh_cond_exp_traub.rst b/doc/models_library/hh_cond_exp_traub.rst index 5b1da3c8b..79a6d9910 100644 --- a/doc/models_library/hh_cond_exp_traub.rst +++ b/doc/models_library/hh_cond_exp_traub.rst @@ -130,4 +130,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.607331 \ No newline at end of file + Generated at 2023-08-22 14:29:44.206568 \ No newline at end of file diff --git a/doc/models_library/hh_moto_5ht.rst b/doc/models_library/hh_moto_5ht.rst new file mode 100644 index 000000000..a53174ea6 --- /dev/null +++ b/doc/models_library/hh_moto_5ht.rst @@ -0,0 +1,137 @@ +hh_moto_5ht +########### + + +hh_moto_5ht_nestml - a motor neuron model in HH formalism with 5HT modulation + +Description ++++++++++++ + +hh_moto_5ht is an implementation of a spiking motor neuron using the Hodgkin-Huxley formalism according to [2]_. Basically this model is an implementation of the existing NEURON model [1]_. + +The parameter that represents 5HT modulation is ``g_K_Ca_5ht``. When it equals 1, no modulation happens. An application of 5HT corresponds to its decrease. The default value for it is 0.6. This value was used in the Neuron simulator model. The range of this parameter is (0, 1] but you are free to play with any value. + +Post-synaptic currents and spike detection are the same as in hh_psc_alpha. + + +References +++++++++++ + +.. [1] Muscle spindle feedback circuit by Moraud EM and Capogrosso M. + https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=189786 + +.. [2] Compartmental model of vertebrate motoneurons for Ca2+-dependent spiking and plateau potentials under pharmacological treatment. + Booth V, Rinzel J, Kiehn O. + http://refhub.elsevier.com/S0896-6273(16)00010-6/sref4 + +.. [3] Repository: https://github.com/research-team/hh-moto-5ht + + +See also +++++++++ + +hh_psc_alpha + + + +Parameters +++++++++++ +.. csv-table:: + :header: "Name", "Physical unit", "Default value", "Description" + :widths: auto + + + "t_ref", "ms", "2.0ms", "Refractory period" + "g_Na", "nS", "5000.0nS", "Sodium peak conductance" + "g_L", "nS", "200.0nS", "Leak conductance" + "g_K_rect", "nS", "30000.0nS", "Delayed Rectifier Potassium peak conductance" + "g_Ca_N", "nS", "5000.0nS", "" + "g_Ca_L", "nS", "10.0nS", "" + "g_K_Ca", "nS", "30000.0nS", "" + "g_K_Ca_5ht", "real", "0.6", "modulation of K-Ca channels by 5HT. Its value 1.0 == no modulation." + "Ca_in_init", "mmol", "0.0001mmol", "Initial inside Calcium concentration" + "Ca_out", "mmol", "2.0mmol", "Outside Calcium concentration. Remains constant during simulation." + "C_m", "pF", "200.0pF", "Membrane capacitance" + "E_Na", "mV", "50.0mV", "" + "E_K", "mV", "-80.0mV", "" + "E_L", "mV", "-70.0mV", "" + "R_const", "real", "8.314472", "Nernst equation constants" + "F_const", "real", "96485.34", "" + "T_current", "real", "309.15", "36 Celcius" + "tau_syn_ex", "ms", "0.2ms", "Rise time of the excitatory synaptic alpha function" + "tau_syn_in", "ms", "2.0ms", "Rise time of the inhibitory synaptic alpha function" + "I_e", "pA", "0pA", "Constant current" + "V_m_init", "mV", "-65.0mV", "" + "hc_tau", "ms", "50.0ms", "" + "mc_tau", "ms", "15.0ms", "" + "p_tau", "ms", "400.0ms", "" + "alpha", "mmol / pA", "1e-05mmol / pA", "" + + + +State variables ++++++++++++++++ + +.. csv-table:: + :header: "Name", "Physical unit", "Default value", "Description" + :widths: auto + + + "r", "integer", "0", "number of steps in the current refractory phase" + "V_m", "mV", "V_m_init", "Membrane potential" + "Ca_in", "mmol", "Ca_in_init", "Inside Calcium concentration" + "Act_m", "real", "alpha_m(V_m_init) / (alpha_m(V_m_init) + beta_m(V_m_init))", "" + "Act_h", "real", "h_inf(V_m_init)", "" + "Inact_n", "real", "n_inf(V_m_init)", "" + "Act_p", "real", "p_inf(V_m_init)", "" + "Act_mc", "real", "mc_inf(V_m_init)", "" + "Act_hc", "real", "hc_inf(V_m_init)", "" + + + + +Equations ++++++++++ + + + +.. math:: + \frac{ dV_{m} } { dt }= \frac 1 { C_{m} } \left( { (-(I_{Na} + I_{K} + I_{L} + I_{Ca,N} + I_{Ca,L} + I_{K,Ca}) + I_{stim} + I_{e} + I_{syn,inh} + I_{syn,exc}) } \right) + +.. math:: + \frac{ dInact_{n} } { dt }= \frac{ (\text{n_inf}(V_{m}) - Inact_{n}) } { \text{n_tau}(V_{m}) } + +.. math:: + \frac{ dAct_{m} } { dt }= \text{alpha_m}(V_{m}) \cdot (1.0 - Act_{m}) - \text{beta_m}(V_{m}) \cdot Act_{m} + +.. math:: + \frac{ dAct_{h} } { dt }= \frac{ (\text{h_inf}(V_{m}) - Act_{h}) } { \text{h_tau}(V_{m}) } + +.. math:: + \frac{ dAct_{p} } { dt }= \frac 1 { p_{\tau} } \left( { (\text{p_inf}(V_{m}) - Act_{p}) } \right) + +.. math:: + \frac{ dAct_{mc} } { dt }= \frac 1 { mc_{\tau} } \left( { (\text{mc_inf}(V_{m}) - Act_{mc}) } \right) + +.. math:: + \frac{ dAct_{hc} } { dt }= \frac 1 { hc_{\tau} } \left( { (\text{hc_inf}(V_{m}) - Act_{hc}) } \right) + +.. math:: + \frac{ dCa_{in} } { dt }= (\frac{ 0.01 } { \mathrm{s} }) \cdot (-\alpha \cdot (I_{Ca,N} + I_{Ca,L}) - 4.0 \cdot Ca_{in}) + + + +Source code ++++++++++++ + +The model source code can be found in the NESTML models repository here: `hh_moto_5ht `_. + +Characterisation +++++++++++++++++ + +.. include:: hh_moto_5ht_characterisation.rst + + +.. footer:: + + Generated at 2023-08-22 14:29:44.636925 \ No newline at end of file diff --git a/doc/models_library/hh_psc_alpha.rst b/doc/models_library/hh_psc_alpha.rst index f8cceeeb8..94b5518e3 100644 --- a/doc/models_library/hh_psc_alpha.rst +++ b/doc/models_library/hh_psc_alpha.rst @@ -124,4 +124,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:49.051544 \ No newline at end of file + Generated at 2023-08-22 14:29:44.732465 \ No newline at end of file diff --git a/doc/models_library/hill_tononi.rst b/doc/models_library/hill_tononi.rst index 72360ba1b..7cb7c1579 100644 --- a/doc/models_library/hill_tononi.rst +++ b/doc/models_library/hill_tononi.rst @@ -151,4 +151,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.773169 \ No newline at end of file + Generated at 2023-08-22 14:29:44.380314 \ No newline at end of file diff --git a/doc/models_library/iaf_chxk_2008.rst b/doc/models_library/iaf_chxk_2008.rst index 0288629e0..710b8a6c0 100644 --- a/doc/models_library/iaf_chxk_2008.rst +++ b/doc/models_library/iaf_chxk_2008.rst @@ -101,4 +101,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.822099 \ No newline at end of file + Generated at 2023-08-22 14:29:44.431863 \ No newline at end of file diff --git a/doc/models_library/iaf_cond_alpha.rst b/doc/models_library/iaf_cond_alpha.rst index 7bf978f37..06a474aae 100644 --- a/doc/models_library/iaf_cond_alpha.rst +++ b/doc/models_library/iaf_cond_alpha.rst @@ -97,4 +97,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.934362 \ No newline at end of file + Generated at 2023-08-22 14:29:44.552880 \ No newline at end of file diff --git a/doc/models_library/iaf_cond_beta.rst b/doc/models_library/iaf_cond_beta.rst index 553b24d8f..5b2a4f48b 100644 --- a/doc/models_library/iaf_cond_beta.rst +++ b/doc/models_library/iaf_cond_beta.rst @@ -113,4 +113,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.761456 \ No newline at end of file + Generated at 2023-08-22 14:29:44.369517 \ No newline at end of file diff --git a/doc/models_library/iaf_cond_exp.rst b/doc/models_library/iaf_cond_exp.rst index 521dbd68e..5f750f812 100644 --- a/doc/models_library/iaf_cond_exp.rst +++ b/doc/models_library/iaf_cond_exp.rst @@ -87,4 +87,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.999982 \ No newline at end of file + Generated at 2023-08-22 14:29:44.627038 \ No newline at end of file diff --git a/doc/models_library/iaf_cond_exp_sfa_rr.rst b/doc/models_library/iaf_cond_exp_sfa_rr.rst index 8fc8204a4..b153bd294 100644 --- a/doc/models_library/iaf_cond_exp_sfa_rr.rst +++ b/doc/models_library/iaf_cond_exp_sfa_rr.rst @@ -109,4 +109,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.917439 \ No newline at end of file + Generated at 2023-08-22 14:29:44.534151 \ No newline at end of file diff --git a/doc/models_library/iaf_psc_alpha.rst b/doc/models_library/iaf_psc_alpha.rst index 68489d362..f473039b4 100644 --- a/doc/models_library/iaf_psc_alpha.rst +++ b/doc/models_library/iaf_psc_alpha.rst @@ -116,4 +116,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.837818 \ No newline at end of file + Generated at 2023-08-22 14:29:44.449697 \ No newline at end of file diff --git a/doc/models_library/iaf_psc_delta.rst b/doc/models_library/iaf_psc_delta.rst index 57ac3f79f..ceb43f5a2 100644 --- a/doc/models_library/iaf_psc_delta.rst +++ b/doc/models_library/iaf_psc_delta.rst @@ -94,7 +94,7 @@ Equations .. math:: - \frac{ dV_{m} } { dt }= \frac{ -(V_{m} - E_{L}) } { \tau_{m} } + (\frac 1 { \mathrm{ms} } \left( { \frac{ \mathrm{mV} } { \mathrm{pA} } } \right) ) \cdot \text{convolve}(G, spikes) + \frac 1 { C_{m} } \left( { (I_{e} + I_{stim}) } \right) + \frac{ dV_{m} } { dt }= \frac{ -(V_{m} - E_{L}) } { \tau_{m} } + \text{convolve}(G, spikes) \cdot (\frac{ \mathrm{mV} } { \mathrm{ms} }) + \frac 1 { C_{m} } \left( { (I_{e} + I_{stim}) } \right) @@ -111,4 +111,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.845377 \ No newline at end of file + Generated at 2023-08-22 14:29:44.459765 \ No newline at end of file diff --git a/doc/models_library/iaf_psc_exp.rst b/doc/models_library/iaf_psc_exp.rst index 37ea0217e..97dd99d79 100644 --- a/doc/models_library/iaf_psc_exp.rst +++ b/doc/models_library/iaf_psc_exp.rst @@ -95,4 +95,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.990089 \ No newline at end of file + Generated at 2023-08-22 14:29:44.614878 \ No newline at end of file diff --git a/doc/models_library/iaf_psc_exp_dend.rst b/doc/models_library/iaf_psc_exp_dend.rst index 9374011a3..568532f08 100644 --- a/doc/models_library/iaf_psc_exp_dend.rst +++ b/doc/models_library/iaf_psc_exp_dend.rst @@ -96,4 +96,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.889657 \ No newline at end of file + Generated at 2023-08-22 14:29:44.501436 \ No newline at end of file diff --git a/doc/models_library/iaf_psc_exp_htum.rst b/doc/models_library/iaf_psc_exp_htum.rst index c4f87e6a4..581ebeb64 100644 --- a/doc/models_library/iaf_psc_exp_htum.rst +++ b/doc/models_library/iaf_psc_exp_htum.rst @@ -108,4 +108,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.961309 \ No newline at end of file + Generated at 2023-08-22 14:29:44.584571 \ No newline at end of file diff --git a/doc/models_library/ignore_and_fire.rst b/doc/models_library/ignore_and_fire.rst index cf5c8d82b..555941b78 100644 --- a/doc/models_library/ignore_and_fire.rst +++ b/doc/models_library/ignore_and_fire.rst @@ -65,4 +65,4 @@ Characterisation .. footer:: - Generated at 2023-08-08 15:01:40.284515 \ No newline at end of file + Generated at 2023-08-22 14:29:44.764699 \ No newline at end of file diff --git a/doc/models_library/izhikevich.rst b/doc/models_library/izhikevich.rst index b711ea868..6ce958a03 100644 --- a/doc/models_library/izhikevich.rst +++ b/doc/models_library/izhikevich.rst @@ -97,4 +97,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.970819 \ No newline at end of file + Generated at 2023-08-22 14:29:44.595366 \ No newline at end of file diff --git a/doc/models_library/izhikevich_psc_alpha.rst b/doc/models_library/izhikevich_psc_alpha.rst index 2ef4f8f29..58dae0b7d 100644 --- a/doc/models_library/izhikevich_psc_alpha.rst +++ b/doc/models_library/izhikevich_psc_alpha.rst @@ -48,7 +48,7 @@ Parameters "C_m", "pF", "200pF", "Membrane capacitance" - "k", "pF / (ms mV)", "8pF / mV / ms", "Spiking slope" + "k", "pF / (mV ms)", "8pF / mV / ms", "Spiking slope" "V_r", "mV", "-65mV", "Resting potential" "V_t", "mV", "-45mV", "Threshold potential" "a", "1 / ms", "0.01 / ms", "Time scale of recovery variable" @@ -104,4 +104,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.680240 \ No newline at end of file + Generated at 2023-08-22 14:29:44.285400 \ No newline at end of file diff --git a/doc/models_library/mat2_psc_exp.rst b/doc/models_library/mat2_psc_exp.rst index 8149f357f..e8152c27f 100644 --- a/doc/models_library/mat2_psc_exp.rst +++ b/doc/models_library/mat2_psc_exp.rst @@ -107,4 +107,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:49.118418 \ No newline at end of file + Generated at 2023-08-22 14:29:44.812580 \ No newline at end of file diff --git a/doc/models_library/neuromodulated_stdp.rst b/doc/models_library/neuromodulated_stdp.rst index d97e0f134..d1dace0ac 100644 --- a/doc/models_library/neuromodulated_stdp.rst +++ b/doc/models_library/neuromodulated_stdp.rst @@ -75,4 +75,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.875739 \ No newline at end of file + Generated at 2023-08-22 14:29:44.891623 \ No newline at end of file diff --git a/doc/models_library/noisy_synapse.rst b/doc/models_library/noisy_synapse.rst index 38f770c36..ae80f9b08 100644 --- a/doc/models_library/noisy_synapse.rst +++ b/doc/models_library/noisy_synapse.rst @@ -37,4 +37,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.864688 \ No newline at end of file + Generated at 2023-08-22 14:29:44.871968 \ No newline at end of file diff --git a/doc/models_library/static_synapse.rst b/doc/models_library/static_synapse.rst new file mode 100644 index 000000000..051c26df9 --- /dev/null +++ b/doc/models_library/static_synapse.rst @@ -0,0 +1,38 @@ +static_synapse +############## + + +Static synapse + +Description ++++++++++++ +A synapse where the synaptic strength (weight) does not evolve with simulated time, but is defined as a (constant) parameter. + + + +Parameters +++++++++++ + + +.. csv-table:: + :header: "Name", "Physical unit", "Default value", "Description" + :widths: auto + + + "w", "real", "1", "Synaptic weight" + "d", "ms", "1ms", "Synaptic transmission delay" +Source code ++++++++++++ + +The model source code can be found in the NESTML models repository here: `static_synapse `_. + + +Characterisation +++++++++++++++++ + +.. include:: static_synapse_characterisation.rst + + +.. footer:: + + Generated at 2023-08-22 14:29:44.873822 \ No newline at end of file diff --git a/doc/models_library/stdp.rst b/doc/models_library/stdp.rst index 78c5f1600..a10c98973 100644 --- a/doc/models_library/stdp.rst +++ b/doc/models_library/stdp.rst @@ -82,4 +82,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.884461 \ No newline at end of file + Generated at 2023-08-22 14:29:44.906792 \ No newline at end of file diff --git a/doc/models_library/stdp_nn_pre_centered.rst b/doc/models_library/stdp_nn_pre_centered.rst index 2280bdde7..c8d620d50 100644 --- a/doc/models_library/stdp_nn_pre_centered.rst +++ b/doc/models_library/stdp_nn_pre_centered.rst @@ -99,4 +99,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.882045 \ No newline at end of file + Generated at 2023-08-22 14:29:44.899570 \ No newline at end of file diff --git a/doc/models_library/stdp_nn_restr_symm.rst b/doc/models_library/stdp_nn_restr_symm.rst index 594770e92..446a0e0b7 100644 --- a/doc/models_library/stdp_nn_restr_symm.rst +++ b/doc/models_library/stdp_nn_restr_symm.rst @@ -92,4 +92,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.872436 \ No newline at end of file + Generated at 2023-08-22 14:29:44.886314 \ No newline at end of file diff --git a/doc/models_library/stdp_nn_symm.rst b/doc/models_library/stdp_nn_symm.rst index 1659cb17a..fa35b19d2 100644 --- a/doc/models_library/stdp_nn_symm.rst +++ b/doc/models_library/stdp_nn_symm.rst @@ -96,4 +96,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.866878 \ No newline at end of file + Generated at 2023-08-22 14:29:44.875577 \ No newline at end of file diff --git a/doc/models_library/stdp_triplet.rst b/doc/models_library/stdp_triplet.rst index 6661332af..941946469 100644 --- a/doc/models_library/stdp_triplet.rst +++ b/doc/models_library/stdp_triplet.rst @@ -68,4 +68,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.854909 \ No newline at end of file + Generated at 2023-08-22 14:29:44.866991 \ No newline at end of file diff --git a/doc/models_library/stdp_triplet_nn.rst b/doc/models_library/stdp_triplet_nn.rst index 0023fe9aa..e9c7bcf8f 100644 --- a/doc/models_library/stdp_triplet_nn.rst +++ b/doc/models_library/stdp_triplet_nn.rst @@ -69,4 +69,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.879171 \ No newline at end of file + Generated at 2023-08-22 14:29:44.895367 \ No newline at end of file diff --git a/doc/models_library/terub_gpe.rst b/doc/models_library/terub_gpe.rst index 933f2a49c..efe34f843 100644 --- a/doc/models_library/terub_gpe.rst +++ b/doc/models_library/terub_gpe.rst @@ -111,4 +111,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.643623 \ No newline at end of file + Generated at 2023-08-22 14:29:44.246054 \ No newline at end of file diff --git a/doc/models_library/terub_stn.rst b/doc/models_library/terub_stn.rst index c5b329984..2c203116c 100644 --- a/doc/models_library/terub_stn.rst +++ b/doc/models_library/terub_stn.rst @@ -108,4 +108,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.726336 \ No newline at end of file + Generated at 2023-08-22 14:29:44.333524 \ No newline at end of file diff --git a/doc/models_library/third_factor_stdp.rst b/doc/models_library/third_factor_stdp.rst index c2c827e75..2b8509cb4 100644 --- a/doc/models_library/third_factor_stdp.rst +++ b/doc/models_library/third_factor_stdp.rst @@ -83,4 +83,4 @@ Characterisation .. footer:: - Generated at 2023-03-23 09:41:54.869575 \ No newline at end of file + Generated at 2023-08-22 14:29:44.880454 \ No newline at end of file diff --git a/doc/models_library/traub_cond_multisyn.rst b/doc/models_library/traub_cond_multisyn.rst index 9fa7fe691..c532e8596 100644 --- a/doc/models_library/traub_cond_multisyn.rst +++ b/doc/models_library/traub_cond_multisyn.rst @@ -124,4 +124,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:49.009221 \ No newline at end of file + Generated at 2023-08-22 14:29:44.694106 \ No newline at end of file diff --git a/doc/models_library/traub_psc_alpha.rst b/doc/models_library/traub_psc_alpha.rst index 70b730671..e8be8bb3f 100644 --- a/doc/models_library/traub_psc_alpha.rst +++ b/doc/models_library/traub_psc_alpha.rst @@ -95,4 +95,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.698546 \ No newline at end of file + Generated at 2023-08-22 14:29:44.304255 \ No newline at end of file diff --git a/doc/models_library/wb_cond_exp.rst b/doc/models_library/wb_cond_exp.rst index b8ce9f746..c7b8457ac 100644 --- a/doc/models_library/wb_cond_exp.rst +++ b/doc/models_library/wb_cond_exp.rst @@ -99,4 +99,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:49.128711 \ No newline at end of file + Generated at 2023-08-22 14:29:44.844732 \ No newline at end of file diff --git a/doc/models_library/wb_cond_multisyn.rst b/doc/models_library/wb_cond_multisyn.rst index d357ab38b..e5e19a4a5 100644 --- a/doc/models_library/wb_cond_multisyn.rst +++ b/doc/models_library/wb_cond_multisyn.rst @@ -121,4 +121,4 @@ Characterisation .. footer:: - Generated at 2023-03-22 17:48:48.862764 \ No newline at end of file + Generated at 2023-08-22 14:29:44.473067 \ No newline at end of file diff --git a/doc/nestml_language/neurons_in_nestml.rst b/doc/nestml_language/neurons_in_nestml.rst index a41eb24bf..f658e6590 100644 --- a/doc/nestml_language/neurons_in_nestml.rst +++ b/doc/nestml_language/neurons_in_nestml.rst @@ -28,22 +28,24 @@ A neuron model written in NESTML can be configured to receive two distinct types .. code-block:: nestml input: + AMPA_spikes <- spike I_stim pA <- continuous - AMPA_spikes pA <- spike The general syntax is: :: - port_name dataType <- inputQualifier* (spike | continuous) + port_name <- inputQualifier spike + port_name dataType <- continuous +The spiking input ports are declared without a data type, whereas the continuous input ports must have a data type. For spiking input ports, the qualifier keywords decide whether inhibitory and excitatory inputs are lumped together into a single named input port, or if they are separated into differently named input ports based on their sign. When processing a spike event, some simulators (including NEST) use the sign of the amplitude (or weight) property in the spike event to indicate whether it should be considered an excitatory or inhibitory spike. By using the qualifier keywords, a single spike handler can route each incoming spike event to the correct input buffer (excitatory or inhibitory). Compare: .. code-block:: nestml input: # [...] - all_spikes pA <- spike + all_spikes <- spike In this case, all spike events will be processed through the ``all_spikes`` input port. A spike weight could be positive or negative, and the occurrences of ``all_spikes`` in the model should be considered a signed quantity. @@ -51,8 +53,8 @@ In this case, all spike events will be processed through the ``all_spikes`` inpu input: # [...] - AMPA_spikes pA <- excitatory spike - GABA_spikes pA <- inhibitory spike + AMPA_spikes <- excitatory spike + GABA_spikes <- inhibitory spike In this case, spike events that have a negative weight are routed to the ``GABA_spikes`` input port, and those that have a positive weight to the ``AMPA_spikes`` port. @@ -72,6 +74,29 @@ It is equivalent if either both `inhibitory` and `excitatory` are given, or neit - ... should be negative. It is added to the buffer with non-negative magnitude :math:`-w`. +The incoming spikes at the spiking input port are modelled as Dirac delta functions. The Dirac Delta function :math:`\delta(x)` is an impulsive function defined as zero at every value of :math:`x`, except for :math:`x=u`, and whose integral is equal to 1. + +.. math:: + + \int \delta(x - u) dx = 1 + +The unit of the Dirac delta function follows from its definition: + +.. math:: + + f(0) = \int dx \delta(x) f(x) + +Here :math:`f(x)` is a continuous function of x. As the unit of the :math:`f()` is the same on both left- and right-hand side, the unit of :math:`dx \delta(x)` must be equal to 1. +Therefore, the unit of :math:`\delta(x)` must be equal to the inverse of the unit of :math:`x`. + +In the context of neuroscience, the spikes are represented as events in time with a unit of :math:`s`. Consequently, the delta pulses will have a unit of inverse of time, :math:`1/s`. +Therefore, all the incoming spikes defined in the input block will have an implicit unit of :math:`1/s`. + +Physical units such as millivolts (:math:`mV`) and nanoamperes (:math:`nA`) can be directly combined with the Dirac delta function to model an impulse with a physical quantity such as voltage or current. +In such cases, the Dirac delta function is multiplied by the appropriate unit of the physical quantity, such as :math:`mV` or :math:`nA`, to obtain a quantity with units of volts or amperes, respectively. +For example, the product of a Dirac delta function and millivolt (:math:`mV`) unit can be written as :math:`\delta(t) \text{mV}`. This can be interpreted as an impulse in voltage with a magnitude of one millivolt. + + Integrating current input ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -93,15 +118,19 @@ Spikes arriving at the input port of a neuron can be written as a spike train :m .. math:: - \large s(t) = \sum_{i=1}^N \delta(t - t_i) + \large s(t) = \sum_{i=1}^N w_i \cdot \delta(t - t_i) + +where :math:`w_i` is the weight of spike :math:`i`. To model the effect that an arriving spike has on the state of the neuron, a convolution with a kernel can be used. The kernel defines the postsynaptic response kernel, for example, an alpha (bi-exponential) function, decaying exponential, or a delta function. (See :ref:`Kernel functions` for how to define a kernel.) The convolution of the kernel with the spike train is defined as follows: .. math:: - \large (f \ast s)(t) = \sum_{i=1}^N w_i \cdot f(t - t_i) - -where :math:`w_i` is the weight of spike :math:`i`. + \begin{align*} + \large (f \ast s)(t) &= \int s(u) f(t-u) du \\ + &= \sum_{i=1}^N \int w_i \cdot \delta(u-t_i) f(t-u) du \\ + &= \sum_{i=1}^N w_i \cdot f(t - t_i) + \end{align*} For example, say there is a spiking input port defined named ``spikes``. A decaying exponential with time constant ``tau_syn`` is defined as postsynaptic kernel ``G``. Their convolution is expressed using the ``convolve(f, g)`` function, which takes a kernel and input port, respectively, as its arguments: @@ -111,7 +140,8 @@ For example, say there is a spiking input port defined named ``spikes``. A decay kernel G = exp(-t/tau_syn) V_m' = -V_m/tau_m + convolve(G, spikes) -The type of the convolution is equal to the type of the second parameter, that is, of the spike buffer. Kernels themselves are always untyped. +By the definition of convolution, ``convolve(G, spikes)`` will have the unit of kernel ``G`` multiplied by the unit of ``spikes`` and unit of time, i.e., ``[G] * [spikes] * s``. +Kernel functions in NESTML are always untyped and the unit of spikes is :math:`1/s` as discussed above. As a result, the unit of convolution is :math:`(1/s) * s`, an scalar quantity without a unit. (Re)setting synaptic integration state @@ -165,9 +195,9 @@ If there is more than one line specifying a `spike` or `continuous` port with th .. code-block:: nestml input: - spikes1 nS <- spike - spikes2 nS <- spike - spikes3 nS <- spike + spikes1 <- spike + spikes2 <- spike + spikes3 <- spike For the sake of keeping the example simple, we assign a decaying exponential-kernel postsynaptic response to each input port, each with a different time constant: @@ -177,7 +207,7 @@ For the sake of keeping the example simple, we assign a decaying exponential-ker kernel I_kernel1 = exp(-t / tau_syn1) kernel I_kernel2 = exp(-t / tau_syn2) kernel I_kernel3 = -exp(-t / tau_syn3) - inline I_syn pA = convolve(I_kernel1, spikes1) - convolve(I_kernel2, spikes2) + convolve(I_kernel3, spikes3) + inline I_syn pA = (convolve(I_kernel1, spikes1) - convolve(I_kernel2, spikes2) + convolve(I_kernel3, spikes3)) * pA V_m' = -(V_m - E_L) / tau_m + I_syn / C_m @@ -190,18 +220,18 @@ The input ports can also be defined as vectors. For example, neuron multi_synapse_vectors: input: - AMPA_spikes pA <- excitatory spike - GABA_spikes pA <- inhibitory spike - NMDA_spikes pA <- spike - foo[2] pA <- spike - exc_spikes[3] pA <- excitatory spike - inh_spikes[3] pA <- inhibitory spike + AMPA_spikes <- excitatory spike + GABA_spikes <- inhibitory spike + NMDA_spikes <- spike + foo[2] <- spike + exc_spikes[3] <- excitatory spike + inh_spikes[3] <- inhibitory spike equations: kernel I_kernel_exc = exp(-1 / tau_syn_exc * t) kernel I_kernel_inh = exp(-1 / tau_syn_inh * t) - inline I_syn_exc pA = convolve(I_kernel_exc, exc_spikes[1]) - inline I_syn_inh pA = convolve(I_kernel_inh, inh_spikes[1]) + inline I_syn_exc pA = convolve(I_kernel_exc, exc_spikes[1]) * pA + inline I_syn_inh pA = convolve(I_kernel_inh, inh_spikes[1]) * pA In this example, the spiking input ports ``foo``, ``exc_spikes``, and ``inh_spikes`` are defined as vectors. The integer surrounded by ``[`` and ``]`` determines the size of the vector. The size of the input port must always be a positive-valued integer. diff --git a/doc/nestml_language/synapses_in_nestml.rst b/doc/nestml_language/synapses_in_nestml.rst index 7b4f4ab0b..b32c4ba7c 100644 --- a/doc/nestml_language/synapses_in_nestml.rst +++ b/doc/nestml_language/synapses_in_nestml.rst @@ -38,8 +38,8 @@ Depending on whether the plasticity rule depends only on pre-, or on both pre- a .. code-block:: nestml input: - pre_spikes nS <- spike - post_spikes nS <- spike + pre_spikes <- spike + post_spikes <- spike output: spike @@ -101,8 +101,8 @@ Some plasticity rules are defined in terms of postsynaptic spike activity. A cor .. code-block:: nestml input: - pre_spikes nS <- spike # (same as before) - post_spikes nS <- spike + pre_spikes <- spike # (same as before) + post_spikes <- spike onReceive(post_spikes): print("Info: processing a postsynaptic spike at time t = {t}") diff --git a/doc/tutorials/active_dendrite/nestml_active_dendrite_tutorial.ipynb b/doc/tutorials/active_dendrite/nestml_active_dendrite_tutorial.ipynb index ec967a5a8..ccf1ccd4e 100644 --- a/doc/tutorials/active_dendrite/nestml_active_dendrite_tutorial.ipynb +++ b/doc/tutorials/active_dendrite/nestml_active_dendrite_tutorial.ipynb @@ -102,7 +102,7 @@ " equations:\n", " # alpha shaped postsynaptic current kernel\n", " kernel syn_kernel = (e / tau_syn) * t * exp(-t / tau_syn)\n", - " recordable inline I_syn pA = convolve(syn_kernel, spikes_in)\n", + " recordable inline I_syn pA = convolve(syn_kernel, spikes_in) * pA\n", " V_m' = -(V_m - E_L) / tau_m + (I_syn + I_dAP + I_e) / C_m\n", "\n", " parameters:\n", @@ -120,7 +120,7 @@ " T_dAP ms = 10 ms # time window over which the dendritic current clamp is active\n", "\n", " input:\n", - " spikes_in pA <- spike\n", + " spikes_in <- spike\n", "\n", " output: \n", " spike\n", @@ -429,7 +429,7 @@ " equations:\n", " # alpha shaped postsynaptic current kernel\n", " kernel syn_kernel = (e / tau_syn) * t * exp(-t / tau_syn)\n", - " recordable inline I_syn pA = convolve(syn_kernel, spikes_in)\n", + " recordable inline I_syn pA = convolve(syn_kernel, spikes_in) * pA\n", " V_m' = -(V_m - E_L) / tau_m + (enable_I_syn * I_syn + I_dAP + I_e) / C_m\n", "\n", " parameters:\n", @@ -447,7 +447,7 @@ " T_dAP ms = 10 ms # time window over which the dendritic current clamp is active\n", "\n", " input:\n", - " spikes_in pA <- spike\n", + " spikes_in <- spike\n", "\n", " output:\n", " spike\n", @@ -463,7 +463,7 @@ " t_dAP = 0 ms\n", " # reset and re-enable synaptic integration\n", " I_syn = 0 pA\n", - " I_syn' = 0 pA/ms\n", + " I_syn' = 0 * s**-1\n", " enable_I_syn = 1.\n", "\n", " if I_syn > I_th:\n", diff --git a/doc/tutorials/izhikevich/izhikevich_solution.nestml b/doc/tutorials/izhikevich/izhikevich_solution.nestml index 92b8686aa..04ae73785 100644 --- a/doc/tutorials/izhikevich/izhikevich_solution.nestml +++ b/doc/tutorials/izhikevich/izhikevich_solution.nestml @@ -15,7 +15,7 @@ neuron izhikevich_tutorial: d real = 8. # after-spike reset value of u input: - spikes mV <- spike + spikes <- spike I_e pA <- continuous output: @@ -25,7 +25,7 @@ neuron izhikevich_tutorial: integrate_odes() # add synaptic current - v += spikes + v += spikes * mV * s # threshold crossing if v >= 30mV: diff --git a/doc/tutorials/izhikevich/izhikevich_task.nestml b/doc/tutorials/izhikevich/izhikevich_task.nestml index 30bf8a340..ec6384c41 100644 --- a/doc/tutorials/izhikevich/izhikevich_task.nestml +++ b/doc/tutorials/izhikevich/izhikevich_task.nestml @@ -15,7 +15,7 @@ neuron izhikevich_tutorial: # TODO: add remaining variables input: - spikes mV <- spike + spikes <- spike I_e pA <- continuous output: @@ -25,7 +25,7 @@ neuron izhikevich_tutorial: integrate_odes() # add synaptic current - v += spikes + v += spikes * mV * s # TODO: implement threshold crossing check diff --git a/doc/tutorials/ornstein_uhlenbeck_noise/nestml_ou_noise_tutorial.ipynb b/doc/tutorials/ornstein_uhlenbeck_noise/nestml_ou_noise_tutorial.ipynb index 0d8edb91b..88cda5d72 100644 --- a/doc/tutorials/ornstein_uhlenbeck_noise/nestml_ou_noise_tutorial.ipynb +++ b/doc/tutorials/ornstein_uhlenbeck_noise/nestml_ou_noise_tutorial.ipynb @@ -472,7 +472,7 @@ "\n", " equations:\n", " kernel psc_kernel = exp(-t / tau_syn)\n", - " V_m' = -(V_m - E_L) / tau_m + (convolve(psc_kernel, spikes) + I_e + I_noise) / C_m\n", + " V_m' = -(V_m - E_L) / tau_m + (convolve(psc_kernel, spikes) * pA + I_e + I_noise) / C_m\n", "\n", " parameters:\n", " E_L mV = -65 mV # resting potential\n", @@ -489,7 +489,7 @@ " A_noise real = sigma_noise * ((1 - exp(-2 * resolution() / tau_noise)))**.5\n", "\n", " input:\n", - " spikes pA <- spike\n", + " spikes <- spike\n", "\n", " output:\n", " spike\n", diff --git a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha.nestml b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha.nestml index 9cfc4c3ac..fee02f541 100644 --- a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha.nestml +++ b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha.nestml @@ -65,7 +65,7 @@ neuron iaf_psc_alpha: equations: kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh) kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc) - inline I pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + I_e + I_stim + inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA + I_e + I_stim V_m' = -(V_m - E_L) / tau_m + I / C_m parameters: @@ -85,8 +85,8 @@ neuron iaf_psc_alpha: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_curr.nestml b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_curr.nestml index 3c3de6eba..f38e6b3bc 100644 --- a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_curr.nestml +++ b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_curr.nestml @@ -68,7 +68,7 @@ neuron iaf_psc_alpha_adapt_curr: equations: kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh) kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc) - inline I pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) - I_sfa + I_e + I_stim + inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA - I_sfa + I_e + I_stim V_m' = -(V_m - E_L) / tau_m + I / C_m I_sfa' = -I_sfa / tau_sfa @@ -92,8 +92,8 @@ neuron iaf_psc_alpha_adapt_curr: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh.nestml b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh.nestml index 6ed062aac..b34bbb1e1 100644 --- a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh.nestml +++ b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh.nestml @@ -68,7 +68,7 @@ neuron iaf_psc_alpha_adapt_thresh: equations: kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh) kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc) - inline I pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + I_e + I_stim + inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA + I_e + I_stim V_m' = -(V_m - E_L) / tau_m + I / C_m Theta' = -(Theta - Theta_init) / tau_Theta @@ -92,8 +92,8 @@ neuron iaf_psc_alpha_adapt_thresh: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh_OU.nestml b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh_OU.nestml index fe47d7fec..ecba946a6 100644 --- a/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh_OU.nestml +++ b/doc/tutorials/spike_frequency_adaptation/models/iaf_psc_alpha_adapt_thresh_OU.nestml @@ -70,7 +70,7 @@ neuron iaf_psc_alpha_adapt_thresh_OU: equations: kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh) kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc) - inline I pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + I_e + I_stim + I_noise + inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA + I_e + I_stim + I_noise V_m' = -(V_m - E_L) / tau_m + I / C_m Theta' = -(Theta - Theta_init) / tau_Theta @@ -99,8 +99,8 @@ neuron iaf_psc_alpha_adapt_thresh_OU: A_noise pA = ((D_noise * tau_syn_exc / 2) * (1 - exp(-2 * resolution() / tau_syn_exc )))**.5 input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/doc/tutorials/stdp_dopa_synapse/stdp_dopa_synapse.ipynb b/doc/tutorials/stdp_dopa_synapse/stdp_dopa_synapse.ipynb index 6d0f04b09..f1fc463ae 100644 --- a/doc/tutorials/stdp_dopa_synapse/stdp_dopa_synapse.ipynb +++ b/doc/tutorials/stdp_dopa_synapse/stdp_dopa_synapse.ipynb @@ -152,9 +152,9 @@ " tau_s 1/ms = (tau_c + tau_n) / (tau_c * tau_n)\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", - " mod_spikes real <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", + " mod_spikes <- spike\n", "\n", " output:\n", " spike\n", diff --git a/doc/tutorials/stdp_windows/stdp_windows.ipynb b/doc/tutorials/stdp_windows/stdp_windows.ipynb index a0e80f053..77201043c 100644 --- a/doc/tutorials/stdp_windows/stdp_windows.ipynb +++ b/doc/tutorials/stdp_windows/stdp_windows.ipynb @@ -215,8 +215,8 @@ " inline post_trace real = convolve(post_trace_kernel, post_spikes)\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", "\n", " output:\n", " spike\n", @@ -539,8 +539,8 @@ " post_nn_trace' = -post_nn_trace / tau_recency_window_post\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", "\n", " output:\n", " spike\n", @@ -677,8 +677,8 @@ " inline post_trace real = convolve(post_trace_kernel, post_spikes)\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", "\n", " output:\n", " spike\n", diff --git a/doc/tutorials/triplet_stdp_synapse/triplet_stdp_synapse.ipynb b/doc/tutorials/triplet_stdp_synapse/triplet_stdp_synapse.ipynb index a9780a449..0da356634 100644 --- a/doc/tutorials/triplet_stdp_synapse/triplet_stdp_synapse.ipynb +++ b/doc/tutorials/triplet_stdp_synapse/triplet_stdp_synapse.ipynb @@ -182,8 +182,8 @@ " tr_o2' = -tr_o2 / tau_y\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", "\n", " output:\n", " spike\n", @@ -307,8 +307,8 @@ " tr_o2' = -tr_o2 / tau_y\n", "\n", " input:\n", - " pre_spikes nS <- spike\n", - " post_spikes nS <- spike\n", + " pre_spikes <- spike\n", + " post_spikes <- spike\n", "\n", " output:\n", " spike\n", diff --git a/models/neurons/aeif_cond_alpha.nestml b/models/neurons/aeif_cond_alpha.nestml index be3ab57bb..34be671a7 100644 --- a/models/neurons/aeif_cond_alpha.nestml +++ b/models/neurons/aeif_cond_alpha.nestml @@ -53,8 +53,8 @@ neuron aeif_cond_alpha: # Add inlines to simplify the equation definition of V_m inline exp_arg real = (V_bounded - V_th) / Delta_T inline I_spike pA = g_L * Delta_T * exp(exp_arg) - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * (V_bounded - E_exc) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * (V_bounded - E_inh) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * (V_bounded - E_exc) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * (V_bounded - E_inh) V_m' = (-g_L * (V_bounded - E_L) + I_spike - I_syn_exc - I_syn_inh - w + I_e + I_stim) / C_m w' = (a * (V_bounded - E_L) - w) / tau_w @@ -97,8 +97,8 @@ neuron aeif_cond_alpha: r integer input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/aeif_cond_exp.nestml b/models/neurons/aeif_cond_exp.nestml index b39cc20f4..834ff0c8f 100644 --- a/models/neurons/aeif_cond_exp.nestml +++ b/models/neurons/aeif_cond_exp.nestml @@ -54,8 +54,8 @@ neuron aeif_cond_exp: # Add inlines to simplify the equation definition of V_m inline exp_arg real = (V_bounded - V_th) / Delta_T inline I_spike pA = g_L * Delta_T * exp(exp_arg) - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * (V_bounded - E_exc) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * (V_bounded - E_inh) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * (V_bounded - E_exc) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * (V_bounded - E_inh) V_m' = (-g_L * (V_bounded - E_L) + I_spike - I_syn_exc - I_syn_inh - w + I_e + I_stim) / C_m w' = (a * (V_bounded - E_L) - w) / tau_w @@ -92,8 +92,8 @@ neuron aeif_cond_exp: r integer input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/hh_cond_exp_destexhe.nestml b/models/neurons/hh_cond_exp_destexhe.nestml index 0328b7fba..214644206 100644 --- a/models/neurons/hh_cond_exp_destexhe.nestml +++ b/models/neurons/hh_cond_exp_destexhe.nestml @@ -58,8 +58,8 @@ neuron hh_cond_exp_destexhe: inline I_M pA = g_M * Noninact_p * (V_m - E_K) inline I_noise pA = (g_noise_exc * (V_m - E_exc) + g_noise_inh * (V_m - E_inh)) - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) V_m' =( -I_Na - I_K - I_M - I_L - I_syn_exc - I_syn_inh + I_e + I_stim - I_noise) / C_m @@ -125,8 +125,8 @@ neuron hh_cond_exp_destexhe: A_inh uS = ((D_inh * tau_syn_inh / 2) * (1 - exp(-2 * resolution() / tau_syn_inh )))**.5 input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/hh_cond_exp_traub.nestml b/models/neurons/hh_cond_exp_traub.nestml index 36f0519b2..9675a3f0a 100644 --- a/models/neurons/hh_cond_exp_traub.nestml +++ b/models/neurons/hh_cond_exp_traub.nestml @@ -67,8 +67,8 @@ neuron hh_cond_exp_traub: inline I_Na pA = g_Na * Act_m * Act_m * Act_m * Act_h * ( V_m - E_Na ) inline I_K pA = g_K * Inact_n * Inact_n * Inact_n * Inact_n * ( V_m - E_K ) inline I_L pA = g_L * ( V_m - E_L ) - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) V_m' = ( -I_Na - I_K - I_L - I_syn_exc - I_syn_inh + I_e + I_stim ) / C_m @@ -115,8 +115,8 @@ neuron hh_cond_exp_traub: RefractoryCounts integer = steps(t_ref) input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/hh_moto_5ht.nestml b/models/neurons/hh_moto_5ht.nestml index b51dbe9d0..db8a9cb0b 100644 --- a/models/neurons/hh_moto_5ht.nestml +++ b/models/neurons/hh_moto_5ht.nestml @@ -46,8 +46,8 @@ neuron hh_moto_5ht: # synapses: alpha functions kernel I_syn_in = (e/tau_syn_in) * t * exp(-t/tau_syn_in) kernel I_syn_ex = (e/tau_syn_ex) * t * exp(-t/tau_syn_ex) - inline I_syn_exc pA = convolve(I_syn_ex, exc_spikes) - inline I_syn_inh pA = convolve(I_syn_in, inh_spikes) + inline I_syn_exc pA = convolve(I_syn_ex, exc_spikes) * pA + inline I_syn_inh pA = convolve(I_syn_in, inh_spikes) * pA inline E_Ca mV = ((1000.0 * R_const * T_current) / (2. * F_const)) * log10(Ca_out / Ca_in) * mV @@ -109,8 +109,8 @@ neuron hh_moto_5ht: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes pA <- inhibitory spike - exc_spikes pA <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/hh_psc_alpha.nestml b/models/neurons/hh_psc_alpha.nestml index f6f9b58cd..84639fd2c 100644 --- a/models/neurons/hh_psc_alpha.nestml +++ b/models/neurons/hh_psc_alpha.nestml @@ -58,8 +58,8 @@ neuron hh_psc_alpha: kernel K_syn_inh = (e/tau_syn_inh) * t * exp(-t/tau_syn_inh) kernel K_syn_exc = (e/tau_syn_exc) * t * exp(-t/tau_syn_exc) - inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) - inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) + inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) * pA + inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) * pA inline I_Na pA = g_Na * Act_m * Act_m * Act_m * Inact_h * ( V_m - E_Na ) inline I_K pA = g_K * Act_n * Act_n * Act_n * Act_n * ( V_m - E_K ) inline I_L pA = g_L * ( V_m - E_L ) @@ -107,8 +107,8 @@ neuron hh_psc_alpha: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes pA <- inhibitory spike - exc_spikes pA <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/hill_tononi.nestml b/models/neurons/hill_tononi.nestml index da1a61894..f63858cd8 100644 --- a/models/neurons/hill_tononi.nestml +++ b/models/neurons/hill_tononi.nestml @@ -57,10 +57,10 @@ neuron hill_tononi: # V_m ############# - inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * ( V_m - AMPA_E_rev ) - inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) - inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * ( V_m - GABA_A_E_rev ) - inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * ( V_m - GABA_B_E_rev ) + inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * nS * ( V_m - AMPA_E_rev ) + inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * nS * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) + inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * nS * ( V_m - GABA_A_E_rev ) + inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * nS * ( V_m - GABA_B_E_rev ) inline I_syn pA = I_syn_ampa + I_syn_nmda + I_syn_gaba_a + I_syn_gaba_b inline I_Na pA = -g_NaL * ( V_m - E_Na ) @@ -182,10 +182,10 @@ neuron hill_tononi: PotassiumRefractoryCounts integer = steps(t_spike) input: - AMPA nS <- spike - NMDA nS <- spike - GABA_A nS <- spike - GABA_B nS <- spike + AMPA <- spike + NMDA <- spike + GABA_A <- spike + GABA_B <- spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_chxk_2008.nestml b/models/neurons/iaf_chxk_2008.nestml index cba4b8782..e0e268d30 100644 --- a/models/neurons/iaf_chxk_2008.nestml +++ b/models/neurons/iaf_chxk_2008.nestml @@ -45,8 +45,8 @@ neuron iaf_chxk_2008: kernel g_exc = (e/tau_syn_exc) * t * exp(-t/tau_syn_exc) g_ahp'' = -2 * g_ahp' / tau_ahp - g_ahp / tau_ahp**2 - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) inline I_ahp pA = g_ahp * ( V_m - E_ahp ) inline I_leak pA = g_L * ( V_m - E_L ) @@ -79,8 +79,8 @@ neuron iaf_chxk_2008: PSConInit_AHP real = G_ahp * e / tau_ahp * (ms/nS) input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_cond_alpha.nestml b/models/neurons/iaf_cond_alpha.nestml index 4a6940378..a88a86c28 100644 --- a/models/neurons/iaf_cond_alpha.nestml +++ b/models/neurons/iaf_cond_alpha.nestml @@ -44,8 +44,8 @@ neuron iaf_cond_alpha: kernel g_inh = (e/tau_syn_inh) * t * exp(-t/tau_syn_inh) kernel g_exc = (e/tau_syn_exc) * t * exp(-t/tau_syn_exc) - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) inline I_leak pA = g_L * ( V_m - E_L ) V_m' = ( -I_leak - I_syn_exc - I_syn_inh + I_e + I_stim ) / C_m @@ -69,8 +69,8 @@ neuron iaf_cond_alpha: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_cond_beta.nestml b/models/neurons/iaf_cond_beta.nestml index f0709c0c4..53dc85a1e 100644 --- a/models/neurons/iaf_cond_beta.nestml +++ b/models/neurons/iaf_cond_beta.nestml @@ -63,8 +63,8 @@ neuron iaf_cond_beta: kernel g_ex' = g_ex$ - g_ex / tau_syn_rise_E, g_ex$' = -g_ex$ / tau_syn_decay_E - inline I_syn_exc pA = (F_E + convolve(g_ex, exc_spikes)) * (V_m - E_ex) - inline I_syn_inh pA = (F_I + convolve(g_in, inh_spikes)) * (V_m - E_in) + inline I_syn_exc pA = (F_E + convolve(g_ex, exc_spikes) * nS) * (V_m - E_ex) + inline I_syn_inh pA = (F_I + convolve(g_in, inh_spikes)* nS) * (V_m - E_in) inline I_leak pA = g_L * (V_m - E_L) # pA = nS * mV V_m' = (-I_leak - I_syn_exc - I_syn_inh + I_e + I_stim ) / C_m @@ -99,8 +99,8 @@ neuron iaf_cond_beta: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_cond_exp.nestml b/models/neurons/iaf_cond_exp.nestml index 9d2862bdf..16a0024b1 100644 --- a/models/neurons/iaf_cond_exp.nestml +++ b/models/neurons/iaf_cond_exp.nestml @@ -35,8 +35,8 @@ neuron iaf_cond_exp: kernel g_inh = exp(-t/tau_syn_inh) # inputs from the inh conductance kernel g_exc = exp(-t/tau_syn_exc) # inputs from the exc conductance - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) inline I_leak pA = g_L * ( V_m - E_L ) V_m' = ( -I_leak - I_syn_exc - I_syn_inh + I_e + I_stim ) / C_m @@ -59,8 +59,8 @@ neuron iaf_cond_exp: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_cond_exp_sfa_rr.nestml b/models/neurons/iaf_cond_exp_sfa_rr.nestml index ac60a95b2..470599ebc 100644 --- a/models/neurons/iaf_cond_exp_sfa_rr.nestml +++ b/models/neurons/iaf_cond_exp_sfa_rr.nestml @@ -49,8 +49,8 @@ neuron iaf_cond_exp_sfa_rr: g_sfa' = -g_sfa / tau_sfa g_rr' = -g_rr / tau_rr - inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) inline I_L pA = g_L * ( V_m - E_L ) inline I_sfa pA = g_sfa * ( V_m - E_sfa ) inline I_rr pA = g_rr * ( V_m - E_rr ) @@ -82,8 +82,8 @@ neuron iaf_cond_exp_sfa_rr: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_psc_alpha.nestml b/models/neurons/iaf_psc_alpha.nestml index 99daa3c17..d311379a4 100644 --- a/models/neurons/iaf_psc_alpha.nestml +++ b/models/neurons/iaf_psc_alpha.nestml @@ -65,7 +65,7 @@ neuron iaf_psc_alpha: equations: kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh) kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc) - inline I pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + I_e + I_stim + inline I pA = convolve(I_kernel_exc, exc_spikes) * pA - convolve(I_kernel_inh, inh_spikes) * pA + I_e + I_stim V_m' = -(V_m - E_L) / tau_m + I / C_m parameters: @@ -85,8 +85,8 @@ neuron iaf_psc_alpha: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_psc_delta.nestml b/models/neurons/iaf_psc_delta.nestml index 4306b9682..4fb334ef2 100644 --- a/models/neurons/iaf_psc_delta.nestml +++ b/models/neurons/iaf_psc_delta.nestml @@ -57,7 +57,7 @@ neuron iaf_psc_delta: equations: kernel G = delta(t) - V_m' = -(V_m - E_L) / tau_m + (mV / pA / ms) * convolve(G, spikes) + (I_e + I_stim) / C_m + V_m' = -(V_m - E_L) / tau_m + convolve(G, spikes) * (mV / ms) + (I_e + I_stim) / C_m parameters: tau_m ms = 10 ms # Membrane time constant @@ -78,7 +78,7 @@ neuron iaf_psc_delta: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - spikes pA <- spike + spikes <- spike I_stim pA <- continuous output: @@ -102,7 +102,7 @@ neuron iaf_psc_delta: # for decay until end of refractory period # the buffer is clear automatically if with_refr_input: - refr_spikes_buffer += spikes * exp(-r * h / tau_m) * mV/pA + refr_spikes_buffer += spikes * s * exp(-r * h / tau_m) * mV r -= 1 if V_m >= V_th: # threshold crossing diff --git a/models/neurons/iaf_psc_exp.nestml b/models/neurons/iaf_psc_exp.nestml index 236a43ecb..cec3a0b77 100644 --- a/models/neurons/iaf_psc_exp.nestml +++ b/models/neurons/iaf_psc_exp.nestml @@ -44,7 +44,7 @@ neuron iaf_psc_exp: equations: kernel I_kernel_inh = exp(-t / tau_syn_inh) kernel I_kernel_exc = exp(-t / tau_syn_exc) - inline I_syn pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + inline I_syn pA = convolve(I_kernel_exc, exc_spikes) * pA - convolve(I_kernel_inh, inh_spikes) * pA V_m' = -(V_m - E_L) / tau_m + (I_syn + I_e + I_stim) / C_m parameters: @@ -64,8 +64,8 @@ neuron iaf_psc_exp: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_psc_exp_dend.nestml b/models/neurons/iaf_psc_exp_dend.nestml index ab09a3f41..f492502fb 100644 --- a/models/neurons/iaf_psc_exp_dend.nestml +++ b/models/neurons/iaf_psc_exp_dend.nestml @@ -45,7 +45,7 @@ neuron iaf_psc_exp_dend: equations: kernel I_kernel_inh = exp(-t/tau_syn_inh) kernel I_kernel_exc = exp(-t/tau_syn_exc) - inline I_syn pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + inline I_syn pA = convolve(I_kernel_exc, exc_spikes) * pA - convolve(I_kernel_inh, inh_spikes) * pA V_m' = -(V_m - E_L) / tau_m + (I_syn + I_e + I_stim) / C_m parameters: @@ -65,8 +65,8 @@ neuron iaf_psc_exp_dend: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/models/neurons/iaf_psc_exp_htum.nestml b/models/neurons/iaf_psc_exp_htum.nestml index 3eca05309..f0842fd03 100644 --- a/models/neurons/iaf_psc_exp_htum.nestml +++ b/models/neurons/iaf_psc_exp_htum.nestml @@ -56,7 +56,7 @@ neuron iaf_psc_exp_htum: equations: kernel I_kernel_inh = exp(-t / tau_syn_inh) kernel I_kernel_exc = exp(-t / tau_syn_exc) - inline I_syn pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + inline I_syn pA = convolve(I_kernel_exc, exc_spikes) * pA - convolve(I_kernel_inh, inh_spikes) * pA V_m' = -V_m / tau_m + (I_syn + I_e + I_stim) / C_m parameters: @@ -94,8 +94,8 @@ neuron iaf_psc_exp_htum: RefractoryCountsTot integer = steps(t_ref_tot) [[RefractoryCountsTot > 0]] input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/models/neurons/ignore_and_fire.nestml b/models/neurons/ignore_and_fire.nestml index 20cc8e2ba..6afbf496b 100644 --- a/models/neurons/ignore_and_fire.nestml +++ b/models/neurons/ignore_and_fire.nestml @@ -31,7 +31,7 @@ neuron ignore_and_fire: phase_steps integer = steps( max(0.,phase) / firing_rate ) ## firing phase in steps input: - spikes Bq <- spike ## the neuron receives spikes, but is not processing them + spikes <- spike ## the neuron receives spikes, but is not processing them output: spike diff --git a/models/neurons/izhikevich.nestml b/models/neurons/izhikevich.nestml index 35d891e3b..0569634de 100644 --- a/models/neurons/izhikevich.nestml +++ b/models/neurons/izhikevich.nestml @@ -57,7 +57,7 @@ neuron izhikevich: I_e pA = 0 pA input: - spikes mV <- spike + spikes <- spike I_stim pA <- continuous output: @@ -66,7 +66,7 @@ neuron izhikevich: update: integrate_odes() # Add synaptic current - V_m += spikes + V_m += spikes * mV * s # lower bound of membrane potential V_m = (V_m < V_min)? V_min : V_m diff --git a/models/neurons/izhikevich_psc_alpha.nestml b/models/neurons/izhikevich_psc_alpha.nestml index da793653f..4a2754cb8 100644 --- a/models/neurons/izhikevich_psc_alpha.nestml +++ b/models/neurons/izhikevich_psc_alpha.nestml @@ -47,8 +47,8 @@ neuron izhikevich_psc_alpha: kernel K_syn_inh = (e/tau_syn_inh) * t * exp(-t/tau_syn_inh) kernel K_syn_exc = (e/tau_syn_exc) * t * exp(-t/tau_syn_exc) - inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) - inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) + inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) * pA + inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) * pA V_m' = ( k * (V_m - V_r) * (V_m - V_t) - U_m + I_e + I_stim + I_syn_exc - I_syn_inh ) / C_m U_m' = a * ( b*(V_m - V_r) - U_m ) @@ -74,8 +74,8 @@ neuron izhikevich_psc_alpha: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes pA <- inhibitory spike - exc_spikes pA <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/mat2_psc_exp.nestml b/models/neurons/mat2_psc_exp.nestml index bd1e39f5d..f7ed25db2 100644 --- a/models/neurons/mat2_psc_exp.nestml +++ b/models/neurons/mat2_psc_exp.nestml @@ -54,7 +54,7 @@ neuron mat2_psc_exp: kernel I_kernel_inh = exp(-t/tau_syn_inh) kernel I_kernel_exc = exp(-t/tau_syn_exc) - inline I_syn pA = convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes) + inline I_syn pA = convolve(I_kernel_exc, exc_spikes) * pA - convolve(I_kernel_inh, inh_spikes) * pA V_m' = -(V_m - E_L) / tau_m + (I_syn + I_e + I_stim) / C_m parameters: @@ -81,8 +81,8 @@ neuron mat2_psc_exp: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/models/neurons/terub_gpe.nestml b/models/neurons/terub_gpe.nestml index 7f47976aa..71722d301 100644 --- a/models/neurons/terub_gpe.nestml +++ b/models/neurons/terub_gpe.nestml @@ -76,8 +76,8 @@ neuron terub_gpe: inline g_k_Ca real = 15.0 #Report:15, Terman Rubin 2002: 20.0 inline g_k1 real = 30.0 - inline I_exc_mod real = -convolve(g_exc, exc_spikes) * V_m - inline I_inh_mod real = convolve(g_inh, inh_spikes) * (V_m-E_gg) + inline I_exc_mod real = -convolve(g_exc, exc_spikes) * nS * V_m + inline I_inh_mod real = convolve(g_inh, inh_spikes) * nS * (V_m-E_gg) inline tau_n real = g_tau_n_0 + g_tau_n_1 / (1. + exp(-(V_m-g_theta_n_tau)/g_sigma_n_tau)) inline tau_h real = g_tau_h_0 + g_tau_h_1 / (1. + exp(-(V_m-g_theta_h_tau)/g_sigma_h_tau)) @@ -138,8 +138,8 @@ neuron terub_gpe: refractory_counts integer = steps(t_ref) input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/terub_stn.nestml b/models/neurons/terub_stn.nestml index 156cb2d0e..c3872d002 100644 --- a/models/neurons/terub_stn.nestml +++ b/models/neurons/terub_stn.nestml @@ -81,8 +81,8 @@ neuron terub_stn: inline k_Ca real = 22.5 inline k1 real = 15.0 - inline I_exc_mod pA = -convolve(g_exc, exc_spikes) * V_m / mV - inline I_inh_mod pA = convolve(g_inh, inh_spikes) * (V_m - E_gs) / mV + inline I_exc_mod pA = -convolve(g_exc, exc_spikes) * nS * V_m + inline I_inh_mod pA = convolve(g_inh, inh_spikes) * nS * (V_m - E_gs) inline tau_n ms = tau_n_0 + tau_n_1 / (1. + exp(-(V_m-theta_n_tau)/sigma_n_tau)) inline tau_h ms = tau_h_0 + tau_h_1 / (1. + exp(-(V_m-theta_h_tau)/sigma_h_tau)) @@ -144,8 +144,8 @@ neuron terub_stn: refractory_counts integer = steps(t_ref) input: - inh_spikes pA <- inhibitory spike - exc_spikes pA <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/traub_cond_multisyn.nestml b/models/neurons/traub_cond_multisyn.nestml index 6a5863c4e..3d5d29256 100644 --- a/models/neurons/traub_cond_multisyn.nestml +++ b/models/neurons/traub_cond_multisyn.nestml @@ -45,10 +45,10 @@ neuron traub_cond_multisyn: g_GABAB$ real = GABA_BInitialValue equations: - recordable inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * ( V_m - AMPA_E_rev ) - recordable inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) - recordable inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * ( V_m - GABA_A_E_rev ) - recordable inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * ( V_m - GABA_B_E_rev ) + recordable inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * nS * ( V_m - AMPA_E_rev ) + recordable inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * nS * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) + recordable inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * nS * ( V_m - GABA_A_E_rev ) + recordable inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * nS * ( V_m - GABA_B_E_rev ) recordable inline I_syn pA = I_syn_ampa + I_syn_nmda + I_syn_gaba_a + I_syn_gaba_b inline I_Na pA = g_Na * Act_m * Act_m * Act_m * Inact_h * ( V_m - E_Na ) @@ -140,10 +140,10 @@ neuron traub_cond_multisyn: beta_h_init real = 4.0 / (1.0 + exp(-(V_m / mV + 27.) / 5.)) input: - AMPA nS <- spike - NMDA nS <- spike - GABA_A nS <- spike - GABA_B nS <- spike + AMPA <- spike + NMDA <- spike + GABA_A <- spike + GABA_B <- spike I_stim pA <- continuous output: diff --git a/models/neurons/traub_psc_alpha.nestml b/models/neurons/traub_psc_alpha.nestml index 1c784893d..f2336b994 100644 --- a/models/neurons/traub_psc_alpha.nestml +++ b/models/neurons/traub_psc_alpha.nestml @@ -35,8 +35,8 @@ neuron traub_psc_alpha: kernel K_syn_inh = (e/tau_syn_inh) * t * exp(-t/tau_syn_inh) kernel K_syn_exc = (e/tau_syn_exc) * t * exp(-t/tau_syn_exc) - inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) - inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) + inline I_syn_exc pA = convolve(K_syn_exc, exc_spikes) * pA + inline I_syn_inh pA = convolve(K_syn_inh, inh_spikes) * pA inline I_Na pA = g_Na * Act_m * Act_m * Act_m * Inact_h * ( V_m - E_Na ) inline I_K pA = g_K * Act_n * Act_n * Act_n * Act_n * ( V_m - E_K ) inline I_L pA = g_L * ( V_m - E_L ) @@ -84,8 +84,8 @@ neuron traub_psc_alpha: beta_h_init real = 4.0 / (1.0 + exp(-(V_m / mV + 27.) / 5.)) input: - inh_spikes pA <- inhibitory spike - exc_spikes pA <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/wb_cond_exp.nestml b/models/neurons/wb_cond_exp.nestml index 8d0b3eb6f..413e54928 100644 --- a/models/neurons/wb_cond_exp.nestml +++ b/models/neurons/wb_cond_exp.nestml @@ -40,8 +40,8 @@ neuron wb_cond_exp: kernel g_inh = exp(-t / tau_syn_inh) kernel g_exc = exp(-t / tau_syn_exc) - recordable inline I_syn_exc pA = convolve(g_exc, exc_spikes) * ( V_m - E_exc ) - recordable inline I_syn_inh pA = convolve(g_inh, inh_spikes) * ( V_m - E_inh ) + recordable inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc ) + recordable inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh ) inline I_Na pA = g_Na * _subexpr(V_m) * Inact_h * ( V_m - E_Na ) inline I_K pA = g_K * Act_n**4 * ( V_m - E_K ) @@ -78,8 +78,8 @@ neuron wb_cond_exp: beta_h_init 1/ms = 5.0 / (exp(-0.1 / mV * (E_L + 28.0 mV)) + 1.0) /ms input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/models/neurons/wb_cond_multisyn.nestml b/models/neurons/wb_cond_multisyn.nestml index 9ce5279be..55eb93c6a 100644 --- a/models/neurons/wb_cond_multisyn.nestml +++ b/models/neurons/wb_cond_multisyn.nestml @@ -44,10 +44,10 @@ neuron wb_cond_multisyn: g_GABAB$ real = GABA_BInitialValue equations: - recordable inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * ( V_m - AMPA_E_rev ) - recordable inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) - recordable inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * ( V_m - GABA_A_E_rev ) - recordable inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * ( V_m - GABA_B_E_rev ) + recordable inline I_syn_ampa pA = -convolve(g_AMPA, AMPA) * nS * ( V_m - AMPA_E_rev ) + recordable inline I_syn_nmda pA = -convolve(g_NMDA, NMDA) * nS * ( V_m - NMDA_E_rev ) / ( 1 + exp( ( NMDA_Vact - V_m ) / NMDA_Sact ) ) + recordable inline I_syn_gaba_a pA = -convolve(g_GABAA, GABA_A) * nS * ( V_m - GABA_A_E_rev ) + recordable inline I_syn_gaba_b pA = -convolve(g_GABAB, GABA_B) * nS * ( V_m - GABA_B_E_rev ) recordable inline I_syn pA = I_syn_ampa + I_syn_nmda + I_syn_gaba_a + I_syn_gaba_b inline I_Na pA = g_Na * Act_m_inf(V_m)**3 * Inact_h * ( V_m - E_Na ) @@ -126,10 +126,10 @@ neuron wb_cond_multisyn: beta_h_init real = 5.0 / (exp(-0.1 * (V_m / mV + 28.0)) + 1.0) input: - AMPA nS <- spike - NMDA nS <- spike - GABA_A nS <- spike - GABA_B nS <- spike + AMPA <- spike + NMDA <- spike + GABA_A <- spike + GABA_B <- spike I_stim pA <- continuous output: diff --git a/models/synapses/neuromodulated_stdp.nestml b/models/synapses/neuromodulated_stdp.nestml index fba269f54..ead0c72ca 100644 --- a/models/synapses/neuromodulated_stdp.nestml +++ b/models/synapses/neuromodulated_stdp.nestml @@ -51,9 +51,9 @@ synapse neuromodulated_stdp: tau_s 1/ms = (tau_c + tau_n) / (tau_c * tau_n) input: - pre_spikes real <- spike - post_spikes real <- spike - mod_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike + mod_spikes <- spike output: spike diff --git a/models/synapses/noisy_synapse.nestml b/models/synapses/noisy_synapse.nestml index 2d320e1c6..7403eb1d4 100644 --- a/models/synapses/noisy_synapse.nestml +++ b/models/synapses/noisy_synapse.nestml @@ -14,7 +14,7 @@ synapse noisy_synapse: A_noise real = .4 input: - pre_spikes real <- spike + pre_spikes <- spike output: spike diff --git a/models/synapses/static_synapse.nestml b/models/synapses/static_synapse.nestml index 20b4bc720..79ac3389e 100644 --- a/models/synapses/static_synapse.nestml +++ b/models/synapses/static_synapse.nestml @@ -12,7 +12,7 @@ synapse static_synapse: d ms = 1 ms @nest::delay # Synaptic transmission delay input: - pre_spikes real <- spike + pre_spikes <- spike onReceive(pre_spikes): deliver_spike(w, d) diff --git a/models/synapses/stdp_nn_pre_centered.nestml b/models/synapses/stdp_nn_pre_centered.nestml index 9d4b341dc..ce9440ff7 100644 --- a/models/synapses/stdp_nn_pre_centered.nestml +++ b/models/synapses/stdp_nn_pre_centered.nestml @@ -75,8 +75,8 @@ synapse stdp_nn_pre_centered: post_trace' = -post_trace / tau_tr_post input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/models/synapses/stdp_nn_restr_symm.nestml b/models/synapses/stdp_nn_restr_symm.nestml index 732c3b140..39011c0d6 100644 --- a/models/synapses/stdp_nn_restr_symm.nestml +++ b/models/synapses/stdp_nn_restr_symm.nestml @@ -68,8 +68,8 @@ synapse stdp_nn_restr_symm: post_trace' = -post_trace / tau_tr_post input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/models/synapses/stdp_nn_symm.nestml b/models/synapses/stdp_nn_symm.nestml index 5e878e9be..4c84e0e7b 100644 --- a/models/synapses/stdp_nn_symm.nestml +++ b/models/synapses/stdp_nn_symm.nestml @@ -72,8 +72,8 @@ synapse stdp_nn_symm: post_trace' = -post_trace / tau_tr_post input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/models/synapses/stdp_synapse.nestml b/models/synapses/stdp_synapse.nestml index cc20172cd..30ef63968 100644 --- a/models/synapses/stdp_synapse.nestml +++ b/models/synapses/stdp_synapse.nestml @@ -55,8 +55,8 @@ synapse stdp: post_trace' = -post_trace / tau_tr_post input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/models/synapses/stdp_triplet_naive.nestml b/models/synapses/stdp_triplet_naive.nestml index bafa3bdd9..25a53a10f 100644 --- a/models/synapses/stdp_triplet_naive.nestml +++ b/models/synapses/stdp_triplet_naive.nestml @@ -53,8 +53,8 @@ synapse stdp_triplet: inline tr_o2 real = convolve(tr_o2_kernel, post_spikes) input: - pre_spikes nS <- spike - post_spikes nS <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/models/synapses/third_factor_stdp_synapse.nestml b/models/synapses/third_factor_stdp_synapse.nestml index 035db3018..abe180bf5 100644 --- a/models/synapses/third_factor_stdp_synapse.nestml +++ b/models/synapses/third_factor_stdp_synapse.nestml @@ -60,8 +60,8 @@ synapse third_factor_stdp: inline post_trace real = convolve(post_trace_kernel, post_spikes) input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike I_post_dend pA <- continuous output: diff --git a/models/synapses/triplet_stdp_synapse.nestml b/models/synapses/triplet_stdp_synapse.nestml index e652cb2aa..2f2b25579 100644 --- a/models/synapses/triplet_stdp_synapse.nestml +++ b/models/synapses/triplet_stdp_synapse.nestml @@ -48,8 +48,8 @@ synapse stdp_triplet_nn: tr_o2' = -tr_o2 / tau_y input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike output: spike diff --git a/pynestml/cocos/__init__.py b/pynestml/cocos/__init__.py index a9e7160dc..018605a60 100644 --- a/pynestml/cocos/__init__.py +++ b/pynestml/cocos/__init__.py @@ -27,7 +27,6 @@ 'co_co_convolve_cond_correctly_built.py', 'co_co_correct_numerator_of_unit.py', 'co_co_correct_order_in_equation.py', - 'co_co_continuous_input_port_not_qualified.py', 'co_co_each_block_unique_and_defined.py', 'co_co_equations_only_for_init_values.py', 'co_co_function_calls_consistent.py', @@ -41,7 +40,6 @@ 'co_co_no_nest_name_space_collision.py', 'co_co_no_kernels_except_in_convolve.py', 'co_co_no_duplicate_compilation_unit_names.py', - 'co_co_input_port_data_type.py', 'co_co_parameters_assigned_only_in_parameter_block.py', 'co_cos_manager.py', 'co_co_sum_has_correct_parameter.py', diff --git a/pynestml/cocos/co_co_continuous_input_port_not_qualified.py b/pynestml/cocos/co_co_continuous_input_port_not_qualified.py deleted file mode 100644 index e10a56ba5..000000000 --- a/pynestml/cocos/co_co_continuous_input_port_not_qualified.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -# -# co_co_continuous_input_port_not_qualified.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 . - -from pynestml.cocos.co_co import CoCo -from pynestml.utils.logger import LoggingLevel, Logger -from pynestml.utils.messages import Messages -from pynestml.visitors.ast_visitor import ASTVisitor - - -class CoCoContinuousInputPortNotQualified(CoCo): - """ - This coco ensures that continuous time input ports are not specified with a qualifier. - Allowed: - - .. code-block:: nestml - - input: - x nA <- continuous - - Not allowed: - - .. code-block:: nestml - - input: - x nA <- inhibitory continuous - """ - - @classmethod - def check_co_co(cls, node): - """ - Ensures the coco for the handed over neuron. - :param node: a single neuron instance. - :type node: ast_neuron - """ - node.accept(ContinuousPortQualifierSpecifiedVisitor()) - - -class ContinuousPortQualifierSpecifiedVisitor(ASTVisitor): - """ - This visitor ensures that continuous time input ports are not specified with an `inputQualifier`, e.g. excitatory, inhibitory. - """ - - def visit_input_port(self, node): - if node.is_continuous() and node.has_input_qualifiers() and len(node.get_input_qualifiers()) > 0: - qualifier_names = list((str(qualifier) for qualifier in node.get_input_qualifiers())) - code, message = Messages.get_continuous_input_port_specified(node.get_name(), qualifier_names) - Logger.log_message(error_position=node.get_source_position(), - code=code, message=message, log_level=LoggingLevel.ERROR) diff --git a/pynestml/cocos/co_co_input_port_data_type.py b/pynestml/cocos/co_co_input_port_data_type.py deleted file mode 100644 index 56afd4e5f..000000000 --- a/pynestml/cocos/co_co_input_port_data_type.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -# -# co_co_input_port_data_type.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 . - -from pynestml.cocos.co_co import CoCo -from pynestml.meta_model.ast_input_port import ASTInputPort -from pynestml.meta_model.ast_neuron import ASTNeuron -from pynestml.utils.logger import LoggingLevel, Logger -from pynestml.utils.messages import Messages -from pynestml.visitors.ast_visitor import ASTVisitor - - -class CoCoInputPortDataType(CoCo): - """ - This coco ensures that all spike and continuous time input ports have a data type stated. - - Allowed: - - .. code-block:: nestml - - input: - spikeIn integer <- inhibitory spike - current pA <- continuous - - Not allowed: - - .. code-block:: nestml - - input: - spikeIn <- inhibitory spike - current <- continuous - """ - - @classmethod - def check_co_co(cls, node: ASTNeuron): - """ - Ensures the coco for the handed over neuron. - :param node: a single neuron instance. - """ - node.accept(InputPortDatatypeVisitor()) - - -class InputPortDatatypeVisitor(ASTVisitor): - """ - This visitor checks if each input port has a datatype selected according to the coco. - """ - - def visit_input_port(self, node: ASTInputPort): - """ - Checks the coco on the current node. - :param node: a single input port node. - :type node: ASTInputPort - """ - if not node.has_datatype(): - code, message = Messages.get_data_type_not_specified(node.get_name()) - Logger.log_message(error_position=node.get_source_position(), log_level=LoggingLevel.ERROR, - code=code, message=message) diff --git a/pynestml/cocos/co_cos_manager.py b/pynestml/cocos/co_cos_manager.py index fce9d7d74..1bc02211d 100644 --- a/pynestml/cocos/co_cos_manager.py +++ b/pynestml/cocos/co_cos_manager.py @@ -26,7 +26,6 @@ from pynestml.cocos.co_co_convolve_cond_correctly_built import CoCoConvolveCondCorrectlyBuilt from pynestml.cocos.co_co_correct_numerator_of_unit import CoCoCorrectNumeratorOfUnit from pynestml.cocos.co_co_correct_order_in_equation import CoCoCorrectOrderInEquation -from pynestml.cocos.co_co_continuous_input_port_not_qualified import CoCoContinuousInputPortNotQualified from pynestml.cocos.co_co_each_block_defined_at_most_once import CoCoEachBlockDefinedAtMostOnce from pynestml.cocos.co_co_equations_only_for_init_values import CoCoEquationsOnlyForInitValues from pynestml.cocos.co_co_function_calls_consistent import CoCoFunctionCallsConsistent @@ -45,7 +44,6 @@ from pynestml.cocos.co_co_simple_delta_function import CoCoSimpleDeltaFunction from pynestml.cocos.co_co_ode_functions_have_consistent_units import CoCoOdeFunctionsHaveConsistentUnits from pynestml.cocos.co_co_output_port_defined_if_emit_call import CoCoOutputPortDefinedIfEmitCall -from pynestml.cocos.co_co_input_port_data_type import CoCoInputPortDataType from pynestml.cocos.co_co_parameters_assigned_only_in_parameter_block import \ CoCoParametersAssignedOnlyInParameterBlock from pynestml.cocos.co_co_resolution_func_legally_used import CoCoResolutionFuncLegallyUsed @@ -197,14 +195,6 @@ def check_parameters_not_assigned_outside_parameters_block(cls, neuron: ASTNeuro """ CoCoParametersAssignedOnlyInParameterBlock.check_co_co(neuron) - @classmethod - def check_continuous_input_ports_not_qualified(cls, neuron: ASTNeuron): - """ - Checks that continuous time input ports have not been specified with keywords, e.g., inhibitory. - :param neuron: a single neuron object. - """ - CoCoContinuousInputPortNotQualified.check_co_co(neuron) - @classmethod def check_output_port_defined_if_emit_call(cls, neuron: ASTNeuron): """ @@ -230,14 +220,6 @@ def check_ode_functions_have_consistent_units(cls, neuron: ASTNeuron): """ CoCoOdeFunctionsHaveConsistentUnits.check_co_co(neuron) - @classmethod - def check_input_port_data_type(cls, neuron: ASTNeuron): - """ - Checks that input ports have specified the data type if required and no data type if not allowed. - :param neuron: a single neuron object. - """ - CoCoInputPortDataType.check_co_co(neuron) - @classmethod def check_integrate_odes_called_if_equations_defined(cls, neuron: ASTNeuron): """ @@ -388,8 +370,6 @@ def post_symbol_table_builder_checks(cls, neuron: ASTNeuron, after_ast_rewrite: cls.check_no_nest_namespace_collisions(neuron) cls.check_input_port_qualifier_unique(neuron) cls.check_parameters_not_assigned_outside_parameters_block(neuron) - cls.check_continuous_input_ports_not_qualified(neuron) - cls.check_input_port_data_type(neuron) cls.check_user_defined_function_correctly_built(neuron) cls.check_initial_ode_initial_values(neuron) cls.check_kernel_type(neuron) diff --git a/pynestml/codegeneration/nest_code_generator.py b/pynestml/codegeneration/nest_code_generator.py index 141c0eeda..930a7088b 100644 --- a/pynestml/codegeneration/nest_code_generator.py +++ b/pynestml/codegeneration/nest_code_generator.py @@ -886,9 +886,17 @@ def get_spike_update_expressions(self, neuron: ASTNeuron, kernel_buffers, solver factor_expr = ModelParser.parse_expression(factor) factor_expr.update_scope(neuron.get_scope()) factor_expr.accept(ASTSymbolTableVisitor()) - assignment_str += "(" + self._printer_no_origin.print_expression(factor_expr) + ") * " + assignment_str += "(" + self._printer_no_origin.print(factor_expr) + ") * " + + if "_is_post_port" in dir(inport) and inport._is_post_port: + orig_port_name = inport[:inport.index("__for_")] + buffer_type = neuron.paired_synapse.get_scope().resolve_to_symbol(orig_port_name, SymbolKind.VARIABLE).get_type_symbol() + else: + buffer_type = neuron.get_scope().resolve_to_symbol(inport.get_name(), SymbolKind.VARIABLE).get_type_symbol() assignment_str += str(inport) + if not buffer_type.print_nestml_type() in ["1.", "1.0", "1"]: + assignment_str += " / (" + buffer_type.print_nestml_type() + ")" ast_assignment = ModelParser.parse_assignment(assignment_str) ast_assignment.update_scope(neuron.get_scope()) ast_assignment.accept(ASTSymbolTableVisitor()) diff --git a/pynestml/codegeneration/resources_nest/point_neuron/directives/BufferDeclaration.jinja2 b/pynestml/codegeneration/resources_nest/point_neuron/directives/BufferDeclaration.jinja2 index 3ca0fc46c..15f94ecad 100644 --- a/pynestml/codegeneration/resources_nest/point_neuron/directives/BufferDeclaration.jinja2 +++ b/pynestml/codegeneration/resources_nest/point_neuron/directives/BufferDeclaration.jinja2 @@ -1,9 +1,9 @@ {%- macro BufferDeclaration(node) -%} {%- if tracing %}/* generated by {{self._TemplateReference__context.name}} */ {% endif %} {%- if node.has_vector_parameter() %} -std::vector< {{ type_symbol_printer.print(node.get_type_symbol()) | replace(".", "::") }} > +std::vector< {{ type_symbol_printer.print(node.get_type_symbol()) }} > {%- else %} -{{ type_symbol_printer.print(node.get_type_symbol()) | replace(".", "::") }} +{{ type_symbol_printer.print(node.get_type_symbol()) }} {%- endif %} {{ node.get_symbol_name() }}; //!< Buffer for input (type: {{ node.get_type_symbol().get_symbol_name() }}) {%- endmacro -%} diff --git a/pynestml/generated/PyNestMLParser.interp b/pynestml/generated/PyNestMLParser.interp index 64517b044..36806c74b 100644 --- a/pynestml/generated/PyNestMLParser.interp +++ b/pynestml/generated/PyNestMLParser.interp @@ -226,7 +226,8 @@ blockWithVariables updateBlock equationsBlock inputBlock -inputPort +spikeInputPort +continuousInputPort inputQualifier outputBlock function @@ -235,4 +236,4 @@ constParameter atn: -[4, 1, 90, 584, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 101, 8, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 112, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 117, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 123, 8, 1, 10, 1, 12, 1, 126, 9, 1, 1, 2, 3, 2, 129, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 144, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 153, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 159, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 180, 8, 3, 10, 3, 12, 3, 183, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 189, 8, 4, 1, 4, 1, 4, 1, 4, 3, 4, 194, 8, 4, 1, 5, 1, 5, 1, 5, 3, 5, 199, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 206, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 215, 8, 7, 1, 8, 1, 8, 3, 8, 219, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 226, 8, 9, 1, 9, 5, 9, 229, 8, 9, 10, 9, 12, 9, 232, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 239, 8, 10, 10, 10, 12, 10, 242, 9, 10, 3, 10, 244, 8, 10, 1, 10, 1, 10, 1, 11, 3, 11, 249, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 257, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 265, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 278, 8, 13, 10, 13, 12, 13, 281, 9, 13, 1, 13, 3, 13, 284, 8, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 4, 14, 291, 8, 14, 11, 14, 12, 14, 292, 1, 14, 1, 14, 1, 15, 1, 15, 3, 15, 299, 8, 15, 1, 16, 1, 16, 1, 16, 3, 16, 304, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 310, 8, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 320, 8, 18, 1, 18, 1, 18, 1, 19, 3, 19, 325, 8, 19, 1, 19, 3, 19, 328, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 333, 8, 19, 10, 19, 12, 19, 336, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 341, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 347, 8, 19, 1, 19, 5, 19, 350, 8, 19, 10, 19, 12, 19, 353, 9, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 365, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 3, 24, 373, 8, 24, 1, 25, 1, 25, 5, 25, 377, 8, 25, 10, 25, 12, 25, 380, 9, 25, 1, 25, 3, 25, 383, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 407, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 4, 31, 421, 8, 31, 11, 31, 12, 31, 422, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 4, 33, 440, 8, 33, 11, 33, 12, 33, 441, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 4, 35, 460, 8, 35, 11, 35, 12, 35, 461, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 471, 8, 36, 10, 36, 12, 36, 474, 9, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 4, 37, 485, 8, 37, 11, 37, 12, 37, 486, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 4, 39, 502, 8, 39, 11, 39, 12, 39, 503, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 4, 40, 513, 8, 40, 11, 40, 12, 40, 514, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 524, 8, 41, 1, 41, 3, 41, 527, 8, 41, 1, 41, 1, 41, 5, 41, 531, 8, 41, 10, 41, 12, 41, 534, 9, 41, 1, 41, 1, 41, 3, 41, 538, 8, 41, 1, 41, 1, 41, 1, 42, 1, 42, 3, 42, 544, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 552, 8, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 563, 8, 44, 10, 44, 12, 44, 566, 9, 44, 3, 44, 568, 8, 44, 1, 44, 1, 44, 3, 44, 572, 8, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 0, 2, 2, 6, 47, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 0, 4, 2, 0, 51, 51, 75, 75, 1, 0, 89, 90, 1, 0, 33, 35, 3, 0, 25, 25, 86, 87, 89, 90, 642, 0, 100, 1, 0, 0, 0, 2, 111, 1, 0, 0, 0, 4, 128, 1, 0, 0, 0, 6, 143, 1, 0, 0, 0, 8, 193, 1, 0, 0, 0, 10, 198, 1, 0, 0, 0, 12, 205, 1, 0, 0, 0, 14, 214, 1, 0, 0, 0, 16, 218, 1, 0, 0, 0, 18, 220, 1, 0, 0, 0, 20, 233, 1, 0, 0, 0, 22, 248, 1, 0, 0, 0, 24, 260, 1, 0, 0, 0, 26, 268, 1, 0, 0, 0, 28, 287, 1, 0, 0, 0, 30, 298, 1, 0, 0, 0, 32, 303, 1, 0, 0, 0, 34, 309, 1, 0, 0, 0, 36, 313, 1, 0, 0, 0, 38, 324, 1, 0, 0, 0, 40, 354, 1, 0, 0, 0, 42, 364, 1, 0, 0, 0, 44, 366, 1, 0, 0, 0, 46, 368, 1, 0, 0, 0, 48, 370, 1, 0, 0, 0, 50, 374, 1, 0, 0, 0, 52, 384, 1, 0, 0, 0, 54, 389, 1, 0, 0, 0, 56, 394, 1, 0, 0, 0, 58, 398, 1, 0, 0, 0, 60, 412, 1, 0, 0, 0, 62, 420, 1, 0, 0, 0, 64, 426, 1, 0, 0, 0, 66, 430, 1, 0, 0, 0, 68, 445, 1, 0, 0, 0, 70, 450, 1, 0, 0, 0, 72, 465, 1, 0, 0, 0, 74, 479, 1, 0, 0, 0, 76, 490, 1, 0, 0, 0, 78, 494, 1, 0, 0, 0, 80, 507, 1, 0, 0, 0, 82, 518, 1, 0, 0, 0, 84, 543, 1, 0, 0, 0, 86, 545, 1, 0, 0, 0, 88, 556, 1, 0, 0, 0, 90, 576, 1, 0, 0, 0, 92, 579, 1, 0, 0, 0, 94, 101, 5, 10, 0, 0, 95, 101, 5, 11, 0, 0, 96, 101, 5, 12, 0, 0, 97, 101, 5, 13, 0, 0, 98, 101, 5, 14, 0, 0, 99, 101, 3, 2, 1, 0, 100, 94, 1, 0, 0, 0, 100, 95, 1, 0, 0, 0, 100, 96, 1, 0, 0, 0, 100, 97, 1, 0, 0, 0, 100, 98, 1, 0, 0, 0, 100, 99, 1, 0, 0, 0, 101, 1, 1, 0, 0, 0, 102, 103, 6, 1, -1, 0, 103, 104, 5, 49, 0, 0, 104, 105, 3, 2, 1, 0, 105, 106, 5, 50, 0, 0, 106, 112, 1, 0, 0, 0, 107, 108, 5, 89, 0, 0, 108, 109, 5, 79, 0, 0, 109, 112, 3, 2, 1, 2, 110, 112, 5, 88, 0, 0, 111, 102, 1, 0, 0, 0, 111, 107, 1, 0, 0, 0, 111, 110, 1, 0, 0, 0, 112, 124, 1, 0, 0, 0, 113, 116, 10, 3, 0, 0, 114, 117, 5, 77, 0, 0, 115, 117, 5, 79, 0, 0, 116, 114, 1, 0, 0, 0, 116, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 123, 3, 2, 1, 4, 119, 120, 10, 4, 0, 0, 120, 121, 5, 78, 0, 0, 121, 123, 3, 4, 2, 0, 122, 113, 1, 0, 0, 0, 122, 119, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 3, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 129, 7, 0, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 5, 89, 0, 0, 131, 5, 1, 0, 0, 0, 132, 133, 6, 3, -1, 0, 133, 134, 5, 49, 0, 0, 134, 135, 3, 6, 3, 0, 135, 136, 5, 50, 0, 0, 136, 144, 1, 0, 0, 0, 137, 138, 3, 10, 5, 0, 138, 139, 3, 6, 3, 9, 139, 144, 1, 0, 0, 0, 140, 141, 5, 28, 0, 0, 141, 144, 3, 6, 3, 4, 142, 144, 3, 8, 4, 0, 143, 132, 1, 0, 0, 0, 143, 137, 1, 0, 0, 0, 143, 140, 1, 0, 0, 0, 143, 142, 1, 0, 0, 0, 144, 181, 1, 0, 0, 0, 145, 146, 10, 10, 0, 0, 146, 147, 5, 78, 0, 0, 147, 180, 3, 6, 3, 10, 148, 152, 10, 8, 0, 0, 149, 153, 5, 77, 0, 0, 150, 153, 5, 79, 0, 0, 151, 153, 5, 80, 0, 0, 152, 149, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 180, 3, 6, 3, 9, 155, 158, 10, 7, 0, 0, 156, 159, 5, 51, 0, 0, 157, 159, 5, 75, 0, 0, 158, 156, 1, 0, 0, 0, 158, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 180, 3, 6, 3, 8, 161, 162, 10, 6, 0, 0, 162, 163, 3, 12, 6, 0, 163, 164, 3, 6, 3, 7, 164, 180, 1, 0, 0, 0, 165, 166, 10, 5, 0, 0, 166, 167, 3, 14, 7, 0, 167, 168, 3, 6, 3, 6, 168, 180, 1, 0, 0, 0, 169, 170, 10, 3, 0, 0, 170, 171, 3, 16, 8, 0, 171, 172, 3, 6, 3, 4, 172, 180, 1, 0, 0, 0, 173, 174, 10, 2, 0, 0, 174, 175, 5, 81, 0, 0, 175, 176, 3, 6, 3, 0, 176, 177, 5, 82, 0, 0, 177, 178, 3, 6, 3, 3, 178, 180, 1, 0, 0, 0, 179, 145, 1, 0, 0, 0, 179, 148, 1, 0, 0, 0, 179, 155, 1, 0, 0, 0, 179, 161, 1, 0, 0, 0, 179, 165, 1, 0, 0, 0, 179, 169, 1, 0, 0, 0, 179, 173, 1, 0, 0, 0, 180, 183, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 7, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 184, 194, 3, 20, 10, 0, 185, 194, 5, 86, 0, 0, 186, 188, 7, 1, 0, 0, 187, 189, 3, 18, 9, 0, 188, 187, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 194, 1, 0, 0, 0, 190, 194, 5, 87, 0, 0, 191, 194, 5, 25, 0, 0, 192, 194, 3, 18, 9, 0, 193, 184, 1, 0, 0, 0, 193, 185, 1, 0, 0, 0, 193, 186, 1, 0, 0, 0, 193, 190, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 192, 1, 0, 0, 0, 194, 9, 1, 0, 0, 0, 195, 199, 5, 51, 0, 0, 196, 199, 5, 75, 0, 0, 197, 199, 5, 52, 0, 0, 198, 195, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 198, 197, 1, 0, 0, 0, 199, 11, 1, 0, 0, 0, 200, 206, 5, 55, 0, 0, 201, 206, 5, 54, 0, 0, 202, 206, 5, 53, 0, 0, 203, 206, 5, 61, 0, 0, 204, 206, 5, 62, 0, 0, 205, 200, 1, 0, 0, 0, 205, 201, 1, 0, 0, 0, 205, 202, 1, 0, 0, 0, 205, 203, 1, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 13, 1, 0, 0, 0, 207, 215, 5, 63, 0, 0, 208, 215, 5, 65, 0, 0, 209, 215, 5, 70, 0, 0, 210, 215, 5, 71, 0, 0, 211, 215, 5, 72, 0, 0, 212, 215, 5, 73, 0, 0, 213, 215, 5, 64, 0, 0, 214, 207, 1, 0, 0, 0, 214, 208, 1, 0, 0, 0, 214, 209, 1, 0, 0, 0, 214, 210, 1, 0, 0, 0, 214, 211, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 213, 1, 0, 0, 0, 215, 15, 1, 0, 0, 0, 216, 219, 5, 26, 0, 0, 217, 219, 5, 27, 0, 0, 218, 216, 1, 0, 0, 0, 218, 217, 1, 0, 0, 0, 219, 17, 1, 0, 0, 0, 220, 225, 5, 88, 0, 0, 221, 222, 5, 56, 0, 0, 222, 223, 3, 6, 3, 0, 223, 224, 5, 58, 0, 0, 224, 226, 1, 0, 0, 0, 225, 221, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 230, 1, 0, 0, 0, 227, 229, 5, 85, 0, 0, 228, 227, 1, 0, 0, 0, 229, 232, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 19, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 233, 234, 5, 88, 0, 0, 234, 243, 5, 49, 0, 0, 235, 240, 3, 6, 3, 0, 236, 237, 5, 74, 0, 0, 237, 239, 3, 6, 3, 0, 238, 236, 1, 0, 0, 0, 239, 242, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, 244, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 235, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 5, 50, 0, 0, 246, 21, 1, 0, 0, 0, 247, 249, 5, 29, 0, 0, 248, 247, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 251, 5, 16, 0, 0, 251, 252, 5, 88, 0, 0, 252, 253, 3, 0, 0, 0, 253, 254, 5, 76, 0, 0, 254, 256, 3, 6, 3, 0, 255, 257, 5, 84, 0, 0, 256, 255, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 5, 9, 0, 0, 259, 23, 1, 0, 0, 0, 260, 261, 3, 18, 9, 0, 261, 262, 5, 76, 0, 0, 262, 264, 3, 6, 3, 0, 263, 265, 5, 84, 0, 0, 264, 263, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 5, 9, 0, 0, 267, 25, 1, 0, 0, 0, 268, 269, 5, 30, 0, 0, 269, 270, 3, 18, 9, 0, 270, 271, 5, 76, 0, 0, 271, 279, 3, 6, 3, 0, 272, 273, 5, 4, 0, 0, 273, 274, 3, 18, 9, 0, 274, 275, 5, 76, 0, 0, 275, 276, 3, 6, 3, 0, 276, 278, 1, 0, 0, 0, 277, 272, 1, 0, 0, 0, 278, 281, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 282, 284, 5, 84, 0, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 5, 9, 0, 0, 286, 27, 1, 0, 0, 0, 287, 288, 5, 9, 0, 0, 288, 290, 5, 1, 0, 0, 289, 291, 3, 30, 15, 0, 290, 289, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 5, 2, 0, 0, 295, 29, 1, 0, 0, 0, 296, 299, 3, 34, 17, 0, 297, 299, 3, 32, 16, 0, 298, 296, 1, 0, 0, 0, 298, 297, 1, 0, 0, 0, 299, 31, 1, 0, 0, 0, 300, 304, 3, 50, 25, 0, 301, 304, 3, 58, 29, 0, 302, 304, 3, 60, 30, 0, 303, 300, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 303, 302, 1, 0, 0, 0, 304, 33, 1, 0, 0, 0, 305, 310, 3, 36, 18, 0, 306, 310, 3, 20, 10, 0, 307, 310, 3, 38, 19, 0, 308, 310, 3, 48, 24, 0, 309, 305, 1, 0, 0, 0, 309, 306, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 309, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 312, 5, 9, 0, 0, 312, 35, 1, 0, 0, 0, 313, 319, 3, 18, 9, 0, 314, 320, 5, 76, 0, 0, 315, 320, 5, 66, 0, 0, 316, 320, 5, 67, 0, 0, 317, 320, 5, 68, 0, 0, 318, 320, 5, 69, 0, 0, 319, 314, 1, 0, 0, 0, 319, 315, 1, 0, 0, 0, 319, 316, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 319, 318, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 322, 3, 6, 3, 0, 322, 37, 1, 0, 0, 0, 323, 325, 5, 29, 0, 0, 324, 323, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 327, 1, 0, 0, 0, 326, 328, 5, 16, 0, 0, 327, 326, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 334, 3, 18, 9, 0, 330, 331, 5, 74, 0, 0, 331, 333, 3, 18, 9, 0, 332, 330, 1, 0, 0, 0, 333, 336, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 337, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, 340, 3, 0, 0, 0, 338, 339, 5, 76, 0, 0, 339, 341, 3, 6, 3, 0, 340, 338, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 346, 1, 0, 0, 0, 342, 343, 5, 59, 0, 0, 343, 344, 3, 6, 3, 0, 344, 345, 5, 60, 0, 0, 345, 347, 1, 0, 0, 0, 346, 342, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 351, 1, 0, 0, 0, 348, 350, 3, 42, 21, 0, 349, 348, 1, 0, 0, 0, 350, 353, 1, 0, 0, 0, 351, 349, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 39, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 354, 355, 3, 38, 19, 0, 355, 356, 5, 9, 0, 0, 356, 41, 1, 0, 0, 0, 357, 365, 5, 45, 0, 0, 358, 365, 5, 46, 0, 0, 359, 360, 5, 47, 0, 0, 360, 361, 3, 44, 22, 0, 361, 362, 5, 83, 0, 0, 362, 363, 3, 46, 23, 0, 363, 365, 1, 0, 0, 0, 364, 357, 1, 0, 0, 0, 364, 358, 1, 0, 0, 0, 364, 359, 1, 0, 0, 0, 365, 43, 1, 0, 0, 0, 366, 367, 5, 88, 0, 0, 367, 45, 1, 0, 0, 0, 368, 369, 5, 88, 0, 0, 369, 47, 1, 0, 0, 0, 370, 372, 5, 17, 0, 0, 371, 373, 3, 6, 3, 0, 372, 371, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 49, 1, 0, 0, 0, 374, 378, 3, 52, 26, 0, 375, 377, 3, 54, 27, 0, 376, 375, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 382, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 383, 3, 56, 28, 0, 382, 381, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 51, 1, 0, 0, 0, 384, 385, 5, 18, 0, 0, 385, 386, 3, 6, 3, 0, 386, 387, 5, 82, 0, 0, 387, 388, 3, 28, 14, 0, 388, 53, 1, 0, 0, 0, 389, 390, 5, 19, 0, 0, 390, 391, 3, 6, 3, 0, 391, 392, 5, 82, 0, 0, 392, 393, 3, 28, 14, 0, 393, 55, 1, 0, 0, 0, 394, 395, 5, 20, 0, 0, 395, 396, 5, 82, 0, 0, 396, 397, 3, 28, 14, 0, 397, 57, 1, 0, 0, 0, 398, 399, 5, 21, 0, 0, 399, 400, 5, 88, 0, 0, 400, 401, 5, 23, 0, 0, 401, 402, 3, 6, 3, 0, 402, 403, 5, 48, 0, 0, 403, 404, 3, 6, 3, 0, 404, 406, 5, 24, 0, 0, 405, 407, 5, 75, 0, 0, 406, 405, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 409, 7, 1, 0, 0, 409, 410, 5, 82, 0, 0, 410, 411, 3, 28, 14, 0, 411, 59, 1, 0, 0, 0, 412, 413, 5, 22, 0, 0, 413, 414, 3, 6, 3, 0, 414, 415, 5, 82, 0, 0, 415, 416, 3, 28, 14, 0, 416, 61, 1, 0, 0, 0, 417, 421, 3, 64, 32, 0, 418, 421, 3, 68, 34, 0, 419, 421, 5, 9, 0, 0, 420, 417, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 419, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 425, 5, 0, 0, 1, 425, 63, 1, 0, 0, 0, 426, 427, 5, 31, 0, 0, 427, 428, 5, 88, 0, 0, 428, 429, 3, 66, 33, 0, 429, 65, 1, 0, 0, 0, 430, 431, 5, 82, 0, 0, 431, 432, 5, 9, 0, 0, 432, 439, 5, 1, 0, 0, 433, 440, 3, 74, 37, 0, 434, 440, 3, 78, 39, 0, 435, 440, 3, 80, 40, 0, 436, 440, 3, 86, 43, 0, 437, 440, 3, 76, 38, 0, 438, 440, 3, 88, 44, 0, 439, 433, 1, 0, 0, 0, 439, 434, 1, 0, 0, 0, 439, 435, 1, 0, 0, 0, 439, 436, 1, 0, 0, 0, 439, 437, 1, 0, 0, 0, 439, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 5, 2, 0, 0, 444, 67, 1, 0, 0, 0, 445, 446, 5, 32, 0, 0, 446, 447, 5, 88, 0, 0, 447, 448, 5, 82, 0, 0, 448, 449, 3, 70, 35, 0, 449, 69, 1, 0, 0, 0, 450, 451, 5, 9, 0, 0, 451, 459, 5, 1, 0, 0, 452, 460, 3, 74, 37, 0, 453, 460, 3, 78, 39, 0, 454, 460, 3, 80, 40, 0, 455, 460, 3, 86, 43, 0, 456, 460, 3, 88, 44, 0, 457, 460, 3, 72, 36, 0, 458, 460, 3, 76, 38, 0, 459, 452, 1, 0, 0, 0, 459, 453, 1, 0, 0, 0, 459, 454, 1, 0, 0, 0, 459, 455, 1, 0, 0, 0, 459, 456, 1, 0, 0, 0, 459, 457, 1, 0, 0, 0, 459, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, 0, 462, 463, 1, 0, 0, 0, 463, 464, 5, 2, 0, 0, 464, 71, 1, 0, 0, 0, 465, 466, 5, 41, 0, 0, 466, 467, 5, 49, 0, 0, 467, 472, 5, 88, 0, 0, 468, 469, 5, 74, 0, 0, 469, 471, 3, 92, 46, 0, 470, 468, 1, 0, 0, 0, 471, 474, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 473, 475, 1, 0, 0, 0, 474, 472, 1, 0, 0, 0, 475, 476, 5, 50, 0, 0, 476, 477, 5, 82, 0, 0, 477, 478, 3, 28, 14, 0, 478, 73, 1, 0, 0, 0, 479, 480, 7, 2, 0, 0, 480, 481, 5, 82, 0, 0, 481, 482, 5, 9, 0, 0, 482, 484, 5, 1, 0, 0, 483, 485, 3, 40, 20, 0, 484, 483, 1, 0, 0, 0, 485, 486, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 489, 5, 2, 0, 0, 489, 75, 1, 0, 0, 0, 490, 491, 5, 36, 0, 0, 491, 492, 5, 82, 0, 0, 492, 493, 3, 28, 14, 0, 493, 77, 1, 0, 0, 0, 494, 495, 5, 37, 0, 0, 495, 496, 5, 82, 0, 0, 496, 497, 5, 9, 0, 0, 497, 501, 5, 1, 0, 0, 498, 502, 3, 22, 11, 0, 499, 502, 3, 24, 12, 0, 500, 502, 3, 26, 13, 0, 501, 498, 1, 0, 0, 0, 501, 499, 1, 0, 0, 0, 501, 500, 1, 0, 0, 0, 502, 503, 1, 0, 0, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 506, 5, 2, 0, 0, 506, 79, 1, 0, 0, 0, 507, 508, 5, 38, 0, 0, 508, 509, 5, 82, 0, 0, 509, 510, 5, 9, 0, 0, 510, 512, 5, 1, 0, 0, 511, 513, 3, 82, 41, 0, 512, 511, 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 5, 2, 0, 0, 517, 81, 1, 0, 0, 0, 518, 523, 5, 88, 0, 0, 519, 520, 5, 56, 0, 0, 520, 521, 3, 6, 3, 0, 521, 522, 5, 58, 0, 0, 522, 524, 1, 0, 0, 0, 523, 519, 1, 0, 0, 0, 523, 524, 1, 0, 0, 0, 524, 526, 1, 0, 0, 0, 525, 527, 3, 0, 0, 0, 526, 525, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 528, 1, 0, 0, 0, 528, 532, 5, 57, 0, 0, 529, 531, 3, 84, 42, 0, 530, 529, 1, 0, 0, 0, 531, 534, 1, 0, 0, 0, 532, 530, 1, 0, 0, 0, 532, 533, 1, 0, 0, 0, 533, 537, 1, 0, 0, 0, 534, 532, 1, 0, 0, 0, 535, 538, 5, 40, 0, 0, 536, 538, 5, 42, 0, 0, 537, 535, 1, 0, 0, 0, 537, 536, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 5, 9, 0, 0, 540, 83, 1, 0, 0, 0, 541, 544, 5, 43, 0, 0, 542, 544, 5, 44, 0, 0, 543, 541, 1, 0, 0, 0, 543, 542, 1, 0, 0, 0, 544, 85, 1, 0, 0, 0, 545, 546, 5, 39, 0, 0, 546, 547, 5, 82, 0, 0, 547, 548, 5, 9, 0, 0, 548, 551, 5, 1, 0, 0, 549, 552, 5, 42, 0, 0, 550, 552, 5, 40, 0, 0, 551, 549, 1, 0, 0, 0, 551, 550, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, 554, 5, 9, 0, 0, 554, 555, 5, 2, 0, 0, 555, 87, 1, 0, 0, 0, 556, 557, 5, 15, 0, 0, 557, 558, 5, 88, 0, 0, 558, 567, 5, 49, 0, 0, 559, 564, 3, 90, 45, 0, 560, 561, 5, 74, 0, 0, 561, 563, 3, 90, 45, 0, 562, 560, 1, 0, 0, 0, 563, 566, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 568, 1, 0, 0, 0, 566, 564, 1, 0, 0, 0, 567, 559, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 571, 5, 50, 0, 0, 570, 572, 3, 0, 0, 0, 571, 570, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 573, 1, 0, 0, 0, 573, 574, 5, 82, 0, 0, 574, 575, 3, 28, 14, 0, 575, 89, 1, 0, 0, 0, 576, 577, 5, 88, 0, 0, 577, 578, 3, 0, 0, 0, 578, 91, 1, 0, 0, 0, 579, 580, 5, 88, 0, 0, 580, 581, 5, 76, 0, 0, 581, 582, 7, 3, 0, 0, 582, 93, 1, 0, 0, 0, 62, 100, 111, 116, 122, 124, 128, 143, 152, 158, 179, 181, 188, 193, 198, 205, 214, 218, 225, 230, 240, 243, 248, 256, 264, 279, 283, 292, 298, 303, 309, 319, 324, 327, 334, 340, 346, 351, 364, 372, 378, 382, 406, 420, 422, 439, 441, 459, 461, 472, 486, 501, 503, 514, 523, 526, 532, 537, 543, 551, 564, 567, 571] \ No newline at end of file +[4, 1, 90, 593, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 103, 8, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 114, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 119, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 125, 8, 1, 10, 1, 12, 1, 128, 9, 1, 1, 2, 3, 2, 131, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 146, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 155, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 161, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 182, 8, 3, 10, 3, 12, 3, 185, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 191, 8, 4, 1, 4, 1, 4, 1, 4, 3, 4, 196, 8, 4, 1, 5, 1, 5, 1, 5, 3, 5, 201, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 208, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 217, 8, 7, 1, 8, 1, 8, 3, 8, 221, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 228, 8, 9, 1, 9, 5, 9, 231, 8, 9, 10, 9, 12, 9, 234, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 241, 8, 10, 10, 10, 12, 10, 244, 9, 10, 3, 10, 246, 8, 10, 1, 10, 1, 10, 1, 11, 3, 11, 251, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 259, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 267, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 280, 8, 13, 10, 13, 12, 13, 283, 9, 13, 1, 13, 3, 13, 286, 8, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 4, 14, 293, 8, 14, 11, 14, 12, 14, 294, 1, 14, 1, 14, 1, 15, 1, 15, 3, 15, 301, 8, 15, 1, 16, 1, 16, 1, 16, 3, 16, 306, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 312, 8, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 322, 8, 18, 1, 18, 1, 18, 1, 19, 3, 19, 327, 8, 19, 1, 19, 3, 19, 330, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 335, 8, 19, 10, 19, 12, 19, 338, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 343, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 349, 8, 19, 1, 19, 5, 19, 352, 8, 19, 10, 19, 12, 19, 355, 9, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 367, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 3, 24, 375, 8, 24, 1, 25, 1, 25, 5, 25, 379, 8, 25, 10, 25, 12, 25, 382, 9, 25, 1, 25, 3, 25, 385, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 409, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 4, 31, 423, 8, 31, 11, 31, 12, 31, 424, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 4, 33, 442, 8, 33, 11, 33, 12, 33, 443, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 4, 35, 462, 8, 35, 11, 35, 12, 35, 463, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 473, 8, 36, 10, 36, 12, 36, 476, 9, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 4, 37, 487, 8, 37, 11, 37, 12, 37, 488, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 4, 39, 504, 8, 39, 11, 39, 12, 39, 505, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 4, 40, 516, 8, 40, 11, 40, 12, 40, 517, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 527, 8, 41, 1, 41, 1, 41, 5, 41, 531, 8, 41, 10, 41, 12, 41, 534, 9, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 544, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 3, 43, 553, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 561, 8, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 572, 8, 45, 10, 45, 12, 45, 575, 9, 45, 3, 45, 577, 8, 45, 1, 45, 1, 45, 3, 45, 581, 8, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 0, 2, 2, 6, 48, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 0, 4, 2, 0, 51, 51, 75, 75, 1, 0, 89, 90, 1, 0, 33, 35, 3, 0, 25, 25, 86, 87, 89, 90, 650, 0, 102, 1, 0, 0, 0, 2, 113, 1, 0, 0, 0, 4, 130, 1, 0, 0, 0, 6, 145, 1, 0, 0, 0, 8, 195, 1, 0, 0, 0, 10, 200, 1, 0, 0, 0, 12, 207, 1, 0, 0, 0, 14, 216, 1, 0, 0, 0, 16, 220, 1, 0, 0, 0, 18, 222, 1, 0, 0, 0, 20, 235, 1, 0, 0, 0, 22, 250, 1, 0, 0, 0, 24, 262, 1, 0, 0, 0, 26, 270, 1, 0, 0, 0, 28, 289, 1, 0, 0, 0, 30, 300, 1, 0, 0, 0, 32, 305, 1, 0, 0, 0, 34, 311, 1, 0, 0, 0, 36, 315, 1, 0, 0, 0, 38, 326, 1, 0, 0, 0, 40, 356, 1, 0, 0, 0, 42, 366, 1, 0, 0, 0, 44, 368, 1, 0, 0, 0, 46, 370, 1, 0, 0, 0, 48, 372, 1, 0, 0, 0, 50, 376, 1, 0, 0, 0, 52, 386, 1, 0, 0, 0, 54, 391, 1, 0, 0, 0, 56, 396, 1, 0, 0, 0, 58, 400, 1, 0, 0, 0, 60, 414, 1, 0, 0, 0, 62, 422, 1, 0, 0, 0, 64, 428, 1, 0, 0, 0, 66, 432, 1, 0, 0, 0, 68, 447, 1, 0, 0, 0, 70, 452, 1, 0, 0, 0, 72, 467, 1, 0, 0, 0, 74, 481, 1, 0, 0, 0, 76, 492, 1, 0, 0, 0, 78, 496, 1, 0, 0, 0, 80, 509, 1, 0, 0, 0, 82, 521, 1, 0, 0, 0, 84, 538, 1, 0, 0, 0, 86, 552, 1, 0, 0, 0, 88, 554, 1, 0, 0, 0, 90, 565, 1, 0, 0, 0, 92, 585, 1, 0, 0, 0, 94, 588, 1, 0, 0, 0, 96, 103, 5, 10, 0, 0, 97, 103, 5, 11, 0, 0, 98, 103, 5, 12, 0, 0, 99, 103, 5, 13, 0, 0, 100, 103, 5, 14, 0, 0, 101, 103, 3, 2, 1, 0, 102, 96, 1, 0, 0, 0, 102, 97, 1, 0, 0, 0, 102, 98, 1, 0, 0, 0, 102, 99, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 101, 1, 0, 0, 0, 103, 1, 1, 0, 0, 0, 104, 105, 6, 1, -1, 0, 105, 106, 5, 49, 0, 0, 106, 107, 3, 2, 1, 0, 107, 108, 5, 50, 0, 0, 108, 114, 1, 0, 0, 0, 109, 110, 5, 89, 0, 0, 110, 111, 5, 79, 0, 0, 111, 114, 3, 2, 1, 2, 112, 114, 5, 88, 0, 0, 113, 104, 1, 0, 0, 0, 113, 109, 1, 0, 0, 0, 113, 112, 1, 0, 0, 0, 114, 126, 1, 0, 0, 0, 115, 118, 10, 3, 0, 0, 116, 119, 5, 77, 0, 0, 117, 119, 5, 79, 0, 0, 118, 116, 1, 0, 0, 0, 118, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 125, 3, 2, 1, 4, 121, 122, 10, 4, 0, 0, 122, 123, 5, 78, 0, 0, 123, 125, 3, 4, 2, 0, 124, 115, 1, 0, 0, 0, 124, 121, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 3, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 129, 131, 7, 0, 0, 0, 130, 129, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 133, 5, 89, 0, 0, 133, 5, 1, 0, 0, 0, 134, 135, 6, 3, -1, 0, 135, 136, 5, 49, 0, 0, 136, 137, 3, 6, 3, 0, 137, 138, 5, 50, 0, 0, 138, 146, 1, 0, 0, 0, 139, 140, 3, 10, 5, 0, 140, 141, 3, 6, 3, 9, 141, 146, 1, 0, 0, 0, 142, 143, 5, 28, 0, 0, 143, 146, 3, 6, 3, 4, 144, 146, 3, 8, 4, 0, 145, 134, 1, 0, 0, 0, 145, 139, 1, 0, 0, 0, 145, 142, 1, 0, 0, 0, 145, 144, 1, 0, 0, 0, 146, 183, 1, 0, 0, 0, 147, 148, 10, 10, 0, 0, 148, 149, 5, 78, 0, 0, 149, 182, 3, 6, 3, 10, 150, 154, 10, 8, 0, 0, 151, 155, 5, 77, 0, 0, 152, 155, 5, 79, 0, 0, 153, 155, 5, 80, 0, 0, 154, 151, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 182, 3, 6, 3, 9, 157, 160, 10, 7, 0, 0, 158, 161, 5, 51, 0, 0, 159, 161, 5, 75, 0, 0, 160, 158, 1, 0, 0, 0, 160, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 182, 3, 6, 3, 8, 163, 164, 10, 6, 0, 0, 164, 165, 3, 12, 6, 0, 165, 166, 3, 6, 3, 7, 166, 182, 1, 0, 0, 0, 167, 168, 10, 5, 0, 0, 168, 169, 3, 14, 7, 0, 169, 170, 3, 6, 3, 6, 170, 182, 1, 0, 0, 0, 171, 172, 10, 3, 0, 0, 172, 173, 3, 16, 8, 0, 173, 174, 3, 6, 3, 4, 174, 182, 1, 0, 0, 0, 175, 176, 10, 2, 0, 0, 176, 177, 5, 81, 0, 0, 177, 178, 3, 6, 3, 0, 178, 179, 5, 82, 0, 0, 179, 180, 3, 6, 3, 3, 180, 182, 1, 0, 0, 0, 181, 147, 1, 0, 0, 0, 181, 150, 1, 0, 0, 0, 181, 157, 1, 0, 0, 0, 181, 163, 1, 0, 0, 0, 181, 167, 1, 0, 0, 0, 181, 171, 1, 0, 0, 0, 181, 175, 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 7, 1, 0, 0, 0, 185, 183, 1, 0, 0, 0, 186, 196, 3, 20, 10, 0, 187, 196, 5, 86, 0, 0, 188, 190, 7, 1, 0, 0, 189, 191, 3, 18, 9, 0, 190, 189, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 196, 1, 0, 0, 0, 192, 196, 5, 87, 0, 0, 193, 196, 5, 25, 0, 0, 194, 196, 3, 18, 9, 0, 195, 186, 1, 0, 0, 0, 195, 187, 1, 0, 0, 0, 195, 188, 1, 0, 0, 0, 195, 192, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 195, 194, 1, 0, 0, 0, 196, 9, 1, 0, 0, 0, 197, 201, 5, 51, 0, 0, 198, 201, 5, 75, 0, 0, 199, 201, 5, 52, 0, 0, 200, 197, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 199, 1, 0, 0, 0, 201, 11, 1, 0, 0, 0, 202, 208, 5, 55, 0, 0, 203, 208, 5, 54, 0, 0, 204, 208, 5, 53, 0, 0, 205, 208, 5, 61, 0, 0, 206, 208, 5, 62, 0, 0, 207, 202, 1, 0, 0, 0, 207, 203, 1, 0, 0, 0, 207, 204, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 206, 1, 0, 0, 0, 208, 13, 1, 0, 0, 0, 209, 217, 5, 63, 0, 0, 210, 217, 5, 65, 0, 0, 211, 217, 5, 70, 0, 0, 212, 217, 5, 71, 0, 0, 213, 217, 5, 72, 0, 0, 214, 217, 5, 73, 0, 0, 215, 217, 5, 64, 0, 0, 216, 209, 1, 0, 0, 0, 216, 210, 1, 0, 0, 0, 216, 211, 1, 0, 0, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 15, 1, 0, 0, 0, 218, 221, 5, 26, 0, 0, 219, 221, 5, 27, 0, 0, 220, 218, 1, 0, 0, 0, 220, 219, 1, 0, 0, 0, 221, 17, 1, 0, 0, 0, 222, 227, 5, 88, 0, 0, 223, 224, 5, 56, 0, 0, 224, 225, 3, 6, 3, 0, 225, 226, 5, 58, 0, 0, 226, 228, 1, 0, 0, 0, 227, 223, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 232, 1, 0, 0, 0, 229, 231, 5, 85, 0, 0, 230, 229, 1, 0, 0, 0, 231, 234, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 19, 1, 0, 0, 0, 234, 232, 1, 0, 0, 0, 235, 236, 5, 88, 0, 0, 236, 245, 5, 49, 0, 0, 237, 242, 3, 6, 3, 0, 238, 239, 5, 74, 0, 0, 239, 241, 3, 6, 3, 0, 240, 238, 1, 0, 0, 0, 241, 244, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 246, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 245, 237, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 248, 5, 50, 0, 0, 248, 21, 1, 0, 0, 0, 249, 251, 5, 29, 0, 0, 250, 249, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 252, 1, 0, 0, 0, 252, 253, 5, 16, 0, 0, 253, 254, 5, 88, 0, 0, 254, 255, 3, 0, 0, 0, 255, 256, 5, 76, 0, 0, 256, 258, 3, 6, 3, 0, 257, 259, 5, 84, 0, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 5, 9, 0, 0, 261, 23, 1, 0, 0, 0, 262, 263, 3, 18, 9, 0, 263, 264, 5, 76, 0, 0, 264, 266, 3, 6, 3, 0, 265, 267, 5, 84, 0, 0, 266, 265, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 5, 9, 0, 0, 269, 25, 1, 0, 0, 0, 270, 271, 5, 30, 0, 0, 271, 272, 3, 18, 9, 0, 272, 273, 5, 76, 0, 0, 273, 281, 3, 6, 3, 0, 274, 275, 5, 4, 0, 0, 275, 276, 3, 18, 9, 0, 276, 277, 5, 76, 0, 0, 277, 278, 3, 6, 3, 0, 278, 280, 1, 0, 0, 0, 279, 274, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 285, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 284, 286, 5, 84, 0, 0, 285, 284, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 288, 5, 9, 0, 0, 288, 27, 1, 0, 0, 0, 289, 290, 5, 9, 0, 0, 290, 292, 5, 1, 0, 0, 291, 293, 3, 30, 15, 0, 292, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 297, 5, 2, 0, 0, 297, 29, 1, 0, 0, 0, 298, 301, 3, 34, 17, 0, 299, 301, 3, 32, 16, 0, 300, 298, 1, 0, 0, 0, 300, 299, 1, 0, 0, 0, 301, 31, 1, 0, 0, 0, 302, 306, 3, 50, 25, 0, 303, 306, 3, 58, 29, 0, 304, 306, 3, 60, 30, 0, 305, 302, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 305, 304, 1, 0, 0, 0, 306, 33, 1, 0, 0, 0, 307, 312, 3, 36, 18, 0, 308, 312, 3, 20, 10, 0, 309, 312, 3, 38, 19, 0, 310, 312, 3, 48, 24, 0, 311, 307, 1, 0, 0, 0, 311, 308, 1, 0, 0, 0, 311, 309, 1, 0, 0, 0, 311, 310, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 314, 5, 9, 0, 0, 314, 35, 1, 0, 0, 0, 315, 321, 3, 18, 9, 0, 316, 322, 5, 76, 0, 0, 317, 322, 5, 66, 0, 0, 318, 322, 5, 67, 0, 0, 319, 322, 5, 68, 0, 0, 320, 322, 5, 69, 0, 0, 321, 316, 1, 0, 0, 0, 321, 317, 1, 0, 0, 0, 321, 318, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 321, 320, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 3, 6, 3, 0, 324, 37, 1, 0, 0, 0, 325, 327, 5, 29, 0, 0, 326, 325, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 327, 329, 1, 0, 0, 0, 328, 330, 5, 16, 0, 0, 329, 328, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, 331, 336, 3, 18, 9, 0, 332, 333, 5, 74, 0, 0, 333, 335, 3, 18, 9, 0, 334, 332, 1, 0, 0, 0, 335, 338, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 342, 3, 0, 0, 0, 340, 341, 5, 76, 0, 0, 341, 343, 3, 6, 3, 0, 342, 340, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 348, 1, 0, 0, 0, 344, 345, 5, 59, 0, 0, 345, 346, 3, 6, 3, 0, 346, 347, 5, 60, 0, 0, 347, 349, 1, 0, 0, 0, 348, 344, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 353, 1, 0, 0, 0, 350, 352, 3, 42, 21, 0, 351, 350, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 39, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 357, 3, 38, 19, 0, 357, 358, 5, 9, 0, 0, 358, 41, 1, 0, 0, 0, 359, 367, 5, 45, 0, 0, 360, 367, 5, 46, 0, 0, 361, 362, 5, 47, 0, 0, 362, 363, 3, 44, 22, 0, 363, 364, 5, 83, 0, 0, 364, 365, 3, 46, 23, 0, 365, 367, 1, 0, 0, 0, 366, 359, 1, 0, 0, 0, 366, 360, 1, 0, 0, 0, 366, 361, 1, 0, 0, 0, 367, 43, 1, 0, 0, 0, 368, 369, 5, 88, 0, 0, 369, 45, 1, 0, 0, 0, 370, 371, 5, 88, 0, 0, 371, 47, 1, 0, 0, 0, 372, 374, 5, 17, 0, 0, 373, 375, 3, 6, 3, 0, 374, 373, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 49, 1, 0, 0, 0, 376, 380, 3, 52, 26, 0, 377, 379, 3, 54, 27, 0, 378, 377, 1, 0, 0, 0, 379, 382, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 384, 1, 0, 0, 0, 382, 380, 1, 0, 0, 0, 383, 385, 3, 56, 28, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 51, 1, 0, 0, 0, 386, 387, 5, 18, 0, 0, 387, 388, 3, 6, 3, 0, 388, 389, 5, 82, 0, 0, 389, 390, 3, 28, 14, 0, 390, 53, 1, 0, 0, 0, 391, 392, 5, 19, 0, 0, 392, 393, 3, 6, 3, 0, 393, 394, 5, 82, 0, 0, 394, 395, 3, 28, 14, 0, 395, 55, 1, 0, 0, 0, 396, 397, 5, 20, 0, 0, 397, 398, 5, 82, 0, 0, 398, 399, 3, 28, 14, 0, 399, 57, 1, 0, 0, 0, 400, 401, 5, 21, 0, 0, 401, 402, 5, 88, 0, 0, 402, 403, 5, 23, 0, 0, 403, 404, 3, 6, 3, 0, 404, 405, 5, 48, 0, 0, 405, 406, 3, 6, 3, 0, 406, 408, 5, 24, 0, 0, 407, 409, 5, 75, 0, 0, 408, 407, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 411, 7, 1, 0, 0, 411, 412, 5, 82, 0, 0, 412, 413, 3, 28, 14, 0, 413, 59, 1, 0, 0, 0, 414, 415, 5, 22, 0, 0, 415, 416, 3, 6, 3, 0, 416, 417, 5, 82, 0, 0, 417, 418, 3, 28, 14, 0, 418, 61, 1, 0, 0, 0, 419, 423, 3, 64, 32, 0, 420, 423, 3, 68, 34, 0, 421, 423, 5, 9, 0, 0, 422, 419, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 426, 1, 0, 0, 0, 426, 427, 5, 0, 0, 1, 427, 63, 1, 0, 0, 0, 428, 429, 5, 31, 0, 0, 429, 430, 5, 88, 0, 0, 430, 431, 3, 66, 33, 0, 431, 65, 1, 0, 0, 0, 432, 433, 5, 82, 0, 0, 433, 434, 5, 9, 0, 0, 434, 441, 5, 1, 0, 0, 435, 442, 3, 74, 37, 0, 436, 442, 3, 78, 39, 0, 437, 442, 3, 80, 40, 0, 438, 442, 3, 88, 44, 0, 439, 442, 3, 76, 38, 0, 440, 442, 3, 90, 45, 0, 441, 435, 1, 0, 0, 0, 441, 436, 1, 0, 0, 0, 441, 437, 1, 0, 0, 0, 441, 438, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 441, 1, 0, 0, 0, 443, 444, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 446, 5, 2, 0, 0, 446, 67, 1, 0, 0, 0, 447, 448, 5, 32, 0, 0, 448, 449, 5, 88, 0, 0, 449, 450, 5, 82, 0, 0, 450, 451, 3, 70, 35, 0, 451, 69, 1, 0, 0, 0, 452, 453, 5, 9, 0, 0, 453, 461, 5, 1, 0, 0, 454, 462, 3, 74, 37, 0, 455, 462, 3, 78, 39, 0, 456, 462, 3, 80, 40, 0, 457, 462, 3, 88, 44, 0, 458, 462, 3, 90, 45, 0, 459, 462, 3, 72, 36, 0, 460, 462, 3, 76, 38, 0, 461, 454, 1, 0, 0, 0, 461, 455, 1, 0, 0, 0, 461, 456, 1, 0, 0, 0, 461, 457, 1, 0, 0, 0, 461, 458, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 460, 1, 0, 0, 0, 462, 463, 1, 0, 0, 0, 463, 461, 1, 0, 0, 0, 463, 464, 1, 0, 0, 0, 464, 465, 1, 0, 0, 0, 465, 466, 5, 2, 0, 0, 466, 71, 1, 0, 0, 0, 467, 468, 5, 41, 0, 0, 468, 469, 5, 49, 0, 0, 469, 474, 5, 88, 0, 0, 470, 471, 5, 74, 0, 0, 471, 473, 3, 94, 47, 0, 472, 470, 1, 0, 0, 0, 473, 476, 1, 0, 0, 0, 474, 472, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 477, 1, 0, 0, 0, 476, 474, 1, 0, 0, 0, 477, 478, 5, 50, 0, 0, 478, 479, 5, 82, 0, 0, 479, 480, 3, 28, 14, 0, 480, 73, 1, 0, 0, 0, 481, 482, 7, 2, 0, 0, 482, 483, 5, 82, 0, 0, 483, 484, 5, 9, 0, 0, 484, 486, 5, 1, 0, 0, 485, 487, 3, 40, 20, 0, 486, 485, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 486, 1, 0, 0, 0, 488, 489, 1, 0, 0, 0, 489, 490, 1, 0, 0, 0, 490, 491, 5, 2, 0, 0, 491, 75, 1, 0, 0, 0, 492, 493, 5, 36, 0, 0, 493, 494, 5, 82, 0, 0, 494, 495, 3, 28, 14, 0, 495, 77, 1, 0, 0, 0, 496, 497, 5, 37, 0, 0, 497, 498, 5, 82, 0, 0, 498, 499, 5, 9, 0, 0, 499, 503, 5, 1, 0, 0, 500, 504, 3, 22, 11, 0, 501, 504, 3, 24, 12, 0, 502, 504, 3, 26, 13, 0, 503, 500, 1, 0, 0, 0, 503, 501, 1, 0, 0, 0, 503, 502, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 503, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 508, 5, 2, 0, 0, 508, 79, 1, 0, 0, 0, 509, 510, 5, 38, 0, 0, 510, 511, 5, 82, 0, 0, 511, 512, 5, 9, 0, 0, 512, 515, 5, 1, 0, 0, 513, 516, 3, 82, 41, 0, 514, 516, 3, 84, 42, 0, 515, 513, 1, 0, 0, 0, 515, 514, 1, 0, 0, 0, 516, 517, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 520, 5, 2, 0, 0, 520, 81, 1, 0, 0, 0, 521, 526, 5, 88, 0, 0, 522, 523, 5, 56, 0, 0, 523, 524, 3, 6, 3, 0, 524, 525, 5, 58, 0, 0, 525, 527, 1, 0, 0, 0, 526, 522, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 528, 1, 0, 0, 0, 528, 532, 5, 57, 0, 0, 529, 531, 3, 86, 43, 0, 530, 529, 1, 0, 0, 0, 531, 534, 1, 0, 0, 0, 532, 530, 1, 0, 0, 0, 532, 533, 1, 0, 0, 0, 533, 535, 1, 0, 0, 0, 534, 532, 1, 0, 0, 0, 535, 536, 5, 42, 0, 0, 536, 537, 5, 9, 0, 0, 537, 83, 1, 0, 0, 0, 538, 543, 5, 88, 0, 0, 539, 540, 5, 56, 0, 0, 540, 541, 3, 6, 3, 0, 541, 542, 5, 58, 0, 0, 542, 544, 1, 0, 0, 0, 543, 539, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 3, 0, 0, 0, 546, 547, 5, 57, 0, 0, 547, 548, 5, 40, 0, 0, 548, 549, 5, 9, 0, 0, 549, 85, 1, 0, 0, 0, 550, 553, 5, 43, 0, 0, 551, 553, 5, 44, 0, 0, 552, 550, 1, 0, 0, 0, 552, 551, 1, 0, 0, 0, 553, 87, 1, 0, 0, 0, 554, 555, 5, 39, 0, 0, 555, 556, 5, 82, 0, 0, 556, 557, 5, 9, 0, 0, 557, 560, 5, 1, 0, 0, 558, 561, 5, 42, 0, 0, 559, 561, 5, 40, 0, 0, 560, 558, 1, 0, 0, 0, 560, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 563, 5, 9, 0, 0, 563, 564, 5, 2, 0, 0, 564, 89, 1, 0, 0, 0, 565, 566, 5, 15, 0, 0, 566, 567, 5, 88, 0, 0, 567, 576, 5, 49, 0, 0, 568, 573, 3, 92, 46, 0, 569, 570, 5, 74, 0, 0, 570, 572, 3, 92, 46, 0, 571, 569, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 571, 1, 0, 0, 0, 573, 574, 1, 0, 0, 0, 574, 577, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 576, 568, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 580, 5, 50, 0, 0, 579, 581, 3, 0, 0, 0, 580, 579, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 583, 5, 82, 0, 0, 583, 584, 3, 28, 14, 0, 584, 91, 1, 0, 0, 0, 585, 586, 5, 88, 0, 0, 586, 587, 3, 0, 0, 0, 587, 93, 1, 0, 0, 0, 588, 589, 5, 88, 0, 0, 589, 590, 5, 76, 0, 0, 590, 591, 7, 3, 0, 0, 591, 95, 1, 0, 0, 0, 62, 102, 113, 118, 124, 126, 130, 145, 154, 160, 181, 183, 190, 195, 200, 207, 216, 220, 227, 232, 242, 245, 250, 258, 266, 281, 285, 294, 300, 305, 311, 321, 326, 329, 336, 342, 348, 353, 366, 374, 380, 384, 408, 422, 424, 441, 443, 461, 463, 474, 488, 503, 505, 515, 517, 526, 532, 543, 552, 560, 573, 576, 580] \ No newline at end of file diff --git a/pynestml/generated/PyNestMLParser.py b/pynestml/generated/PyNestMLParser.py index 0c25a188e..14e11d9d2 100644 --- a/pynestml/generated/PyNestMLParser.py +++ b/pynestml/generated/PyNestMLParser.py @@ -10,222 +10,225 @@ def serializedATN(): return [ - 4,1,90,584,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,90,593,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, 2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20, 7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26, 2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33, 7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39, 2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46, - 7,46,1,0,1,0,1,0,1,0,1,0,1,0,3,0,101,8,0,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,3,1,112,8,1,1,1,1,1,1,1,3,1,117,8,1,1,1,1,1,1,1,1,1, - 5,1,123,8,1,10,1,12,1,126,9,1,1,2,3,2,129,8,2,1,2,1,2,1,3,1,3,1, - 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,144,8,3,1,3,1,3,1,3,1,3,1, - 3,1,3,1,3,3,3,153,8,3,1,3,1,3,1,3,1,3,3,3,159,8,3,1,3,1,3,1,3,1, - 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5, - 3,180,8,3,10,3,12,3,183,9,3,1,4,1,4,1,4,1,4,3,4,189,8,4,1,4,1,4, - 1,4,3,4,194,8,4,1,5,1,5,1,5,3,5,199,8,5,1,6,1,6,1,6,1,6,1,6,3,6, - 206,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,215,8,7,1,8,1,8,3,8,219, - 8,8,1,9,1,9,1,9,1,9,1,9,3,9,226,8,9,1,9,5,9,229,8,9,10,9,12,9,232, - 9,9,1,10,1,10,1,10,1,10,1,10,5,10,239,8,10,10,10,12,10,242,9,10, - 3,10,244,8,10,1,10,1,10,1,11,3,11,249,8,11,1,11,1,11,1,11,1,11,1, - 11,1,11,3,11,257,8,11,1,11,1,11,1,12,1,12,1,12,1,12,3,12,265,8,12, - 1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,5,13,278, - 8,13,10,13,12,13,281,9,13,1,13,3,13,284,8,13,1,13,1,13,1,14,1,14, - 1,14,4,14,291,8,14,11,14,12,14,292,1,14,1,14,1,15,1,15,3,15,299, - 8,15,1,16,1,16,1,16,3,16,304,8,16,1,17,1,17,1,17,1,17,3,17,310,8, - 17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,3,18,320,8,18,1,18,1, - 18,1,19,3,19,325,8,19,1,19,3,19,328,8,19,1,19,1,19,1,19,5,19,333, - 8,19,10,19,12,19,336,9,19,1,19,1,19,1,19,3,19,341,8,19,1,19,1,19, - 1,19,1,19,3,19,347,8,19,1,19,5,19,350,8,19,10,19,12,19,353,9,19, - 1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,3,21,365,8,21, - 1,22,1,22,1,23,1,23,1,24,1,24,3,24,373,8,24,1,25,1,25,5,25,377,8, - 25,10,25,12,25,380,9,25,1,25,3,25,383,8,25,1,26,1,26,1,26,1,26,1, - 26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,3,29,407,8,29,1,29,1,29,1,29,1,29,1,30,1, - 30,1,30,1,30,1,30,1,31,1,31,1,31,4,31,421,8,31,11,31,12,31,422,1, - 31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,4,33,440,8,33,11,33,12,33,441,1,33,1,33,1,34,1,34,1,34,1, - 34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,4,35,460,8, - 35,11,35,12,35,461,1,35,1,35,1,36,1,36,1,36,1,36,1,36,5,36,471,8, - 36,10,36,12,36,474,9,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37, - 1,37,4,37,485,8,37,11,37,12,37,486,1,37,1,37,1,38,1,38,1,38,1,38, - 1,39,1,39,1,39,1,39,1,39,1,39,1,39,4,39,502,8,39,11,39,12,39,503, - 1,39,1,39,1,40,1,40,1,40,1,40,1,40,4,40,513,8,40,11,40,12,40,514, - 1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,524,8,41,1,41,3,41,527,8, - 41,1,41,1,41,5,41,531,8,41,10,41,12,41,534,9,41,1,41,1,41,3,41,538, - 8,41,1,41,1,41,1,42,1,42,3,42,544,8,42,1,43,1,43,1,43,1,43,1,43, - 1,43,3,43,552,8,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44, - 5,44,563,8,44,10,44,12,44,566,9,44,3,44,568,8,44,1,44,1,44,3,44, - 572,8,44,1,44,1,44,1,44,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46, - 0,2,2,6,47,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38, - 40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82, - 84,86,88,90,92,0,4,2,0,51,51,75,75,1,0,89,90,1,0,33,35,3,0,25,25, - 86,87,89,90,642,0,100,1,0,0,0,2,111,1,0,0,0,4,128,1,0,0,0,6,143, - 1,0,0,0,8,193,1,0,0,0,10,198,1,0,0,0,12,205,1,0,0,0,14,214,1,0,0, - 0,16,218,1,0,0,0,18,220,1,0,0,0,20,233,1,0,0,0,22,248,1,0,0,0,24, - 260,1,0,0,0,26,268,1,0,0,0,28,287,1,0,0,0,30,298,1,0,0,0,32,303, - 1,0,0,0,34,309,1,0,0,0,36,313,1,0,0,0,38,324,1,0,0,0,40,354,1,0, - 0,0,42,364,1,0,0,0,44,366,1,0,0,0,46,368,1,0,0,0,48,370,1,0,0,0, - 50,374,1,0,0,0,52,384,1,0,0,0,54,389,1,0,0,0,56,394,1,0,0,0,58,398, - 1,0,0,0,60,412,1,0,0,0,62,420,1,0,0,0,64,426,1,0,0,0,66,430,1,0, - 0,0,68,445,1,0,0,0,70,450,1,0,0,0,72,465,1,0,0,0,74,479,1,0,0,0, - 76,490,1,0,0,0,78,494,1,0,0,0,80,507,1,0,0,0,82,518,1,0,0,0,84,543, - 1,0,0,0,86,545,1,0,0,0,88,556,1,0,0,0,90,576,1,0,0,0,92,579,1,0, - 0,0,94,101,5,10,0,0,95,101,5,11,0,0,96,101,5,12,0,0,97,101,5,13, - 0,0,98,101,5,14,0,0,99,101,3,2,1,0,100,94,1,0,0,0,100,95,1,0,0,0, - 100,96,1,0,0,0,100,97,1,0,0,0,100,98,1,0,0,0,100,99,1,0,0,0,101, - 1,1,0,0,0,102,103,6,1,-1,0,103,104,5,49,0,0,104,105,3,2,1,0,105, - 106,5,50,0,0,106,112,1,0,0,0,107,108,5,89,0,0,108,109,5,79,0,0,109, - 112,3,2,1,2,110,112,5,88,0,0,111,102,1,0,0,0,111,107,1,0,0,0,111, - 110,1,0,0,0,112,124,1,0,0,0,113,116,10,3,0,0,114,117,5,77,0,0,115, - 117,5,79,0,0,116,114,1,0,0,0,116,115,1,0,0,0,117,118,1,0,0,0,118, - 123,3,2,1,4,119,120,10,4,0,0,120,121,5,78,0,0,121,123,3,4,2,0,122, - 113,1,0,0,0,122,119,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,124, - 125,1,0,0,0,125,3,1,0,0,0,126,124,1,0,0,0,127,129,7,0,0,0,128,127, - 1,0,0,0,128,129,1,0,0,0,129,130,1,0,0,0,130,131,5,89,0,0,131,5,1, - 0,0,0,132,133,6,3,-1,0,133,134,5,49,0,0,134,135,3,6,3,0,135,136, - 5,50,0,0,136,144,1,0,0,0,137,138,3,10,5,0,138,139,3,6,3,9,139,144, - 1,0,0,0,140,141,5,28,0,0,141,144,3,6,3,4,142,144,3,8,4,0,143,132, - 1,0,0,0,143,137,1,0,0,0,143,140,1,0,0,0,143,142,1,0,0,0,144,181, - 1,0,0,0,145,146,10,10,0,0,146,147,5,78,0,0,147,180,3,6,3,10,148, - 152,10,8,0,0,149,153,5,77,0,0,150,153,5,79,0,0,151,153,5,80,0,0, - 152,149,1,0,0,0,152,150,1,0,0,0,152,151,1,0,0,0,153,154,1,0,0,0, - 154,180,3,6,3,9,155,158,10,7,0,0,156,159,5,51,0,0,157,159,5,75,0, - 0,158,156,1,0,0,0,158,157,1,0,0,0,159,160,1,0,0,0,160,180,3,6,3, - 8,161,162,10,6,0,0,162,163,3,12,6,0,163,164,3,6,3,7,164,180,1,0, - 0,0,165,166,10,5,0,0,166,167,3,14,7,0,167,168,3,6,3,6,168,180,1, - 0,0,0,169,170,10,3,0,0,170,171,3,16,8,0,171,172,3,6,3,4,172,180, - 1,0,0,0,173,174,10,2,0,0,174,175,5,81,0,0,175,176,3,6,3,0,176,177, - 5,82,0,0,177,178,3,6,3,3,178,180,1,0,0,0,179,145,1,0,0,0,179,148, - 1,0,0,0,179,155,1,0,0,0,179,161,1,0,0,0,179,165,1,0,0,0,179,169, - 1,0,0,0,179,173,1,0,0,0,180,183,1,0,0,0,181,179,1,0,0,0,181,182, - 1,0,0,0,182,7,1,0,0,0,183,181,1,0,0,0,184,194,3,20,10,0,185,194, - 5,86,0,0,186,188,7,1,0,0,187,189,3,18,9,0,188,187,1,0,0,0,188,189, - 1,0,0,0,189,194,1,0,0,0,190,194,5,87,0,0,191,194,5,25,0,0,192,194, - 3,18,9,0,193,184,1,0,0,0,193,185,1,0,0,0,193,186,1,0,0,0,193,190, - 1,0,0,0,193,191,1,0,0,0,193,192,1,0,0,0,194,9,1,0,0,0,195,199,5, - 51,0,0,196,199,5,75,0,0,197,199,5,52,0,0,198,195,1,0,0,0,198,196, - 1,0,0,0,198,197,1,0,0,0,199,11,1,0,0,0,200,206,5,55,0,0,201,206, - 5,54,0,0,202,206,5,53,0,0,203,206,5,61,0,0,204,206,5,62,0,0,205, - 200,1,0,0,0,205,201,1,0,0,0,205,202,1,0,0,0,205,203,1,0,0,0,205, - 204,1,0,0,0,206,13,1,0,0,0,207,215,5,63,0,0,208,215,5,65,0,0,209, - 215,5,70,0,0,210,215,5,71,0,0,211,215,5,72,0,0,212,215,5,73,0,0, - 213,215,5,64,0,0,214,207,1,0,0,0,214,208,1,0,0,0,214,209,1,0,0,0, - 214,210,1,0,0,0,214,211,1,0,0,0,214,212,1,0,0,0,214,213,1,0,0,0, - 215,15,1,0,0,0,216,219,5,26,0,0,217,219,5,27,0,0,218,216,1,0,0,0, - 218,217,1,0,0,0,219,17,1,0,0,0,220,225,5,88,0,0,221,222,5,56,0,0, - 222,223,3,6,3,0,223,224,5,58,0,0,224,226,1,0,0,0,225,221,1,0,0,0, - 225,226,1,0,0,0,226,230,1,0,0,0,227,229,5,85,0,0,228,227,1,0,0,0, - 229,232,1,0,0,0,230,228,1,0,0,0,230,231,1,0,0,0,231,19,1,0,0,0,232, - 230,1,0,0,0,233,234,5,88,0,0,234,243,5,49,0,0,235,240,3,6,3,0,236, - 237,5,74,0,0,237,239,3,6,3,0,238,236,1,0,0,0,239,242,1,0,0,0,240, - 238,1,0,0,0,240,241,1,0,0,0,241,244,1,0,0,0,242,240,1,0,0,0,243, - 235,1,0,0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,246,5,50,0,0,246, - 21,1,0,0,0,247,249,5,29,0,0,248,247,1,0,0,0,248,249,1,0,0,0,249, - 250,1,0,0,0,250,251,5,16,0,0,251,252,5,88,0,0,252,253,3,0,0,0,253, - 254,5,76,0,0,254,256,3,6,3,0,255,257,5,84,0,0,256,255,1,0,0,0,256, - 257,1,0,0,0,257,258,1,0,0,0,258,259,5,9,0,0,259,23,1,0,0,0,260,261, - 3,18,9,0,261,262,5,76,0,0,262,264,3,6,3,0,263,265,5,84,0,0,264,263, - 1,0,0,0,264,265,1,0,0,0,265,266,1,0,0,0,266,267,5,9,0,0,267,25,1, - 0,0,0,268,269,5,30,0,0,269,270,3,18,9,0,270,271,5,76,0,0,271,279, - 3,6,3,0,272,273,5,4,0,0,273,274,3,18,9,0,274,275,5,76,0,0,275,276, - 3,6,3,0,276,278,1,0,0,0,277,272,1,0,0,0,278,281,1,0,0,0,279,277, - 1,0,0,0,279,280,1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,282,284, - 5,84,0,0,283,282,1,0,0,0,283,284,1,0,0,0,284,285,1,0,0,0,285,286, - 5,9,0,0,286,27,1,0,0,0,287,288,5,9,0,0,288,290,5,1,0,0,289,291,3, - 30,15,0,290,289,1,0,0,0,291,292,1,0,0,0,292,290,1,0,0,0,292,293, - 1,0,0,0,293,294,1,0,0,0,294,295,5,2,0,0,295,29,1,0,0,0,296,299,3, - 34,17,0,297,299,3,32,16,0,298,296,1,0,0,0,298,297,1,0,0,0,299,31, - 1,0,0,0,300,304,3,50,25,0,301,304,3,58,29,0,302,304,3,60,30,0,303, - 300,1,0,0,0,303,301,1,0,0,0,303,302,1,0,0,0,304,33,1,0,0,0,305,310, - 3,36,18,0,306,310,3,20,10,0,307,310,3,38,19,0,308,310,3,48,24,0, - 309,305,1,0,0,0,309,306,1,0,0,0,309,307,1,0,0,0,309,308,1,0,0,0, - 310,311,1,0,0,0,311,312,5,9,0,0,312,35,1,0,0,0,313,319,3,18,9,0, - 314,320,5,76,0,0,315,320,5,66,0,0,316,320,5,67,0,0,317,320,5,68, - 0,0,318,320,5,69,0,0,319,314,1,0,0,0,319,315,1,0,0,0,319,316,1,0, - 0,0,319,317,1,0,0,0,319,318,1,0,0,0,320,321,1,0,0,0,321,322,3,6, - 3,0,322,37,1,0,0,0,323,325,5,29,0,0,324,323,1,0,0,0,324,325,1,0, - 0,0,325,327,1,0,0,0,326,328,5,16,0,0,327,326,1,0,0,0,327,328,1,0, - 0,0,328,329,1,0,0,0,329,334,3,18,9,0,330,331,5,74,0,0,331,333,3, - 18,9,0,332,330,1,0,0,0,333,336,1,0,0,0,334,332,1,0,0,0,334,335,1, - 0,0,0,335,337,1,0,0,0,336,334,1,0,0,0,337,340,3,0,0,0,338,339,5, - 76,0,0,339,341,3,6,3,0,340,338,1,0,0,0,340,341,1,0,0,0,341,346,1, - 0,0,0,342,343,5,59,0,0,343,344,3,6,3,0,344,345,5,60,0,0,345,347, - 1,0,0,0,346,342,1,0,0,0,346,347,1,0,0,0,347,351,1,0,0,0,348,350, - 3,42,21,0,349,348,1,0,0,0,350,353,1,0,0,0,351,349,1,0,0,0,351,352, - 1,0,0,0,352,39,1,0,0,0,353,351,1,0,0,0,354,355,3,38,19,0,355,356, - 5,9,0,0,356,41,1,0,0,0,357,365,5,45,0,0,358,365,5,46,0,0,359,360, - 5,47,0,0,360,361,3,44,22,0,361,362,5,83,0,0,362,363,3,46,23,0,363, - 365,1,0,0,0,364,357,1,0,0,0,364,358,1,0,0,0,364,359,1,0,0,0,365, - 43,1,0,0,0,366,367,5,88,0,0,367,45,1,0,0,0,368,369,5,88,0,0,369, - 47,1,0,0,0,370,372,5,17,0,0,371,373,3,6,3,0,372,371,1,0,0,0,372, - 373,1,0,0,0,373,49,1,0,0,0,374,378,3,52,26,0,375,377,3,54,27,0,376, - 375,1,0,0,0,377,380,1,0,0,0,378,376,1,0,0,0,378,379,1,0,0,0,379, - 382,1,0,0,0,380,378,1,0,0,0,381,383,3,56,28,0,382,381,1,0,0,0,382, - 383,1,0,0,0,383,51,1,0,0,0,384,385,5,18,0,0,385,386,3,6,3,0,386, - 387,5,82,0,0,387,388,3,28,14,0,388,53,1,0,0,0,389,390,5,19,0,0,390, - 391,3,6,3,0,391,392,5,82,0,0,392,393,3,28,14,0,393,55,1,0,0,0,394, - 395,5,20,0,0,395,396,5,82,0,0,396,397,3,28,14,0,397,57,1,0,0,0,398, - 399,5,21,0,0,399,400,5,88,0,0,400,401,5,23,0,0,401,402,3,6,3,0,402, - 403,5,48,0,0,403,404,3,6,3,0,404,406,5,24,0,0,405,407,5,75,0,0,406, - 405,1,0,0,0,406,407,1,0,0,0,407,408,1,0,0,0,408,409,7,1,0,0,409, - 410,5,82,0,0,410,411,3,28,14,0,411,59,1,0,0,0,412,413,5,22,0,0,413, - 414,3,6,3,0,414,415,5,82,0,0,415,416,3,28,14,0,416,61,1,0,0,0,417, - 421,3,64,32,0,418,421,3,68,34,0,419,421,5,9,0,0,420,417,1,0,0,0, - 420,418,1,0,0,0,420,419,1,0,0,0,421,422,1,0,0,0,422,420,1,0,0,0, - 422,423,1,0,0,0,423,424,1,0,0,0,424,425,5,0,0,1,425,63,1,0,0,0,426, - 427,5,31,0,0,427,428,5,88,0,0,428,429,3,66,33,0,429,65,1,0,0,0,430, - 431,5,82,0,0,431,432,5,9,0,0,432,439,5,1,0,0,433,440,3,74,37,0,434, - 440,3,78,39,0,435,440,3,80,40,0,436,440,3,86,43,0,437,440,3,76,38, - 0,438,440,3,88,44,0,439,433,1,0,0,0,439,434,1,0,0,0,439,435,1,0, - 0,0,439,436,1,0,0,0,439,437,1,0,0,0,439,438,1,0,0,0,440,441,1,0, - 0,0,441,439,1,0,0,0,441,442,1,0,0,0,442,443,1,0,0,0,443,444,5,2, - 0,0,444,67,1,0,0,0,445,446,5,32,0,0,446,447,5,88,0,0,447,448,5,82, - 0,0,448,449,3,70,35,0,449,69,1,0,0,0,450,451,5,9,0,0,451,459,5,1, - 0,0,452,460,3,74,37,0,453,460,3,78,39,0,454,460,3,80,40,0,455,460, - 3,86,43,0,456,460,3,88,44,0,457,460,3,72,36,0,458,460,3,76,38,0, - 459,452,1,0,0,0,459,453,1,0,0,0,459,454,1,0,0,0,459,455,1,0,0,0, - 459,456,1,0,0,0,459,457,1,0,0,0,459,458,1,0,0,0,460,461,1,0,0,0, - 461,459,1,0,0,0,461,462,1,0,0,0,462,463,1,0,0,0,463,464,5,2,0,0, - 464,71,1,0,0,0,465,466,5,41,0,0,466,467,5,49,0,0,467,472,5,88,0, - 0,468,469,5,74,0,0,469,471,3,92,46,0,470,468,1,0,0,0,471,474,1,0, - 0,0,472,470,1,0,0,0,472,473,1,0,0,0,473,475,1,0,0,0,474,472,1,0, - 0,0,475,476,5,50,0,0,476,477,5,82,0,0,477,478,3,28,14,0,478,73,1, - 0,0,0,479,480,7,2,0,0,480,481,5,82,0,0,481,482,5,9,0,0,482,484,5, - 1,0,0,483,485,3,40,20,0,484,483,1,0,0,0,485,486,1,0,0,0,486,484, - 1,0,0,0,486,487,1,0,0,0,487,488,1,0,0,0,488,489,5,2,0,0,489,75,1, - 0,0,0,490,491,5,36,0,0,491,492,5,82,0,0,492,493,3,28,14,0,493,77, - 1,0,0,0,494,495,5,37,0,0,495,496,5,82,0,0,496,497,5,9,0,0,497,501, - 5,1,0,0,498,502,3,22,11,0,499,502,3,24,12,0,500,502,3,26,13,0,501, - 498,1,0,0,0,501,499,1,0,0,0,501,500,1,0,0,0,502,503,1,0,0,0,503, - 501,1,0,0,0,503,504,1,0,0,0,504,505,1,0,0,0,505,506,5,2,0,0,506, - 79,1,0,0,0,507,508,5,38,0,0,508,509,5,82,0,0,509,510,5,9,0,0,510, - 512,5,1,0,0,511,513,3,82,41,0,512,511,1,0,0,0,513,514,1,0,0,0,514, - 512,1,0,0,0,514,515,1,0,0,0,515,516,1,0,0,0,516,517,5,2,0,0,517, - 81,1,0,0,0,518,523,5,88,0,0,519,520,5,56,0,0,520,521,3,6,3,0,521, - 522,5,58,0,0,522,524,1,0,0,0,523,519,1,0,0,0,523,524,1,0,0,0,524, - 526,1,0,0,0,525,527,3,0,0,0,526,525,1,0,0,0,526,527,1,0,0,0,527, - 528,1,0,0,0,528,532,5,57,0,0,529,531,3,84,42,0,530,529,1,0,0,0,531, - 534,1,0,0,0,532,530,1,0,0,0,532,533,1,0,0,0,533,537,1,0,0,0,534, - 532,1,0,0,0,535,538,5,40,0,0,536,538,5,42,0,0,537,535,1,0,0,0,537, - 536,1,0,0,0,538,539,1,0,0,0,539,540,5,9,0,0,540,83,1,0,0,0,541,544, - 5,43,0,0,542,544,5,44,0,0,543,541,1,0,0,0,543,542,1,0,0,0,544,85, - 1,0,0,0,545,546,5,39,0,0,546,547,5,82,0,0,547,548,5,9,0,0,548,551, - 5,1,0,0,549,552,5,42,0,0,550,552,5,40,0,0,551,549,1,0,0,0,551,550, - 1,0,0,0,552,553,1,0,0,0,553,554,5,9,0,0,554,555,5,2,0,0,555,87,1, - 0,0,0,556,557,5,15,0,0,557,558,5,88,0,0,558,567,5,49,0,0,559,564, - 3,90,45,0,560,561,5,74,0,0,561,563,3,90,45,0,562,560,1,0,0,0,563, - 566,1,0,0,0,564,562,1,0,0,0,564,565,1,0,0,0,565,568,1,0,0,0,566, - 564,1,0,0,0,567,559,1,0,0,0,567,568,1,0,0,0,568,569,1,0,0,0,569, - 571,5,50,0,0,570,572,3,0,0,0,571,570,1,0,0,0,571,572,1,0,0,0,572, - 573,1,0,0,0,573,574,5,82,0,0,574,575,3,28,14,0,575,89,1,0,0,0,576, - 577,5,88,0,0,577,578,3,0,0,0,578,91,1,0,0,0,579,580,5,88,0,0,580, - 581,5,76,0,0,581,582,7,3,0,0,582,93,1,0,0,0,62,100,111,116,122,124, - 128,143,152,158,179,181,188,193,198,205,214,218,225,230,240,243, - 248,256,264,279,283,292,298,303,309,319,324,327,334,340,346,351, - 364,372,378,382,406,420,422,439,441,459,461,472,486,501,503,514, - 523,526,532,537,543,551,564,567,571 + 7,46,2,47,7,47,1,0,1,0,1,0,1,0,1,0,1,0,3,0,103,8,0,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,3,1,114,8,1,1,1,1,1,1,1,3,1,119,8,1,1,1,1, + 1,1,1,1,1,5,1,125,8,1,10,1,12,1,128,9,1,1,2,3,2,131,8,2,1,2,1,2, + 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,146,8,3,1,3,1,3, + 1,3,1,3,1,3,1,3,1,3,3,3,155,8,3,1,3,1,3,1,3,1,3,3,3,161,8,3,1,3, + 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, + 1,3,1,3,5,3,182,8,3,10,3,12,3,185,9,3,1,4,1,4,1,4,1,4,3,4,191,8, + 4,1,4,1,4,1,4,3,4,196,8,4,1,5,1,5,1,5,3,5,201,8,5,1,6,1,6,1,6,1, + 6,1,6,3,6,208,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,217,8,7,1,8,1, + 8,3,8,221,8,8,1,9,1,9,1,9,1,9,1,9,3,9,228,8,9,1,9,5,9,231,8,9,10, + 9,12,9,234,9,9,1,10,1,10,1,10,1,10,1,10,5,10,241,8,10,10,10,12,10, + 244,9,10,3,10,246,8,10,1,10,1,10,1,11,3,11,251,8,11,1,11,1,11,1, + 11,1,11,1,11,1,11,3,11,259,8,11,1,11,1,11,1,12,1,12,1,12,1,12,3, + 12,267,8,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,5,13,280,8,13,10,13,12,13,283,9,13,1,13,3,13,286,8,13,1,13,1, + 13,1,14,1,14,1,14,4,14,293,8,14,11,14,12,14,294,1,14,1,14,1,15,1, + 15,3,15,301,8,15,1,16,1,16,1,16,3,16,306,8,16,1,17,1,17,1,17,1,17, + 3,17,312,8,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,3,18,322,8, + 18,1,18,1,18,1,19,3,19,327,8,19,1,19,3,19,330,8,19,1,19,1,19,1,19, + 5,19,335,8,19,10,19,12,19,338,9,19,1,19,1,19,1,19,3,19,343,8,19, + 1,19,1,19,1,19,1,19,3,19,349,8,19,1,19,5,19,352,8,19,10,19,12,19, + 355,9,19,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,3,21, + 367,8,21,1,22,1,22,1,23,1,23,1,24,1,24,3,24,375,8,24,1,25,1,25,5, + 25,379,8,25,10,25,12,25,382,9,25,1,25,3,25,385,8,25,1,26,1,26,1, + 26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,29,1, + 29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,409,8,29,1,29,1,29,1,29,1, + 29,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,4,31,423,8,31,11,31,12, + 31,424,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1, + 33,1,33,1,33,1,33,4,33,442,8,33,11,33,12,33,443,1,33,1,33,1,34,1, + 34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,4, + 35,462,8,35,11,35,12,35,463,1,35,1,35,1,36,1,36,1,36,1,36,1,36,5, + 36,473,8,36,10,36,12,36,476,9,36,1,36,1,36,1,36,1,36,1,37,1,37,1, + 37,1,37,1,37,4,37,487,8,37,11,37,12,37,488,1,37,1,37,1,38,1,38,1, + 38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,4,39,504,8,39,11,39,12, + 39,505,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,4,40,516,8,40,11, + 40,12,40,517,1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,527,8,41,1, + 41,1,41,5,41,531,8,41,10,41,12,41,534,9,41,1,41,1,41,1,41,1,42,1, + 42,1,42,1,42,1,42,3,42,544,8,42,1,42,1,42,1,42,1,42,1,42,1,43,1, + 43,3,43,553,8,43,1,44,1,44,1,44,1,44,1,44,1,44,3,44,561,8,44,1,44, + 1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,5,45,572,8,45,10,45,12,45, + 575,9,45,3,45,577,8,45,1,45,1,45,3,45,581,8,45,1,45,1,45,1,45,1, + 46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,0,2,2,6,48,0,2,4,6,8,10,12, + 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56, + 58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,0,4,2,0, + 51,51,75,75,1,0,89,90,1,0,33,35,3,0,25,25,86,87,89,90,650,0,102, + 1,0,0,0,2,113,1,0,0,0,4,130,1,0,0,0,6,145,1,0,0,0,8,195,1,0,0,0, + 10,200,1,0,0,0,12,207,1,0,0,0,14,216,1,0,0,0,16,220,1,0,0,0,18,222, + 1,0,0,0,20,235,1,0,0,0,22,250,1,0,0,0,24,262,1,0,0,0,26,270,1,0, + 0,0,28,289,1,0,0,0,30,300,1,0,0,0,32,305,1,0,0,0,34,311,1,0,0,0, + 36,315,1,0,0,0,38,326,1,0,0,0,40,356,1,0,0,0,42,366,1,0,0,0,44,368, + 1,0,0,0,46,370,1,0,0,0,48,372,1,0,0,0,50,376,1,0,0,0,52,386,1,0, + 0,0,54,391,1,0,0,0,56,396,1,0,0,0,58,400,1,0,0,0,60,414,1,0,0,0, + 62,422,1,0,0,0,64,428,1,0,0,0,66,432,1,0,0,0,68,447,1,0,0,0,70,452, + 1,0,0,0,72,467,1,0,0,0,74,481,1,0,0,0,76,492,1,0,0,0,78,496,1,0, + 0,0,80,509,1,0,0,0,82,521,1,0,0,0,84,538,1,0,0,0,86,552,1,0,0,0, + 88,554,1,0,0,0,90,565,1,0,0,0,92,585,1,0,0,0,94,588,1,0,0,0,96,103, + 5,10,0,0,97,103,5,11,0,0,98,103,5,12,0,0,99,103,5,13,0,0,100,103, + 5,14,0,0,101,103,3,2,1,0,102,96,1,0,0,0,102,97,1,0,0,0,102,98,1, + 0,0,0,102,99,1,0,0,0,102,100,1,0,0,0,102,101,1,0,0,0,103,1,1,0,0, + 0,104,105,6,1,-1,0,105,106,5,49,0,0,106,107,3,2,1,0,107,108,5,50, + 0,0,108,114,1,0,0,0,109,110,5,89,0,0,110,111,5,79,0,0,111,114,3, + 2,1,2,112,114,5,88,0,0,113,104,1,0,0,0,113,109,1,0,0,0,113,112,1, + 0,0,0,114,126,1,0,0,0,115,118,10,3,0,0,116,119,5,77,0,0,117,119, + 5,79,0,0,118,116,1,0,0,0,118,117,1,0,0,0,119,120,1,0,0,0,120,125, + 3,2,1,4,121,122,10,4,0,0,122,123,5,78,0,0,123,125,3,4,2,0,124,115, + 1,0,0,0,124,121,1,0,0,0,125,128,1,0,0,0,126,124,1,0,0,0,126,127, + 1,0,0,0,127,3,1,0,0,0,128,126,1,0,0,0,129,131,7,0,0,0,130,129,1, + 0,0,0,130,131,1,0,0,0,131,132,1,0,0,0,132,133,5,89,0,0,133,5,1,0, + 0,0,134,135,6,3,-1,0,135,136,5,49,0,0,136,137,3,6,3,0,137,138,5, + 50,0,0,138,146,1,0,0,0,139,140,3,10,5,0,140,141,3,6,3,9,141,146, + 1,0,0,0,142,143,5,28,0,0,143,146,3,6,3,4,144,146,3,8,4,0,145,134, + 1,0,0,0,145,139,1,0,0,0,145,142,1,0,0,0,145,144,1,0,0,0,146,183, + 1,0,0,0,147,148,10,10,0,0,148,149,5,78,0,0,149,182,3,6,3,10,150, + 154,10,8,0,0,151,155,5,77,0,0,152,155,5,79,0,0,153,155,5,80,0,0, + 154,151,1,0,0,0,154,152,1,0,0,0,154,153,1,0,0,0,155,156,1,0,0,0, + 156,182,3,6,3,9,157,160,10,7,0,0,158,161,5,51,0,0,159,161,5,75,0, + 0,160,158,1,0,0,0,160,159,1,0,0,0,161,162,1,0,0,0,162,182,3,6,3, + 8,163,164,10,6,0,0,164,165,3,12,6,0,165,166,3,6,3,7,166,182,1,0, + 0,0,167,168,10,5,0,0,168,169,3,14,7,0,169,170,3,6,3,6,170,182,1, + 0,0,0,171,172,10,3,0,0,172,173,3,16,8,0,173,174,3,6,3,4,174,182, + 1,0,0,0,175,176,10,2,0,0,176,177,5,81,0,0,177,178,3,6,3,0,178,179, + 5,82,0,0,179,180,3,6,3,3,180,182,1,0,0,0,181,147,1,0,0,0,181,150, + 1,0,0,0,181,157,1,0,0,0,181,163,1,0,0,0,181,167,1,0,0,0,181,171, + 1,0,0,0,181,175,1,0,0,0,182,185,1,0,0,0,183,181,1,0,0,0,183,184, + 1,0,0,0,184,7,1,0,0,0,185,183,1,0,0,0,186,196,3,20,10,0,187,196, + 5,86,0,0,188,190,7,1,0,0,189,191,3,18,9,0,190,189,1,0,0,0,190,191, + 1,0,0,0,191,196,1,0,0,0,192,196,5,87,0,0,193,196,5,25,0,0,194,196, + 3,18,9,0,195,186,1,0,0,0,195,187,1,0,0,0,195,188,1,0,0,0,195,192, + 1,0,0,0,195,193,1,0,0,0,195,194,1,0,0,0,196,9,1,0,0,0,197,201,5, + 51,0,0,198,201,5,75,0,0,199,201,5,52,0,0,200,197,1,0,0,0,200,198, + 1,0,0,0,200,199,1,0,0,0,201,11,1,0,0,0,202,208,5,55,0,0,203,208, + 5,54,0,0,204,208,5,53,0,0,205,208,5,61,0,0,206,208,5,62,0,0,207, + 202,1,0,0,0,207,203,1,0,0,0,207,204,1,0,0,0,207,205,1,0,0,0,207, + 206,1,0,0,0,208,13,1,0,0,0,209,217,5,63,0,0,210,217,5,65,0,0,211, + 217,5,70,0,0,212,217,5,71,0,0,213,217,5,72,0,0,214,217,5,73,0,0, + 215,217,5,64,0,0,216,209,1,0,0,0,216,210,1,0,0,0,216,211,1,0,0,0, + 216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0, + 217,15,1,0,0,0,218,221,5,26,0,0,219,221,5,27,0,0,220,218,1,0,0,0, + 220,219,1,0,0,0,221,17,1,0,0,0,222,227,5,88,0,0,223,224,5,56,0,0, + 224,225,3,6,3,0,225,226,5,58,0,0,226,228,1,0,0,0,227,223,1,0,0,0, + 227,228,1,0,0,0,228,232,1,0,0,0,229,231,5,85,0,0,230,229,1,0,0,0, + 231,234,1,0,0,0,232,230,1,0,0,0,232,233,1,0,0,0,233,19,1,0,0,0,234, + 232,1,0,0,0,235,236,5,88,0,0,236,245,5,49,0,0,237,242,3,6,3,0,238, + 239,5,74,0,0,239,241,3,6,3,0,240,238,1,0,0,0,241,244,1,0,0,0,242, + 240,1,0,0,0,242,243,1,0,0,0,243,246,1,0,0,0,244,242,1,0,0,0,245, + 237,1,0,0,0,245,246,1,0,0,0,246,247,1,0,0,0,247,248,5,50,0,0,248, + 21,1,0,0,0,249,251,5,29,0,0,250,249,1,0,0,0,250,251,1,0,0,0,251, + 252,1,0,0,0,252,253,5,16,0,0,253,254,5,88,0,0,254,255,3,0,0,0,255, + 256,5,76,0,0,256,258,3,6,3,0,257,259,5,84,0,0,258,257,1,0,0,0,258, + 259,1,0,0,0,259,260,1,0,0,0,260,261,5,9,0,0,261,23,1,0,0,0,262,263, + 3,18,9,0,263,264,5,76,0,0,264,266,3,6,3,0,265,267,5,84,0,0,266,265, + 1,0,0,0,266,267,1,0,0,0,267,268,1,0,0,0,268,269,5,9,0,0,269,25,1, + 0,0,0,270,271,5,30,0,0,271,272,3,18,9,0,272,273,5,76,0,0,273,281, + 3,6,3,0,274,275,5,4,0,0,275,276,3,18,9,0,276,277,5,76,0,0,277,278, + 3,6,3,0,278,280,1,0,0,0,279,274,1,0,0,0,280,283,1,0,0,0,281,279, + 1,0,0,0,281,282,1,0,0,0,282,285,1,0,0,0,283,281,1,0,0,0,284,286, + 5,84,0,0,285,284,1,0,0,0,285,286,1,0,0,0,286,287,1,0,0,0,287,288, + 5,9,0,0,288,27,1,0,0,0,289,290,5,9,0,0,290,292,5,1,0,0,291,293,3, + 30,15,0,292,291,1,0,0,0,293,294,1,0,0,0,294,292,1,0,0,0,294,295, + 1,0,0,0,295,296,1,0,0,0,296,297,5,2,0,0,297,29,1,0,0,0,298,301,3, + 34,17,0,299,301,3,32,16,0,300,298,1,0,0,0,300,299,1,0,0,0,301,31, + 1,0,0,0,302,306,3,50,25,0,303,306,3,58,29,0,304,306,3,60,30,0,305, + 302,1,0,0,0,305,303,1,0,0,0,305,304,1,0,0,0,306,33,1,0,0,0,307,312, + 3,36,18,0,308,312,3,20,10,0,309,312,3,38,19,0,310,312,3,48,24,0, + 311,307,1,0,0,0,311,308,1,0,0,0,311,309,1,0,0,0,311,310,1,0,0,0, + 312,313,1,0,0,0,313,314,5,9,0,0,314,35,1,0,0,0,315,321,3,18,9,0, + 316,322,5,76,0,0,317,322,5,66,0,0,318,322,5,67,0,0,319,322,5,68, + 0,0,320,322,5,69,0,0,321,316,1,0,0,0,321,317,1,0,0,0,321,318,1,0, + 0,0,321,319,1,0,0,0,321,320,1,0,0,0,322,323,1,0,0,0,323,324,3,6, + 3,0,324,37,1,0,0,0,325,327,5,29,0,0,326,325,1,0,0,0,326,327,1,0, + 0,0,327,329,1,0,0,0,328,330,5,16,0,0,329,328,1,0,0,0,329,330,1,0, + 0,0,330,331,1,0,0,0,331,336,3,18,9,0,332,333,5,74,0,0,333,335,3, + 18,9,0,334,332,1,0,0,0,335,338,1,0,0,0,336,334,1,0,0,0,336,337,1, + 0,0,0,337,339,1,0,0,0,338,336,1,0,0,0,339,342,3,0,0,0,340,341,5, + 76,0,0,341,343,3,6,3,0,342,340,1,0,0,0,342,343,1,0,0,0,343,348,1, + 0,0,0,344,345,5,59,0,0,345,346,3,6,3,0,346,347,5,60,0,0,347,349, + 1,0,0,0,348,344,1,0,0,0,348,349,1,0,0,0,349,353,1,0,0,0,350,352, + 3,42,21,0,351,350,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354, + 1,0,0,0,354,39,1,0,0,0,355,353,1,0,0,0,356,357,3,38,19,0,357,358, + 5,9,0,0,358,41,1,0,0,0,359,367,5,45,0,0,360,367,5,46,0,0,361,362, + 5,47,0,0,362,363,3,44,22,0,363,364,5,83,0,0,364,365,3,46,23,0,365, + 367,1,0,0,0,366,359,1,0,0,0,366,360,1,0,0,0,366,361,1,0,0,0,367, + 43,1,0,0,0,368,369,5,88,0,0,369,45,1,0,0,0,370,371,5,88,0,0,371, + 47,1,0,0,0,372,374,5,17,0,0,373,375,3,6,3,0,374,373,1,0,0,0,374, + 375,1,0,0,0,375,49,1,0,0,0,376,380,3,52,26,0,377,379,3,54,27,0,378, + 377,1,0,0,0,379,382,1,0,0,0,380,378,1,0,0,0,380,381,1,0,0,0,381, + 384,1,0,0,0,382,380,1,0,0,0,383,385,3,56,28,0,384,383,1,0,0,0,384, + 385,1,0,0,0,385,51,1,0,0,0,386,387,5,18,0,0,387,388,3,6,3,0,388, + 389,5,82,0,0,389,390,3,28,14,0,390,53,1,0,0,0,391,392,5,19,0,0,392, + 393,3,6,3,0,393,394,5,82,0,0,394,395,3,28,14,0,395,55,1,0,0,0,396, + 397,5,20,0,0,397,398,5,82,0,0,398,399,3,28,14,0,399,57,1,0,0,0,400, + 401,5,21,0,0,401,402,5,88,0,0,402,403,5,23,0,0,403,404,3,6,3,0,404, + 405,5,48,0,0,405,406,3,6,3,0,406,408,5,24,0,0,407,409,5,75,0,0,408, + 407,1,0,0,0,408,409,1,0,0,0,409,410,1,0,0,0,410,411,7,1,0,0,411, + 412,5,82,0,0,412,413,3,28,14,0,413,59,1,0,0,0,414,415,5,22,0,0,415, + 416,3,6,3,0,416,417,5,82,0,0,417,418,3,28,14,0,418,61,1,0,0,0,419, + 423,3,64,32,0,420,423,3,68,34,0,421,423,5,9,0,0,422,419,1,0,0,0, + 422,420,1,0,0,0,422,421,1,0,0,0,423,424,1,0,0,0,424,422,1,0,0,0, + 424,425,1,0,0,0,425,426,1,0,0,0,426,427,5,0,0,1,427,63,1,0,0,0,428, + 429,5,31,0,0,429,430,5,88,0,0,430,431,3,66,33,0,431,65,1,0,0,0,432, + 433,5,82,0,0,433,434,5,9,0,0,434,441,5,1,0,0,435,442,3,74,37,0,436, + 442,3,78,39,0,437,442,3,80,40,0,438,442,3,88,44,0,439,442,3,76,38, + 0,440,442,3,90,45,0,441,435,1,0,0,0,441,436,1,0,0,0,441,437,1,0, + 0,0,441,438,1,0,0,0,441,439,1,0,0,0,441,440,1,0,0,0,442,443,1,0, + 0,0,443,441,1,0,0,0,443,444,1,0,0,0,444,445,1,0,0,0,445,446,5,2, + 0,0,446,67,1,0,0,0,447,448,5,32,0,0,448,449,5,88,0,0,449,450,5,82, + 0,0,450,451,3,70,35,0,451,69,1,0,0,0,452,453,5,9,0,0,453,461,5,1, + 0,0,454,462,3,74,37,0,455,462,3,78,39,0,456,462,3,80,40,0,457,462, + 3,88,44,0,458,462,3,90,45,0,459,462,3,72,36,0,460,462,3,76,38,0, + 461,454,1,0,0,0,461,455,1,0,0,0,461,456,1,0,0,0,461,457,1,0,0,0, + 461,458,1,0,0,0,461,459,1,0,0,0,461,460,1,0,0,0,462,463,1,0,0,0, + 463,461,1,0,0,0,463,464,1,0,0,0,464,465,1,0,0,0,465,466,5,2,0,0, + 466,71,1,0,0,0,467,468,5,41,0,0,468,469,5,49,0,0,469,474,5,88,0, + 0,470,471,5,74,0,0,471,473,3,94,47,0,472,470,1,0,0,0,473,476,1,0, + 0,0,474,472,1,0,0,0,474,475,1,0,0,0,475,477,1,0,0,0,476,474,1,0, + 0,0,477,478,5,50,0,0,478,479,5,82,0,0,479,480,3,28,14,0,480,73,1, + 0,0,0,481,482,7,2,0,0,482,483,5,82,0,0,483,484,5,9,0,0,484,486,5, + 1,0,0,485,487,3,40,20,0,486,485,1,0,0,0,487,488,1,0,0,0,488,486, + 1,0,0,0,488,489,1,0,0,0,489,490,1,0,0,0,490,491,5,2,0,0,491,75,1, + 0,0,0,492,493,5,36,0,0,493,494,5,82,0,0,494,495,3,28,14,0,495,77, + 1,0,0,0,496,497,5,37,0,0,497,498,5,82,0,0,498,499,5,9,0,0,499,503, + 5,1,0,0,500,504,3,22,11,0,501,504,3,24,12,0,502,504,3,26,13,0,503, + 500,1,0,0,0,503,501,1,0,0,0,503,502,1,0,0,0,504,505,1,0,0,0,505, + 503,1,0,0,0,505,506,1,0,0,0,506,507,1,0,0,0,507,508,5,2,0,0,508, + 79,1,0,0,0,509,510,5,38,0,0,510,511,5,82,0,0,511,512,5,9,0,0,512, + 515,5,1,0,0,513,516,3,82,41,0,514,516,3,84,42,0,515,513,1,0,0,0, + 515,514,1,0,0,0,516,517,1,0,0,0,517,515,1,0,0,0,517,518,1,0,0,0, + 518,519,1,0,0,0,519,520,5,2,0,0,520,81,1,0,0,0,521,526,5,88,0,0, + 522,523,5,56,0,0,523,524,3,6,3,0,524,525,5,58,0,0,525,527,1,0,0, + 0,526,522,1,0,0,0,526,527,1,0,0,0,527,528,1,0,0,0,528,532,5,57,0, + 0,529,531,3,86,43,0,530,529,1,0,0,0,531,534,1,0,0,0,532,530,1,0, + 0,0,532,533,1,0,0,0,533,535,1,0,0,0,534,532,1,0,0,0,535,536,5,42, + 0,0,536,537,5,9,0,0,537,83,1,0,0,0,538,543,5,88,0,0,539,540,5,56, + 0,0,540,541,3,6,3,0,541,542,5,58,0,0,542,544,1,0,0,0,543,539,1,0, + 0,0,543,544,1,0,0,0,544,545,1,0,0,0,545,546,3,0,0,0,546,547,5,57, + 0,0,547,548,5,40,0,0,548,549,5,9,0,0,549,85,1,0,0,0,550,553,5,43, + 0,0,551,553,5,44,0,0,552,550,1,0,0,0,552,551,1,0,0,0,553,87,1,0, + 0,0,554,555,5,39,0,0,555,556,5,82,0,0,556,557,5,9,0,0,557,560,5, + 1,0,0,558,561,5,42,0,0,559,561,5,40,0,0,560,558,1,0,0,0,560,559, + 1,0,0,0,561,562,1,0,0,0,562,563,5,9,0,0,563,564,5,2,0,0,564,89,1, + 0,0,0,565,566,5,15,0,0,566,567,5,88,0,0,567,576,5,49,0,0,568,573, + 3,92,46,0,569,570,5,74,0,0,570,572,3,92,46,0,571,569,1,0,0,0,572, + 575,1,0,0,0,573,571,1,0,0,0,573,574,1,0,0,0,574,577,1,0,0,0,575, + 573,1,0,0,0,576,568,1,0,0,0,576,577,1,0,0,0,577,578,1,0,0,0,578, + 580,5,50,0,0,579,581,3,0,0,0,580,579,1,0,0,0,580,581,1,0,0,0,581, + 582,1,0,0,0,582,583,5,82,0,0,583,584,3,28,14,0,584,91,1,0,0,0,585, + 586,5,88,0,0,586,587,3,0,0,0,587,93,1,0,0,0,588,589,5,88,0,0,589, + 590,5,76,0,0,590,591,7,3,0,0,591,95,1,0,0,0,62,102,113,118,124,126, + 130,145,154,160,181,183,190,195,200,207,216,220,227,232,242,245, + 250,258,266,281,285,294,300,305,311,321,326,329,336,342,348,353, + 366,374,380,384,408,422,424,441,443,461,463,474,488,503,505,515, + 517,526,532,543,552,560,573,576,580 ] class PyNestMLParser ( Parser ): @@ -323,12 +326,13 @@ class PyNestMLParser ( Parser ): RULE_updateBlock = 38 RULE_equationsBlock = 39 RULE_inputBlock = 40 - RULE_inputPort = 41 - RULE_inputQualifier = 42 - RULE_outputBlock = 43 - RULE_function = 44 - RULE_parameter = 45 - RULE_constParameter = 46 + RULE_spikeInputPort = 41 + RULE_continuousInputPort = 42 + RULE_inputQualifier = 43 + RULE_outputBlock = 44 + RULE_function = 45 + RULE_parameter = 46 + RULE_constParameter = 47 ruleNames = [ "dataType", "unitType", "unitTypeExponent", "expression", "simpleExpression", "unaryOperator", "bitOperator", "comparisonOperator", @@ -340,8 +344,9 @@ class PyNestMLParser ( Parser ): "forStmt", "whileStmt", "nestMLCompilationUnit", "neuron", "neuronBody", "synapse", "synapseBody", "onReceiveBlock", "blockWithVariables", "updateBlock", "equationsBlock", - "inputBlock", "inputPort", "inputQualifier", "outputBlock", - "function", "parameter", "constParameter" ] + "inputBlock", "spikeInputPort", "continuousInputPort", + "inputQualifier", "outputBlock", "function", "parameter", + "constParameter" ] EOF = Token.EOF INDENT=1 @@ -493,37 +498,37 @@ def dataType(self): localctx = PyNestMLParser.DataTypeContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_dataType) try: - self.state = 100 + self.state = 102 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.INTEGER_KEYWORD]: self.enterOuterAlt(localctx, 1) - self.state = 94 + self.state = 96 localctx.isInt = self.match(PyNestMLParser.INTEGER_KEYWORD) pass elif token in [PyNestMLParser.REAL_KEYWORD]: self.enterOuterAlt(localctx, 2) - self.state = 95 + self.state = 97 localctx.isReal = self.match(PyNestMLParser.REAL_KEYWORD) pass elif token in [PyNestMLParser.STRING_KEYWORD]: self.enterOuterAlt(localctx, 3) - self.state = 96 + self.state = 98 localctx.isString = self.match(PyNestMLParser.STRING_KEYWORD) pass elif token in [PyNestMLParser.BOOLEAN_KEYWORD]: self.enterOuterAlt(localctx, 4) - self.state = 97 + self.state = 99 localctx.isBool = self.match(PyNestMLParser.BOOLEAN_KEYWORD) pass elif token in [PyNestMLParser.VOID_KEYWORD]: self.enterOuterAlt(localctx, 5) - self.state = 98 + self.state = 100 localctx.isVoid = self.match(PyNestMLParser.VOID_KEYWORD) pass elif token in [PyNestMLParser.LEFT_PAREN, PyNestMLParser.NAME, PyNestMLParser.UNSIGNED_INTEGER]: self.enterOuterAlt(localctx, 6) - self.state = 99 + self.state = 101 localctx.unit = self.unitType(0) pass else: @@ -609,34 +614,34 @@ def unitType(self, _p:int=0): self.enterRecursionRule(localctx, 2, self.RULE_unitType, _p) try: self.enterOuterAlt(localctx, 1) - self.state = 111 + self.state = 113 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.LEFT_PAREN]: - self.state = 103 + self.state = 105 localctx.leftParentheses = self.match(PyNestMLParser.LEFT_PAREN) - self.state = 104 + self.state = 106 localctx.compoundUnit = self.unitType(0) - self.state = 105 + self.state = 107 localctx.rightParentheses = self.match(PyNestMLParser.RIGHT_PAREN) pass elif token in [PyNestMLParser.UNSIGNED_INTEGER]: - self.state = 107 + self.state = 109 localctx.unitlessLiteral = self.match(PyNestMLParser.UNSIGNED_INTEGER) - self.state = 108 + self.state = 110 localctx.divOp = self.match(PyNestMLParser.FORWARD_SLASH) - self.state = 109 + self.state = 111 localctx.right = self.unitType(2) pass elif token in [PyNestMLParser.NAME]: - self.state = 110 + self.state = 112 localctx.unit = self.match(PyNestMLParser.NAME) pass else: raise NoViableAltException(self) self._ctx.stop = self._input.LT(-1) - self.state = 124 + self.state = 126 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,4,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: @@ -644,32 +649,32 @@ def unitType(self, _p:int=0): if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 122 + self.state = 124 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,3,self._ctx) if la_ == 1: localctx = PyNestMLParser.UnitTypeContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_unitType) - self.state = 113 + self.state = 115 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 116 + self.state = 118 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.STAR]: - self.state = 114 + self.state = 116 localctx.timesOp = self.match(PyNestMLParser.STAR) pass elif token in [PyNestMLParser.FORWARD_SLASH]: - self.state = 115 + self.state = 117 localctx.divOp = self.match(PyNestMLParser.FORWARD_SLASH) pass else: raise NoViableAltException(self) - self.state = 118 + self.state = 120 localctx.right = self.unitType(4) pass @@ -677,18 +682,18 @@ def unitType(self, _p:int=0): localctx = PyNestMLParser.UnitTypeContext(self, _parentctx, _parentState) localctx.base = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_unitType) - self.state = 119 + self.state = 121 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") - self.state = 120 + self.state = 122 localctx.powOp = self.match(PyNestMLParser.STAR_STAR) - self.state = 121 + self.state = 123 localctx.exponent = self.unitTypeExponent() pass - self.state = 126 + self.state = 128 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,4,self._ctx) @@ -736,11 +741,11 @@ def unitTypeExponent(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 128 + self.state = 130 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.PLUS or _la==PyNestMLParser.MINUS: - self.state = 127 + self.state = 129 _la = self._input.LA(1) if not(_la==PyNestMLParser.PLUS or _la==PyNestMLParser.MINUS): self._errHandler.recoverInline(self) @@ -749,7 +754,7 @@ def unitTypeExponent(self): self.consume() - self.state = 130 + self.state = 132 self.match(PyNestMLParser.UNSIGNED_INTEGER) except RecognitionException as re: localctx.exception = re @@ -862,38 +867,38 @@ def expression(self, _p:int=0): self.enterRecursionRule(localctx, 6, self.RULE_expression, _p) try: self.enterOuterAlt(localctx, 1) - self.state = 143 + self.state = 145 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.LEFT_PAREN]: - self.state = 133 + self.state = 135 localctx.leftParentheses = self.match(PyNestMLParser.LEFT_PAREN) - self.state = 134 + self.state = 136 localctx.term = self.expression(0) - self.state = 135 + self.state = 137 localctx.rightParentheses = self.match(PyNestMLParser.RIGHT_PAREN) pass elif token in [PyNestMLParser.PLUS, PyNestMLParser.TILDE, PyNestMLParser.MINUS]: - self.state = 137 + self.state = 139 self.unaryOperator() - self.state = 138 + self.state = 140 localctx.term = self.expression(9) pass elif token in [PyNestMLParser.NOT_KEYWORD]: - self.state = 140 + self.state = 142 localctx.logicalNot = self.match(PyNestMLParser.NOT_KEYWORD) - self.state = 141 + self.state = 143 localctx.term = self.expression(4) pass elif token in [PyNestMLParser.INF_KEYWORD, PyNestMLParser.BOOLEAN_LITERAL, PyNestMLParser.STRING_LITERAL, PyNestMLParser.NAME, PyNestMLParser.UNSIGNED_INTEGER, PyNestMLParser.FLOAT]: - self.state = 142 + self.state = 144 self.simpleExpression() pass else: raise NoViableAltException(self) self._ctx.stop = self._input.LT(-1) - self.state = 181 + self.state = 183 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,10,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: @@ -901,20 +906,20 @@ def expression(self, _p:int=0): if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 179 + self.state = 181 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,9,self._ctx) if la_ == 1: localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 145 + self.state = 147 if not self.precpred(self._ctx, 10): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 10)") - self.state = 146 + self.state = 148 localctx.powOp = self.match(PyNestMLParser.STAR_STAR) - self.state = 147 + self.state = 149 localctx.right = self.expression(10) pass @@ -922,29 +927,29 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 148 + self.state = 150 if not self.precpred(self._ctx, 8): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") - self.state = 152 + self.state = 154 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.STAR]: - self.state = 149 + self.state = 151 localctx.timesOp = self.match(PyNestMLParser.STAR) pass elif token in [PyNestMLParser.FORWARD_SLASH]: - self.state = 150 + self.state = 152 localctx.divOp = self.match(PyNestMLParser.FORWARD_SLASH) pass elif token in [PyNestMLParser.PERCENT]: - self.state = 151 + self.state = 153 localctx.moduloOp = self.match(PyNestMLParser.PERCENT) pass else: raise NoViableAltException(self) - self.state = 154 + self.state = 156 localctx.right = self.expression(9) pass @@ -952,25 +957,25 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 155 + self.state = 157 if not self.precpred(self._ctx, 7): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 7)") - self.state = 158 + self.state = 160 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.PLUS]: - self.state = 156 + self.state = 158 localctx.plusOp = self.match(PyNestMLParser.PLUS) pass elif token in [PyNestMLParser.MINUS]: - self.state = 157 + self.state = 159 localctx.minusOp = self.match(PyNestMLParser.MINUS) pass else: raise NoViableAltException(self) - self.state = 160 + self.state = 162 localctx.right = self.expression(8) pass @@ -978,13 +983,13 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 161 + self.state = 163 if not self.precpred(self._ctx, 6): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") - self.state = 162 + self.state = 164 self.bitOperator() - self.state = 163 + self.state = 165 localctx.right = self.expression(7) pass @@ -992,13 +997,13 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 165 + self.state = 167 if not self.precpred(self._ctx, 5): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") - self.state = 166 + self.state = 168 self.comparisonOperator() - self.state = 167 + self.state = 169 localctx.right = self.expression(6) pass @@ -1006,13 +1011,13 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 169 + self.state = 171 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 170 + self.state = 172 self.logicalOperator() - self.state = 171 + self.state = 173 localctx.right = self.expression(4) pass @@ -1020,22 +1025,22 @@ def expression(self, _p:int=0): localctx = PyNestMLParser.ExpressionContext(self, _parentctx, _parentState) localctx.condition = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) - self.state = 173 + self.state = 175 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") - self.state = 174 + self.state = 176 self.match(PyNestMLParser.QUESTION) - self.state = 175 + self.state = 177 localctx.ifTrue = self.expression(0) - self.state = 176 + self.state = 178 self.match(PyNestMLParser.COLON) - self.state = 177 + self.state = 179 localctx.ifNot = self.expression(3) pass - self.state = 183 + self.state = 185 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,10,self._ctx) @@ -1098,35 +1103,35 @@ def simpleExpression(self): self.enterRule(localctx, 8, self.RULE_simpleExpression) self._la = 0 # Token type try: - self.state = 193 + self.state = 195 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,12,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 184 + self.state = 186 self.functionCall() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 185 + self.state = 187 self.match(PyNestMLParser.BOOLEAN_LITERAL) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 186 + self.state = 188 _la = self._input.LA(1) if not(_la==PyNestMLParser.UNSIGNED_INTEGER or _la==PyNestMLParser.FLOAT): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 188 + self.state = 190 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,11,self._ctx) if la_ == 1: - self.state = 187 + self.state = 189 self.variable() @@ -1134,19 +1139,19 @@ def simpleExpression(self): elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 190 + self.state = 192 localctx.string = self.match(PyNestMLParser.STRING_LITERAL) pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 191 + self.state = 193 localctx.isInf = self.match(PyNestMLParser.INF_KEYWORD) pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 192 + self.state = 194 self.variable() pass @@ -1197,19 +1202,19 @@ def unaryOperator(self): self.enterRule(localctx, 10, self.RULE_unaryOperator) try: self.enterOuterAlt(localctx, 1) - self.state = 198 + self.state = 200 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.PLUS]: - self.state = 195 + self.state = 197 localctx.unaryPlus = self.match(PyNestMLParser.PLUS) pass elif token in [PyNestMLParser.MINUS]: - self.state = 196 + self.state = 198 localctx.unaryMinus = self.match(PyNestMLParser.MINUS) pass elif token in [PyNestMLParser.TILDE]: - self.state = 197 + self.state = 199 localctx.unaryTilde = self.match(PyNestMLParser.TILDE) pass else: @@ -1269,27 +1274,27 @@ def bitOperator(self): self.enterRule(localctx, 12, self.RULE_bitOperator) try: self.enterOuterAlt(localctx, 1) - self.state = 205 + self.state = 207 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.AMPERSAND]: - self.state = 200 + self.state = 202 localctx.bitAnd = self.match(PyNestMLParser.AMPERSAND) pass elif token in [PyNestMLParser.CARET]: - self.state = 201 + self.state = 203 localctx.bitXor = self.match(PyNestMLParser.CARET) pass elif token in [PyNestMLParser.PIPE]: - self.state = 202 + self.state = 204 localctx.bitOr = self.match(PyNestMLParser.PIPE) pass elif token in [PyNestMLParser.LEFT_LEFT_ANGLE]: - self.state = 203 + self.state = 205 localctx.bitShiftLeft = self.match(PyNestMLParser.LEFT_LEFT_ANGLE) pass elif token in [PyNestMLParser.RIGHT_RIGHT_ANGLE]: - self.state = 204 + self.state = 206 localctx.bitShiftRight = self.match(PyNestMLParser.RIGHT_RIGHT_ANGLE) pass else: @@ -1357,35 +1362,35 @@ def comparisonOperator(self): self.enterRule(localctx, 14, self.RULE_comparisonOperator) try: self.enterOuterAlt(localctx, 1) - self.state = 214 + self.state = 216 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.LEFT_ANGLE]: - self.state = 207 + self.state = 209 localctx.lt = self.match(PyNestMLParser.LEFT_ANGLE) pass elif token in [PyNestMLParser.LEFT_ANGLE_EQUALS]: - self.state = 208 + self.state = 210 localctx.le = self.match(PyNestMLParser.LEFT_ANGLE_EQUALS) pass elif token in [PyNestMLParser.EQUALS_EQUALS]: - self.state = 209 + self.state = 211 localctx.eq = self.match(PyNestMLParser.EQUALS_EQUALS) pass elif token in [PyNestMLParser.EXCLAMATION_EQUALS]: - self.state = 210 + self.state = 212 localctx.ne = self.match(PyNestMLParser.EXCLAMATION_EQUALS) pass elif token in [PyNestMLParser.LEFT_ANGLE_RIGHT_ANGLE]: - self.state = 211 + self.state = 213 localctx.ne2 = self.match(PyNestMLParser.LEFT_ANGLE_RIGHT_ANGLE) pass elif token in [PyNestMLParser.RIGHT_ANGLE_EQUALS]: - self.state = 212 + self.state = 214 localctx.ge = self.match(PyNestMLParser.RIGHT_ANGLE_EQUALS) pass elif token in [PyNestMLParser.RIGHT_ANGLE]: - self.state = 213 + self.state = 215 localctx.gt = self.match(PyNestMLParser.RIGHT_ANGLE) pass else: @@ -1433,15 +1438,15 @@ def logicalOperator(self): self.enterRule(localctx, 16, self.RULE_logicalOperator) try: self.enterOuterAlt(localctx, 1) - self.state = 218 + self.state = 220 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.AND_KEYWORD]: - self.state = 216 + self.state = 218 localctx.logicalAnd = self.match(PyNestMLParser.AND_KEYWORD) pass elif token in [PyNestMLParser.OR_KEYWORD]: - self.state = 217 + self.state = 219 localctx.logicalOr = self.match(PyNestMLParser.OR_KEYWORD) pass else: @@ -1502,28 +1507,28 @@ def variable(self): self.enterRule(localctx, 18, self.RULE_variable) try: self.enterOuterAlt(localctx, 1) - self.state = 220 + self.state = 222 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 225 + self.state = 227 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,17,self._ctx) if la_ == 1: - self.state = 221 + self.state = 223 self.match(PyNestMLParser.LEFT_SQUARE_BRACKET) - self.state = 222 + self.state = 224 localctx.vectorParameter = self.expression(0) - self.state = 223 + self.state = 225 self.match(PyNestMLParser.RIGHT_SQUARE_BRACKET) - self.state = 230 + self.state = 232 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,18,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 227 + self.state = 229 self.match(PyNestMLParser.DIFFERENTIAL_ORDER) - self.state = 232 + self.state = 234 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,18,self._ctx) @@ -1585,31 +1590,31 @@ def functionCall(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 233 + self.state = 235 localctx.calleeName = self.match(PyNestMLParser.NAME) - self.state = 234 + self.state = 236 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 243 + self.state = 245 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INF_KEYWORD) | (1 << PyNestMLParser.NOT_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN) | (1 << PyNestMLParser.PLUS) | (1 << PyNestMLParser.TILDE))) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & ((1 << (PyNestMLParser.MINUS - 75)) | (1 << (PyNestMLParser.BOOLEAN_LITERAL - 75)) | (1 << (PyNestMLParser.STRING_LITERAL - 75)) | (1 << (PyNestMLParser.NAME - 75)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 75)) | (1 << (PyNestMLParser.FLOAT - 75)))) != 0): - self.state = 235 + self.state = 237 self.expression(0) - self.state = 240 + self.state = 242 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.COMMA: - self.state = 236 + self.state = 238 self.match(PyNestMLParser.COMMA) - self.state = 237 + self.state = 239 self.expression(0) - self.state = 242 + self.state = 244 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 245 + self.state = 247 self.match(PyNestMLParser.RIGHT_PAREN) except RecognitionException as re: localctx.exception = re @@ -1674,33 +1679,33 @@ def inlineExpression(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 248 + self.state = 250 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.RECORDABLE_KEYWORD: - self.state = 247 + self.state = 249 localctx.recordable = self.match(PyNestMLParser.RECORDABLE_KEYWORD) - self.state = 250 + self.state = 252 self.match(PyNestMLParser.INLINE_KEYWORD) - self.state = 251 + self.state = 253 localctx.variableName = self.match(PyNestMLParser.NAME) - self.state = 252 + self.state = 254 self.dataType() - self.state = 253 + self.state = 255 self.match(PyNestMLParser.EQUALS) - self.state = 254 - self.expression(0) self.state = 256 + self.expression(0) + self.state = 258 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.SEMICOLON: - self.state = 255 + self.state = 257 self.match(PyNestMLParser.SEMICOLON) - self.state = 258 + self.state = 260 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1756,21 +1761,21 @@ def odeEquation(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 260 + self.state = 262 localctx.lhs = self.variable() - self.state = 261 + self.state = 263 self.match(PyNestMLParser.EQUALS) - self.state = 262 - localctx.rhs = self.expression(0) self.state = 264 + localctx.rhs = self.expression(0) + self.state = 266 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.SEMICOLON: - self.state = 263 + self.state = 265 self.match(PyNestMLParser.SEMICOLON) - self.state = 266 + self.state = 268 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1842,39 +1847,39 @@ def kernel(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 268 + self.state = 270 self.match(PyNestMLParser.KERNEL_KEYWORD) - self.state = 269 + self.state = 271 self.variable() - self.state = 270 + self.state = 272 self.match(PyNestMLParser.EQUALS) - self.state = 271 + self.state = 273 self.expression(0) - self.state = 279 + self.state = 281 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.KERNEL_JOINING: - self.state = 272 + self.state = 274 self.match(PyNestMLParser.KERNEL_JOINING) - self.state = 273 + self.state = 275 self.variable() - self.state = 274 + self.state = 276 self.match(PyNestMLParser.EQUALS) - self.state = 275 + self.state = 277 self.expression(0) - self.state = 281 + self.state = 283 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 283 + self.state = 285 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.SEMICOLON: - self.state = 282 + self.state = 284 self.match(PyNestMLParser.SEMICOLON) - self.state = 285 + self.state = 287 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1927,23 +1932,23 @@ def block(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 287 + self.state = 289 self.match(PyNestMLParser.NEWLINE) - self.state = 288 + self.state = 290 self.match(PyNestMLParser.INDENT) - self.state = 290 + self.state = 292 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 289 + self.state = 291 self.stmt() - self.state = 292 + self.state = 294 self._errHandler.sync(self) _la = self._input.LA(1) if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INLINE_KEYWORD) | (1 << PyNestMLParser.RETURN_KEYWORD) | (1 << PyNestMLParser.IF_KEYWORD) | (1 << PyNestMLParser.FOR_KEYWORD) | (1 << PyNestMLParser.WHILE_KEYWORD) | (1 << PyNestMLParser.RECORDABLE_KEYWORD))) != 0) or _la==PyNestMLParser.NAME): break - self.state = 294 + self.state = 296 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -1986,17 +1991,17 @@ def stmt(self): localctx = PyNestMLParser.StmtContext(self, self._ctx, self.state) self.enterRule(localctx, 30, self.RULE_stmt) try: - self.state = 298 + self.state = 300 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.INLINE_KEYWORD, PyNestMLParser.RETURN_KEYWORD, PyNestMLParser.RECORDABLE_KEYWORD, PyNestMLParser.NAME]: self.enterOuterAlt(localctx, 1) - self.state = 296 + self.state = 298 self.smallStmt() pass elif token in [PyNestMLParser.IF_KEYWORD, PyNestMLParser.FOR_KEYWORD, PyNestMLParser.WHILE_KEYWORD]: self.enterOuterAlt(localctx, 2) - self.state = 297 + self.state = 299 self.compoundStmt() pass else: @@ -2047,22 +2052,22 @@ def compoundStmt(self): localctx = PyNestMLParser.CompoundStmtContext(self, self._ctx, self.state) self.enterRule(localctx, 32, self.RULE_compoundStmt) try: - self.state = 303 + self.state = 305 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.IF_KEYWORD]: self.enterOuterAlt(localctx, 1) - self.state = 300 + self.state = 302 self.ifStmt() pass elif token in [PyNestMLParser.FOR_KEYWORD]: self.enterOuterAlt(localctx, 2) - self.state = 301 + self.state = 303 self.forStmt() pass elif token in [PyNestMLParser.WHILE_KEYWORD]: self.enterOuterAlt(localctx, 3) - self.state = 302 + self.state = 304 self.whileStmt() pass else: @@ -2121,31 +2126,31 @@ def smallStmt(self): self.enterRule(localctx, 34, self.RULE_smallStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 309 + self.state = 311 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,29,self._ctx) if la_ == 1: - self.state = 305 + self.state = 307 self.assignment() pass elif la_ == 2: - self.state = 306 + self.state = 308 self.functionCall() pass elif la_ == 3: - self.state = 307 + self.state = 309 self.declaration() pass elif la_ == 4: - self.state = 308 + self.state = 310 self.returnStmt() pass - self.state = 311 + self.state = 313 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -2210,35 +2215,35 @@ def assignment(self): self.enterRule(localctx, 36, self.RULE_assignment) try: self.enterOuterAlt(localctx, 1) - self.state = 313 + self.state = 315 localctx.lhs_variable = self.variable() - self.state = 319 + self.state = 321 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.EQUALS]: - self.state = 314 + self.state = 316 localctx.directAssignment = self.match(PyNestMLParser.EQUALS) pass elif token in [PyNestMLParser.PLUS_EQUALS]: - self.state = 315 + self.state = 317 localctx.compoundSum = self.match(PyNestMLParser.PLUS_EQUALS) pass elif token in [PyNestMLParser.MINUS_EQUALS]: - self.state = 316 + self.state = 318 localctx.compoundMinus = self.match(PyNestMLParser.MINUS_EQUALS) pass elif token in [PyNestMLParser.STAR_EQUALS]: - self.state = 317 + self.state = 319 localctx.compoundProduct = self.match(PyNestMLParser.STAR_EQUALS) pass elif token in [PyNestMLParser.FORWARD_SLASH_EQUALS]: - self.state = 318 + self.state = 320 localctx.compoundQuotient = self.match(PyNestMLParser.FORWARD_SLASH_EQUALS) pass else: raise NoViableAltException(self) - self.state = 321 + self.state = 323 self.expression(0) except RecognitionException as re: localctx.exception = re @@ -2326,67 +2331,67 @@ def declaration(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 324 + self.state = 326 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.RECORDABLE_KEYWORD: - self.state = 323 + self.state = 325 localctx.isRecordable = self.match(PyNestMLParser.RECORDABLE_KEYWORD) - self.state = 327 + self.state = 329 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.INLINE_KEYWORD: - self.state = 326 + self.state = 328 localctx.isInlineExpression = self.match(PyNestMLParser.INLINE_KEYWORD) - self.state = 329 + self.state = 331 self.variable() - self.state = 334 + self.state = 336 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.COMMA: - self.state = 330 + self.state = 332 self.match(PyNestMLParser.COMMA) - self.state = 331 + self.state = 333 self.variable() - self.state = 336 + self.state = 338 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 337 + self.state = 339 self.dataType() - self.state = 340 + self.state = 342 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.EQUALS: - self.state = 338 + self.state = 340 self.match(PyNestMLParser.EQUALS) - self.state = 339 + self.state = 341 localctx.rhs = self.expression(0) - self.state = 346 + self.state = 348 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.LEFT_LEFT_SQUARE: - self.state = 342 + self.state = 344 self.match(PyNestMLParser.LEFT_LEFT_SQUARE) - self.state = 343 + self.state = 345 localctx.invariant = self.expression(0) - self.state = 344 + self.state = 346 self.match(PyNestMLParser.RIGHT_RIGHT_SQUARE) - self.state = 351 + self.state = 353 self._errHandler.sync(self) _la = self._input.LA(1) while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.DECORATOR_HOMOGENEOUS) | (1 << PyNestMLParser.DECORATOR_HETEROGENEOUS) | (1 << PyNestMLParser.AT))) != 0): - self.state = 348 + self.state = 350 localctx.decorator = self.anyDecorator() - self.state = 353 + self.state = 355 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2431,9 +2436,9 @@ def declaration_newline(self): self.enterRule(localctx, 40, self.RULE_declaration_newline) try: self.enterOuterAlt(localctx, 1) - self.state = 354 + self.state = 356 self.declaration() - self.state = 355 + self.state = 357 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -2488,28 +2493,28 @@ def anyDecorator(self): localctx = PyNestMLParser.AnyDecoratorContext(self, self._ctx, self.state) self.enterRule(localctx, 42, self.RULE_anyDecorator) try: - self.state = 364 + self.state = 366 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.DECORATOR_HOMOGENEOUS]: self.enterOuterAlt(localctx, 1) - self.state = 357 + self.state = 359 self.match(PyNestMLParser.DECORATOR_HOMOGENEOUS) pass elif token in [PyNestMLParser.DECORATOR_HETEROGENEOUS]: self.enterOuterAlt(localctx, 2) - self.state = 358 + self.state = 360 self.match(PyNestMLParser.DECORATOR_HETEROGENEOUS) pass elif token in [PyNestMLParser.AT]: self.enterOuterAlt(localctx, 3) - self.state = 359 + self.state = 361 self.match(PyNestMLParser.AT) - self.state = 360 + self.state = 362 self.namespaceDecoratorNamespace() - self.state = 361 + self.state = 363 self.match(PyNestMLParser.DOUBLE_COLON) - self.state = 362 + self.state = 364 self.namespaceDecoratorName() pass else: @@ -2553,7 +2558,7 @@ def namespaceDecoratorNamespace(self): self.enterRule(localctx, 44, self.RULE_namespaceDecoratorNamespace) try: self.enterOuterAlt(localctx, 1) - self.state = 366 + self.state = 368 localctx.name = self.match(PyNestMLParser.NAME) except RecognitionException as re: localctx.exception = re @@ -2593,7 +2598,7 @@ def namespaceDecoratorName(self): self.enterRule(localctx, 46, self.RULE_namespaceDecoratorName) try: self.enterOuterAlt(localctx, 1) - self.state = 368 + self.state = 370 localctx.name = self.match(PyNestMLParser.NAME) except RecognitionException as re: localctx.exception = re @@ -2637,13 +2642,13 @@ def returnStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 370 - self.match(PyNestMLParser.RETURN_KEYWORD) self.state = 372 + self.match(PyNestMLParser.RETURN_KEYWORD) + self.state = 374 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INF_KEYWORD) | (1 << PyNestMLParser.NOT_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN) | (1 << PyNestMLParser.PLUS) | (1 << PyNestMLParser.TILDE))) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & ((1 << (PyNestMLParser.MINUS - 75)) | (1 << (PyNestMLParser.BOOLEAN_LITERAL - 75)) | (1 << (PyNestMLParser.STRING_LITERAL - 75)) | (1 << (PyNestMLParser.NAME - 75)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 75)) | (1 << (PyNestMLParser.FLOAT - 75)))) != 0): - self.state = 371 + self.state = 373 self.expression(0) @@ -2697,23 +2702,23 @@ def ifStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 374 + self.state = 376 self.ifClause() - self.state = 378 + self.state = 380 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.ELIF_KEYWORD: - self.state = 375 + self.state = 377 self.elifClause() - self.state = 380 + self.state = 382 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 382 + self.state = 384 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.ELSE_KEYWORD: - self.state = 381 + self.state = 383 self.elseClause() @@ -2765,13 +2770,13 @@ def ifClause(self): self.enterRule(localctx, 52, self.RULE_ifClause) try: self.enterOuterAlt(localctx, 1) - self.state = 384 + self.state = 386 self.match(PyNestMLParser.IF_KEYWORD) - self.state = 385 + self.state = 387 self.expression(0) - self.state = 386 + self.state = 388 self.match(PyNestMLParser.COLON) - self.state = 387 + self.state = 389 self.block() except RecognitionException as re: localctx.exception = re @@ -2821,13 +2826,13 @@ def elifClause(self): self.enterRule(localctx, 54, self.RULE_elifClause) try: self.enterOuterAlt(localctx, 1) - self.state = 389 + self.state = 391 self.match(PyNestMLParser.ELIF_KEYWORD) - self.state = 390 + self.state = 392 self.expression(0) - self.state = 391 + self.state = 393 self.match(PyNestMLParser.COLON) - self.state = 392 + self.state = 394 self.block() except RecognitionException as re: localctx.exception = re @@ -2873,11 +2878,11 @@ def elseClause(self): self.enterRule(localctx, 56, self.RULE_elseClause) try: self.enterOuterAlt(localctx, 1) - self.state = 394 + self.state = 396 self.match(PyNestMLParser.ELSE_KEYWORD) - self.state = 395 + self.state = 397 self.match(PyNestMLParser.COLON) - self.state = 396 + self.state = 398 self.block() except RecognitionException as re: localctx.exception = re @@ -2956,39 +2961,39 @@ def forStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 398 + self.state = 400 self.match(PyNestMLParser.FOR_KEYWORD) - self.state = 399 + self.state = 401 localctx.var = self.match(PyNestMLParser.NAME) - self.state = 400 + self.state = 402 self.match(PyNestMLParser.IN_KEYWORD) - self.state = 401 + self.state = 403 localctx.start_from = self.expression(0) - self.state = 402 + self.state = 404 self.match(PyNestMLParser.ELLIPSIS) - self.state = 403 + self.state = 405 localctx.end_at = self.expression(0) - self.state = 404 + self.state = 406 self.match(PyNestMLParser.STEP_KEYWORD) - self.state = 406 + self.state = 408 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.MINUS: - self.state = 405 + self.state = 407 localctx.negative = self.match(PyNestMLParser.MINUS) - self.state = 408 + self.state = 410 _la = self._input.LA(1) if not(_la==PyNestMLParser.UNSIGNED_INTEGER or _la==PyNestMLParser.FLOAT): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 409 + self.state = 411 self.match(PyNestMLParser.COLON) - self.state = 410 + self.state = 412 self.block() except RecognitionException as re: localctx.exception = re @@ -3038,13 +3043,13 @@ def whileStmt(self): self.enterRule(localctx, 60, self.RULE_whileStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 412 + self.state = 414 self.match(PyNestMLParser.WHILE_KEYWORD) - self.state = 413 + self.state = 415 self.expression(0) - self.state = 414 + self.state = 416 self.match(PyNestMLParser.COLON) - self.state = 415 + self.state = 417 self.block() except RecognitionException as re: localctx.exception = re @@ -3104,35 +3109,35 @@ def nestMLCompilationUnit(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 420 + self.state = 422 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 420 + self.state = 422 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.NEURON_KEYWORD]: - self.state = 417 + self.state = 419 self.neuron() pass elif token in [PyNestMLParser.SYNAPSE_KEYWORD]: - self.state = 418 + self.state = 420 self.synapse() pass elif token in [PyNestMLParser.NEWLINE]: - self.state = 419 + self.state = 421 self.match(PyNestMLParser.NEWLINE) pass else: raise NoViableAltException(self) - self.state = 422 + self.state = 424 self._errHandler.sync(self) _la = self._input.LA(1) if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.NEWLINE) | (1 << PyNestMLParser.NEURON_KEYWORD) | (1 << PyNestMLParser.SYNAPSE_KEYWORD))) != 0)): break - self.state = 424 + self.state = 426 self.match(PyNestMLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -3178,11 +3183,11 @@ def neuron(self): self.enterRule(localctx, 64, self.RULE_neuron) try: self.enterOuterAlt(localctx, 1) - self.state = 426 + self.state = 428 self.match(PyNestMLParser.NEURON_KEYWORD) - self.state = 427 + self.state = 429 self.match(PyNestMLParser.NAME) - self.state = 428 + self.state = 430 self.neuronBody() except RecognitionException as re: localctx.exception = re @@ -3273,53 +3278,53 @@ def neuronBody(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 430 + self.state = 432 self.match(PyNestMLParser.COLON) - self.state = 431 + self.state = 433 self.match(PyNestMLParser.NEWLINE) - self.state = 432 + self.state = 434 self.match(PyNestMLParser.INDENT) - self.state = 439 + self.state = 441 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 439 + self.state = 441 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.STATE_KEYWORD, PyNestMLParser.PARAMETERS_KEYWORD, PyNestMLParser.INTERNALS_KEYWORD]: - self.state = 433 + self.state = 435 self.blockWithVariables() pass elif token in [PyNestMLParser.EQUATIONS_KEYWORD]: - self.state = 434 + self.state = 436 self.equationsBlock() pass elif token in [PyNestMLParser.INPUT_KEYWORD]: - self.state = 435 + self.state = 437 self.inputBlock() pass elif token in [PyNestMLParser.OUTPUT_KEYWORD]: - self.state = 436 + self.state = 438 self.outputBlock() pass elif token in [PyNestMLParser.UPDATE_KEYWORD]: - self.state = 437 + self.state = 439 self.updateBlock() pass elif token in [PyNestMLParser.FUNCTION_KEYWORD]: - self.state = 438 + self.state = 440 self.function() pass else: raise NoViableAltException(self) - self.state = 441 + self.state = 443 self._errHandler.sync(self) _la = self._input.LA(1) if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.FUNCTION_KEYWORD) | (1 << PyNestMLParser.STATE_KEYWORD) | (1 << PyNestMLParser.PARAMETERS_KEYWORD) | (1 << PyNestMLParser.INTERNALS_KEYWORD) | (1 << PyNestMLParser.UPDATE_KEYWORD) | (1 << PyNestMLParser.EQUATIONS_KEYWORD) | (1 << PyNestMLParser.INPUT_KEYWORD) | (1 << PyNestMLParser.OUTPUT_KEYWORD))) != 0)): break - self.state = 443 + self.state = 445 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3368,13 +3373,13 @@ def synapse(self): self.enterRule(localctx, 68, self.RULE_synapse) try: self.enterOuterAlt(localctx, 1) - self.state = 445 + self.state = 447 self.match(PyNestMLParser.SYNAPSE_KEYWORD) - self.state = 446 + self.state = 448 self.match(PyNestMLParser.NAME) - self.state = 447 + self.state = 449 self.match(PyNestMLParser.COLON) - self.state = 448 + self.state = 450 self.synapseBody() except RecognitionException as re: localctx.exception = re @@ -3469,55 +3474,55 @@ def synapseBody(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 450 + self.state = 452 self.match(PyNestMLParser.NEWLINE) - self.state = 451 + self.state = 453 self.match(PyNestMLParser.INDENT) - self.state = 459 + self.state = 461 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 459 + self.state = 461 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.STATE_KEYWORD, PyNestMLParser.PARAMETERS_KEYWORD, PyNestMLParser.INTERNALS_KEYWORD]: - self.state = 452 + self.state = 454 self.blockWithVariables() pass elif token in [PyNestMLParser.EQUATIONS_KEYWORD]: - self.state = 453 + self.state = 455 self.equationsBlock() pass elif token in [PyNestMLParser.INPUT_KEYWORD]: - self.state = 454 + self.state = 456 self.inputBlock() pass elif token in [PyNestMLParser.OUTPUT_KEYWORD]: - self.state = 455 + self.state = 457 self.outputBlock() pass elif token in [PyNestMLParser.FUNCTION_KEYWORD]: - self.state = 456 + self.state = 458 self.function() pass elif token in [PyNestMLParser.ON_RECEIVE_KEYWORD]: - self.state = 457 + self.state = 459 self.onReceiveBlock() pass elif token in [PyNestMLParser.UPDATE_KEYWORD]: - self.state = 458 + self.state = 460 self.updateBlock() pass else: raise NoViableAltException(self) - self.state = 461 + self.state = 463 self._errHandler.sync(self) _la = self._input.LA(1) if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.FUNCTION_KEYWORD) | (1 << PyNestMLParser.STATE_KEYWORD) | (1 << PyNestMLParser.PARAMETERS_KEYWORD) | (1 << PyNestMLParser.INTERNALS_KEYWORD) | (1 << PyNestMLParser.UPDATE_KEYWORD) | (1 << PyNestMLParser.EQUATIONS_KEYWORD) | (1 << PyNestMLParser.INPUT_KEYWORD) | (1 << PyNestMLParser.OUTPUT_KEYWORD) | (1 << PyNestMLParser.ON_RECEIVE_KEYWORD))) != 0)): break - self.state = 463 + self.state = 465 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3587,29 +3592,29 @@ def onReceiveBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 465 + self.state = 467 self.match(PyNestMLParser.ON_RECEIVE_KEYWORD) - self.state = 466 + self.state = 468 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 467 + self.state = 469 localctx.inputPortName = self.match(PyNestMLParser.NAME) - self.state = 472 + self.state = 474 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.COMMA: - self.state = 468 + self.state = 470 self.match(PyNestMLParser.COMMA) - self.state = 469 + self.state = 471 self.constParameter() - self.state = 474 + self.state = 476 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 475 + self.state = 477 self.match(PyNestMLParser.RIGHT_PAREN) - self.state = 476 + self.state = 478 self.match(PyNestMLParser.COLON) - self.state = 477 + self.state = 479 self.block() except RecognitionException as re: localctx.exception = re @@ -3675,7 +3680,7 @@ def blockWithVariables(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 479 + self.state = 481 localctx.blockType = self._input.LT(1) _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.STATE_KEYWORD) | (1 << PyNestMLParser.PARAMETERS_KEYWORD) | (1 << PyNestMLParser.INTERNALS_KEYWORD))) != 0)): @@ -3683,25 +3688,25 @@ def blockWithVariables(self): else: self._errHandler.reportMatch(self) self.consume() - self.state = 480 + self.state = 482 self.match(PyNestMLParser.COLON) - self.state = 481 + self.state = 483 self.match(PyNestMLParser.NEWLINE) - self.state = 482 + self.state = 484 self.match(PyNestMLParser.INDENT) - self.state = 484 + self.state = 486 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 483 + self.state = 485 self.declaration_newline() - self.state = 486 + self.state = 488 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==PyNestMLParser.INLINE_KEYWORD or _la==PyNestMLParser.RECORDABLE_KEYWORD or _la==PyNestMLParser.NAME): break - self.state = 488 + self.state = 490 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3747,11 +3752,11 @@ def updateBlock(self): self.enterRule(localctx, 76, self.RULE_updateBlock) try: self.enterOuterAlt(localctx, 1) - self.state = 490 + self.state = 492 self.match(PyNestMLParser.UPDATE_KEYWORD) - self.state = 491 + self.state = 493 self.match(PyNestMLParser.COLON) - self.state = 492 + self.state = 494 self.block() except RecognitionException as re: localctx.exception = re @@ -3824,43 +3829,43 @@ def equationsBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 494 + self.state = 496 self.match(PyNestMLParser.EQUATIONS_KEYWORD) - self.state = 495 + self.state = 497 self.match(PyNestMLParser.COLON) - self.state = 496 + self.state = 498 self.match(PyNestMLParser.NEWLINE) - self.state = 497 + self.state = 499 self.match(PyNestMLParser.INDENT) - self.state = 501 + self.state = 503 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 501 + self.state = 503 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.INLINE_KEYWORD, PyNestMLParser.RECORDABLE_KEYWORD]: - self.state = 498 + self.state = 500 self.inlineExpression() pass elif token in [PyNestMLParser.NAME]: - self.state = 499 + self.state = 501 self.odeEquation() pass elif token in [PyNestMLParser.KERNEL_KEYWORD]: - self.state = 500 + self.state = 502 self.kernel() pass else: raise NoViableAltException(self) - self.state = 503 + self.state = 505 self._errHandler.sync(self) _la = self._input.LA(1) if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INLINE_KEYWORD) | (1 << PyNestMLParser.RECORDABLE_KEYWORD) | (1 << PyNestMLParser.KERNEL_KEYWORD))) != 0) or _la==PyNestMLParser.NAME): break - self.state = 505 + self.state = 507 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3893,11 +3898,18 @@ def INDENT(self): def DEDENT(self): return self.getToken(PyNestMLParser.DEDENT, 0) - def inputPort(self, i:int=None): + def spikeInputPort(self, i:int=None): if i is None: - return self.getTypedRuleContexts(PyNestMLParser.InputPortContext) + return self.getTypedRuleContexts(PyNestMLParser.SpikeInputPortContext) else: - return self.getTypedRuleContext(PyNestMLParser.InputPortContext,i) + return self.getTypedRuleContext(PyNestMLParser.SpikeInputPortContext,i) + + + def continuousInputPort(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(PyNestMLParser.ContinuousInputPortContext) + else: + return self.getTypedRuleContext(PyNestMLParser.ContinuousInputPortContext,i) def getRuleIndex(self): @@ -3919,27 +3931,39 @@ def inputBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 507 + self.state = 509 self.match(PyNestMLParser.INPUT_KEYWORD) - self.state = 508 + self.state = 510 self.match(PyNestMLParser.COLON) - self.state = 509 + self.state = 511 self.match(PyNestMLParser.NEWLINE) - self.state = 510 + self.state = 512 self.match(PyNestMLParser.INDENT) - self.state = 512 + self.state = 515 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 511 - self.inputPort() - self.state = 514 + self.state = 515 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,52,self._ctx) + if la_ == 1: + self.state = 513 + self.spikeInputPort() + pass + + elif la_ == 2: + self.state = 514 + self.continuousInputPort() + pass + + + self.state = 517 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==PyNestMLParser.NAME): break - self.state = 516 + self.state = 519 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3950,7 +3974,7 @@ def inputBlock(self): return localctx - class InputPortContext(ParserRuleContext): + class SpikeInputPortContext(ParserRuleContext): __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): @@ -3958,12 +3982,13 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): self.parser = parser self.name = None # Token self.sizeParameter = None # ExpressionContext - self.isContinuous = None # Token - self.isSpike = None # Token def LEFT_ANGLE_MINUS(self): return self.getToken(PyNestMLParser.LEFT_ANGLE_MINUS, 0) + def SPIKE_KEYWORD(self): + return self.getToken(PyNestMLParser.SPIKE_KEYWORD, 0) + def NEWLINE(self): return self.getToken(PyNestMLParser.NEWLINE, 0) @@ -3976,10 +4001,6 @@ def LEFT_SQUARE_BRACKET(self): def RIGHT_SQUARE_BRACKET(self): return self.getToken(PyNestMLParser.RIGHT_SQUARE_BRACKET, 0) - def dataType(self): - return self.getTypedRuleContext(PyNestMLParser.DataTypeContext,0) - - def inputQualifier(self, i:int=None): if i is None: return self.getTypedRuleContexts(PyNestMLParser.InputQualifierContext) @@ -3987,57 +4008,43 @@ def inputQualifier(self, i:int=None): return self.getTypedRuleContext(PyNestMLParser.InputQualifierContext,i) - def CONTINUOUS_KEYWORD(self): - return self.getToken(PyNestMLParser.CONTINUOUS_KEYWORD, 0) - - def SPIKE_KEYWORD(self): - return self.getToken(PyNestMLParser.SPIKE_KEYWORD, 0) - def expression(self): return self.getTypedRuleContext(PyNestMLParser.ExpressionContext,0) def getRuleIndex(self): - return PyNestMLParser.RULE_inputPort + return PyNestMLParser.RULE_spikeInputPort def accept(self, visitor:ParseTreeVisitor): - if hasattr( visitor, "visitInputPort" ): - return visitor.visitInputPort(self) + if hasattr( visitor, "visitSpikeInputPort" ): + return visitor.visitSpikeInputPort(self) else: return visitor.visitChildren(self) - def inputPort(self): + def spikeInputPort(self): - localctx = PyNestMLParser.InputPortContext(self, self._ctx, self.state) - self.enterRule(localctx, 82, self.RULE_inputPort) + localctx = PyNestMLParser.SpikeInputPortContext(self, self._ctx, self.state) + self.enterRule(localctx, 82, self.RULE_spikeInputPort) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 518 + self.state = 521 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 523 + self.state = 526 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.LEFT_SQUARE_BRACKET: - self.state = 519 + self.state = 522 self.match(PyNestMLParser.LEFT_SQUARE_BRACKET) - self.state = 520 + self.state = 523 localctx.sizeParameter = self.expression(0) - self.state = 521 + self.state = 524 self.match(PyNestMLParser.RIGHT_SQUARE_BRACKET) - self.state = 526 - self._errHandler.sync(self) - _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INTEGER_KEYWORD) | (1 << PyNestMLParser.REAL_KEYWORD) | (1 << PyNestMLParser.STRING_KEYWORD) | (1 << PyNestMLParser.BOOLEAN_KEYWORD) | (1 << PyNestMLParser.VOID_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN))) != 0) or _la==PyNestMLParser.NAME or _la==PyNestMLParser.UNSIGNED_INTEGER: - self.state = 525 - self.dataType() - - self.state = 528 self.match(PyNestMLParser.LEFT_ANGLE_MINUS) self.state = 532 @@ -4050,21 +4057,94 @@ def inputPort(self): self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 537 - self._errHandler.sync(self) - token = self._input.LA(1) - if token in [PyNestMLParser.CONTINUOUS_KEYWORD]: - self.state = 535 - localctx.isContinuous = self.match(PyNestMLParser.CONTINUOUS_KEYWORD) - pass - elif token in [PyNestMLParser.SPIKE_KEYWORD]: - self.state = 536 - localctx.isSpike = self.match(PyNestMLParser.SPIKE_KEYWORD) - pass + self.state = 535 + self.match(PyNestMLParser.SPIKE_KEYWORD) + self.state = 536 + self.match(PyNestMLParser.NEWLINE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ContinuousInputPortContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.name = None # Token + self.sizeParameter = None # ExpressionContext + + def dataType(self): + return self.getTypedRuleContext(PyNestMLParser.DataTypeContext,0) + + + def LEFT_ANGLE_MINUS(self): + return self.getToken(PyNestMLParser.LEFT_ANGLE_MINUS, 0) + + def CONTINUOUS_KEYWORD(self): + return self.getToken(PyNestMLParser.CONTINUOUS_KEYWORD, 0) + + def NEWLINE(self): + return self.getToken(PyNestMLParser.NEWLINE, 0) + + def NAME(self): + return self.getToken(PyNestMLParser.NAME, 0) + + def LEFT_SQUARE_BRACKET(self): + return self.getToken(PyNestMLParser.LEFT_SQUARE_BRACKET, 0) + + def RIGHT_SQUARE_BRACKET(self): + return self.getToken(PyNestMLParser.RIGHT_SQUARE_BRACKET, 0) + + def expression(self): + return self.getTypedRuleContext(PyNestMLParser.ExpressionContext,0) + + + def getRuleIndex(self): + return PyNestMLParser.RULE_continuousInputPort + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitContinuousInputPort" ): + return visitor.visitContinuousInputPort(self) else: - raise NoViableAltException(self) + return visitor.visitChildren(self) + + + + + def continuousInputPort(self): + + localctx = PyNestMLParser.ContinuousInputPortContext(self, self._ctx, self.state) + self.enterRule(localctx, 84, self.RULE_continuousInputPort) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 538 + localctx.name = self.match(PyNestMLParser.NAME) + self.state = 543 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==PyNestMLParser.LEFT_SQUARE_BRACKET: + self.state = 539 + self.match(PyNestMLParser.LEFT_SQUARE_BRACKET) + self.state = 540 + localctx.sizeParameter = self.expression(0) + self.state = 541 + self.match(PyNestMLParser.RIGHT_SQUARE_BRACKET) + - self.state = 539 + self.state = 545 + self.dataType() + self.state = 546 + self.match(PyNestMLParser.LEFT_ANGLE_MINUS) + self.state = 547 + self.match(PyNestMLParser.CONTINUOUS_KEYWORD) + self.state = 548 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -4105,18 +4185,18 @@ def accept(self, visitor:ParseTreeVisitor): def inputQualifier(self): localctx = PyNestMLParser.InputQualifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 84, self.RULE_inputQualifier) + self.enterRule(localctx, 86, self.RULE_inputQualifier) try: self.enterOuterAlt(localctx, 1) - self.state = 543 + self.state = 552 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.INHIBITORY_KEYWORD]: - self.state = 541 + self.state = 550 localctx.isInhibitory = self.match(PyNestMLParser.INHIBITORY_KEYWORD) pass elif token in [PyNestMLParser.EXCITATORY_KEYWORD]: - self.state = 542 + self.state = 551 localctx.isExcitatory = self.match(PyNestMLParser.EXCITATORY_KEYWORD) pass else: @@ -4179,34 +4259,34 @@ def accept(self, visitor:ParseTreeVisitor): def outputBlock(self): localctx = PyNestMLParser.OutputBlockContext(self, self._ctx, self.state) - self.enterRule(localctx, 86, self.RULE_outputBlock) + self.enterRule(localctx, 88, self.RULE_outputBlock) try: self.enterOuterAlt(localctx, 1) - self.state = 545 + self.state = 554 self.match(PyNestMLParser.OUTPUT_KEYWORD) - self.state = 546 + self.state = 555 self.match(PyNestMLParser.COLON) - self.state = 547 + self.state = 556 self.match(PyNestMLParser.NEWLINE) - self.state = 548 + self.state = 557 self.match(PyNestMLParser.INDENT) - self.state = 551 + self.state = 560 self._errHandler.sync(self) token = self._input.LA(1) if token in [PyNestMLParser.SPIKE_KEYWORD]: - self.state = 549 + self.state = 558 localctx.isSpike = self.match(PyNestMLParser.SPIKE_KEYWORD) pass elif token in [PyNestMLParser.CONTINUOUS_KEYWORD]: - self.state = 550 + self.state = 559 localctx.isContinuous = self.match(PyNestMLParser.CONTINUOUS_KEYWORD) pass else: raise NoViableAltException(self) - self.state = 553 + self.state = 562 self.match(PyNestMLParser.NEWLINE) - self.state = 554 + self.state = 563 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -4276,49 +4356,49 @@ def accept(self, visitor:ParseTreeVisitor): def function(self): localctx = PyNestMLParser.FunctionContext(self, self._ctx, self.state) - self.enterRule(localctx, 88, self.RULE_function) + self.enterRule(localctx, 90, self.RULE_function) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 556 + self.state = 565 self.match(PyNestMLParser.FUNCTION_KEYWORD) - self.state = 557 + self.state = 566 self.match(PyNestMLParser.NAME) - self.state = 558 - self.match(PyNestMLParser.LEFT_PAREN) self.state = 567 + self.match(PyNestMLParser.LEFT_PAREN) + self.state = 576 self._errHandler.sync(self) _la = self._input.LA(1) if _la==PyNestMLParser.NAME: - self.state = 559 + self.state = 568 self.parameter() - self.state = 564 + self.state = 573 self._errHandler.sync(self) _la = self._input.LA(1) while _la==PyNestMLParser.COMMA: - self.state = 560 + self.state = 569 self.match(PyNestMLParser.COMMA) - self.state = 561 + self.state = 570 self.parameter() - self.state = 566 + self.state = 575 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 569 + self.state = 578 self.match(PyNestMLParser.RIGHT_PAREN) - self.state = 571 + self.state = 580 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INTEGER_KEYWORD) | (1 << PyNestMLParser.REAL_KEYWORD) | (1 << PyNestMLParser.STRING_KEYWORD) | (1 << PyNestMLParser.BOOLEAN_KEYWORD) | (1 << PyNestMLParser.VOID_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN))) != 0) or _la==PyNestMLParser.NAME or _la==PyNestMLParser.UNSIGNED_INTEGER: - self.state = 570 + self.state = 579 localctx.returnType = self.dataType() - self.state = 573 + self.state = 582 self.match(PyNestMLParser.COLON) - self.state = 574 + self.state = 583 self.block() except RecognitionException as re: localctx.exception = re @@ -4358,12 +4438,12 @@ def accept(self, visitor:ParseTreeVisitor): def parameter(self): localctx = PyNestMLParser.ParameterContext(self, self._ctx, self.state) - self.enterRule(localctx, 90, self.RULE_parameter) + self.enterRule(localctx, 92, self.RULE_parameter) try: self.enterOuterAlt(localctx, 1) - self.state = 576 + self.state = 585 self.match(PyNestMLParser.NAME) - self.state = 577 + self.state = 586 self.dataType() except RecognitionException as re: localctx.exception = re @@ -4419,15 +4499,15 @@ def accept(self, visitor:ParseTreeVisitor): def constParameter(self): localctx = PyNestMLParser.ConstParameterContext(self, self._ctx, self.state) - self.enterRule(localctx, 92, self.RULE_constParameter) + self.enterRule(localctx, 94, self.RULE_constParameter) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 579 + self.state = 588 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 580 + self.state = 589 self.match(PyNestMLParser.EQUALS) - self.state = 581 + self.state = 590 localctx.value = self._input.LT(1) _la = self._input.LA(1) if not(_la==PyNestMLParser.INF_KEYWORD or ((((_la - 86)) & ~0x3f) == 0 and ((1 << (_la - 86)) & ((1 << (PyNestMLParser.BOOLEAN_LITERAL - 86)) | (1 << (PyNestMLParser.STRING_LITERAL - 86)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 86)) | (1 << (PyNestMLParser.FLOAT - 86)))) != 0)): diff --git a/pynestml/generated/PyNestMLParserVisitor.py b/pynestml/generated/PyNestMLParserVisitor.py index 8f2a688a6..bddb67c0a 100644 --- a/pynestml/generated/PyNestMLParserVisitor.py +++ b/pynestml/generated/PyNestMLParserVisitor.py @@ -214,8 +214,13 @@ def visitInputBlock(self, ctx:PyNestMLParser.InputBlockContext): return self.visitChildren(ctx) - # Visit a parse tree produced by PyNestMLParser#inputPort. - def visitInputPort(self, ctx:PyNestMLParser.InputPortContext): + # Visit a parse tree produced by PyNestMLParser#spikeInputPort. + def visitSpikeInputPort(self, ctx:PyNestMLParser.SpikeInputPortContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by PyNestMLParser#continuousInputPort. + def visitContinuousInputPort(self, ctx:PyNestMLParser.ContinuousInputPortContext): return self.visitChildren(ctx) diff --git a/pynestml/grammars/PyNestMLParser.g4 b/pynestml/grammars/PyNestMLParser.g4 index da97b4227..f0d703e3b 100644 --- a/pynestml/grammars/PyNestMLParser.g4 +++ b/pynestml/grammars/PyNestMLParser.g4 @@ -303,10 +303,11 @@ parser grammar PyNestMLParser; @attribute inputPort: A list of input ports. */ inputBlock: INPUT_KEYWORD COLON - NEWLINE INDENT inputPort+ DEDENT; + NEWLINE INDENT (spikeInputPort | continuousInputPort)+ DEDENT; /** ASTInputPort represents a single input port, e.g.: - spike_in <- excitatory spike + spike_in[3] <- excitatory spike + I_stim[3] pA <- continuous @attribute name: The name of the input port. @attribute sizeParameter: Optional size parameter for multisynapse neuron. @attribute datatype: Optional data type of the port. @@ -314,12 +315,18 @@ parser grammar PyNestMLParser; @attribute isSpike: Indicates that this input port accepts spikes. @attribute isContinuous: Indicates that this input port accepts continuous-time input. */ - inputPort: + spikeInputPort: name=NAME (LEFT_SQUARE_BRACKET sizeParameter=expression RIGHT_SQUARE_BRACKET)? - (dataType)? LEFT_ANGLE_MINUS inputQualifier* - (isContinuous = CONTINUOUS_KEYWORD | isSpike = SPIKE_KEYWORD) NEWLINE; + SPIKE_KEYWORD NEWLINE; + + continuousInputPort: + name = NAME + (LEFT_SQUARE_BRACKET sizeParameter=expression RIGHT_SQUARE_BRACKET)? + dataType + LEFT_ANGLE_MINUS CONTINUOUS_KEYWORD NEWLINE; + /** ASTInputQualifier represents the qualifier of an inputPort. Only valid for spiking inputs. @attribute isInhibitory: Indicates that this spiking input port is inhibitory. diff --git a/pynestml/utils/ast_utils.py b/pynestml/utils/ast_utils.py index 9a31e9afe..9e4718a1c 100644 --- a/pynestml/utils/ast_utils.py +++ b/pynestml/utils/ast_utils.py @@ -513,9 +513,12 @@ def inline_aliases_convolution(cls, inline_expr: ASTInlineExpression) -> bool: """ Returns True if and only if the inline expression is of the form ``var type = convolve(...)``. """ - if isinstance(inline_expr.get_expression(), ASTSimpleExpression) \ - and inline_expr.get_expression().is_function_call() \ - and inline_expr.get_expression().get_function_call().get_name() == PredefinedFunctions.CONVOLVE: + expr = inline_expr.get_expression() + if isinstance(expr, ASTExpression): + expr = expr.get_lhs() + if isinstance(expr, ASTSimpleExpression) \ + and expr.is_function_call() \ + and expr.get_function_call().get_name() == PredefinedFunctions.CONVOLVE: return True return False @@ -1649,13 +1652,12 @@ def create_initial_values_for_kernels(cls, neuron: ASTNeuron, solver_dicts: List spike_in_port_name = var_name.split("__X__")[1] spike_in_port_name = spike_in_port_name.split("__d")[0] spike_in_port = ASTUtils.get_input_port_by_name(neuron.get_input_blocks(), spike_in_port_name) + type_str = "real" if spike_in_port: - type_str = NESTMLPrinter().print_data_type(spike_in_port.data_type) differential_order: int = len(re.findall("__d", var_name)) if differential_order: - type_str += "*s**-" + str(differential_order) - else: - type_str = "real" + type_str = "*s**-" + str(differential_order) + expr = "0 " + type_str # for kernels, "initial value" returned by ode-toolbox is actually the increment value; the actual initial value is assumed to be 0 if not cls.declaration_in_state_block(neuron, var_name): cls.add_declaration_to_state_block(neuron, var_name, expr, type_str) @@ -1927,13 +1929,17 @@ def replace_var(_expr, replace_var_name: str, replace_with_var_name: str): for equation_block in neuron.get_equations_blocks(): for decl in equation_block.get_declarations(): - if isinstance(decl, ASTInlineExpression) \ - and isinstance(decl.get_expression(), ASTSimpleExpression) \ - and '__X__' in str(decl.get_expression()) \ - and decl.get_expression().get_variable(): - replace_with_var_name = decl.get_expression().get_variable().get_name() - neuron.accept(ASTHigherOrderVisitor(lambda x: replace_var( - x, decl.get_variable_name(), replace_with_var_name))) + if isinstance(decl, ASTInlineExpression): + expr = decl.get_expression() + if isinstance(expr, ASTExpression): + expr = expr.get_lhs() + + if isinstance(expr, ASTSimpleExpression) \ + and '__X__' in str(expr) \ + and expr.get_variable(): + replace_with_var_name = expr.get_variable().get_name() + neuron.accept(ASTHigherOrderVisitor(lambda x: replace_var( + x, decl.get_variable_name(), replace_with_var_name))) @classmethod def replace_variable_names_in_expressions(cls, neuron: ASTNeuron, solver_dicts: List[dict]) -> None: diff --git a/pynestml/visitors/ast_builder_visitor.py b/pynestml/visitors/ast_builder_visitor.py index 687ad1b5d..8d7e35329 100644 --- a/pynestml/visitors/ast_builder_visitor.py +++ b/pynestml/visitors/ast_builder_visitor.py @@ -650,8 +650,11 @@ def visitEquationsBlock(self, ctx): # Visit a parse tree produced by PyNESTMLParser#inputBuffer. def visitInputBlock(self, ctx): input_ports = [] - if ctx.inputPort() is not None: - for port in ctx.inputPort(): + if ctx.spikeInputPort() is not None: + for port in ctx.spikeInputPort(): + input_ports.append(self.visit(port)) + if ctx.continuousInputPort() is not None: + for port in ctx.continuousInputPort(): input_ports.append(self.visit(port)) ret = ASTNodeFactory.create_ast_input_block(input_definitions=input_ports, source_position=create_source_pos(ctx)) @@ -659,7 +662,7 @@ def visitInputBlock(self, ctx): return ret # Visit a parse tree produced by PyNESTMLParser#inputPort. - def visitInputPort(self, ctx): + def visitSpikeInputPort(self, ctx): name = str(ctx.name.text) if ctx.name is not None else None size_parameter = None if ctx.sizeParameter is not None: @@ -668,15 +671,22 @@ def visitInputPort(self, ctx): if ctx.inputQualifier() is not None: for qual in ctx.inputQualifier(): input_qualifiers.append(self.visit(qual)) + signal_type = PortSignalType.SPIKE + ret = ASTNodeFactory.create_ast_input_port(name=name, size_parameter=size_parameter, data_type=None, + input_qualifiers=input_qualifiers, signal_type=signal_type, + source_position=create_source_pos(ctx)) + update_node_comments(ret, self.__comments.visit(ctx)) + return ret + + def visitContinuousInputPort(self, ctx): + name = str(ctx.name.text) if ctx.name is not None else None + size_parameter = None + if ctx.sizeParameter is not None: + size_parameter = self.visit(ctx.sizeParameter) data_type = self.visit(ctx.dataType()) if ctx.dataType() is not None else None - if ctx.isContinuous: - signal_type = PortSignalType.CONTINUOUS - elif ctx.isSpike: - signal_type = PortSignalType.SPIKE - else: - signal_type = None + signal_type = PortSignalType.CONTINUOUS ret = ASTNodeFactory.create_ast_input_port(name=name, size_parameter=size_parameter, data_type=data_type, - input_qualifiers=input_qualifiers, signal_type=signal_type, + input_qualifiers=None, signal_type=signal_type, source_position=create_source_pos(ctx)) update_node_comments(ret, self.__comments.visit(ctx)) return ret diff --git a/pynestml/visitors/ast_function_call_visitor.py b/pynestml/visitors/ast_function_call_visitor.py index 4e54e3ff1..435b1a998 100644 --- a/pynestml/visitors/ast_function_call_visitor.py +++ b/pynestml/visitors/ast_function_call_visitor.py @@ -18,6 +18,9 @@ # # You should have received a copy of the GNU General Public License # along with NEST. If not, see . +from pynestml.symbols.unit_type_symbol import UnitTypeSymbol + +from pynestml.symbols.predefined_units import PredefinedUnits from pynestml.meta_model.ast_simple_expression import ASTSimpleExpression from pynestml.symbols.error_type_symbol import ErrorTypeSymbol @@ -89,8 +92,7 @@ def visit_simple_expression(self, node: ASTSimpleExpression) -> None: return_type.referenced_object = node - # convolve symbol does not have a return type set. - # returns whatever type the second parameter is. + # return type of the convolve function is the type of the second parameter multiplied by the unit of time (s) if function_name == PredefinedFunctions.CONVOLVE: # Deviations from the assumptions made here are handled in the convolveCoco buffer_parameter = node.get_function_call().get_args()[1] @@ -99,7 +101,7 @@ def visit_simple_expression(self, node: ASTSimpleExpression) -> None: buffer_name = buffer_parameter.get_variable().get_name() buffer_symbol_resolve = scope.resolve_to_symbol(buffer_name, SymbolKind.VARIABLE) if buffer_symbol_resolve is not None: - node.type = buffer_symbol_resolve.get_type_symbol() + node.type = buffer_symbol_resolve.get_type_symbol() * UnitTypeSymbol(PredefinedUnits.get_unit("s")) return # getting here means there is an error with the parameters to convolve diff --git a/pynestml/visitors/ast_symbol_table_visitor.py b/pynestml/visitors/ast_symbol_table_visitor.py index 0a6670acb..5dcd7b2a9 100644 --- a/pynestml/visitors/ast_symbol_table_visitor.py +++ b/pynestml/visitors/ast_symbol_table_visitor.py @@ -593,20 +593,21 @@ def visit_input_port(self, node): :param node: a single input port. :type node: ASTInputPort """ - if not node.has_datatype(): - code, message = Messages.get_input_port_type_not_defined(node.get_name()) - Logger.log_message(code=code, message=message, error_position=node.get_source_position(), - log_level=LoggingLevel.ERROR) - else: - node.get_datatype().update_scope(node.get_scope()) + if node.is_continuous(): + if not node.has_datatype(): + code, message = Messages.get_input_port_type_not_defined(node.get_name()) + Logger.log_message(code=code, message=message, error_position=node.get_source_position(), + log_level=LoggingLevel.ERROR) + else: + node.get_datatype().update_scope(node.get_scope()) for qual in node.get_input_qualifiers(): qual.update_scope(node.get_scope()) def endvisit_input_port(self, node): - if not node.has_datatype(): - return - type_symbol = node.get_datatype().get_type_symbol() + type_symbol = PredefinedTypes.get_type("s")**-1 + if node.is_continuous() and node.has_datatype(): + type_symbol = node.get_datatype().get_type_symbol() type_symbol.is_buffer = True # set it as a buffer symbol = VariableSymbol(element_reference=node, scope=node.get_scope(), name=node.get_name(), block_type=BlockType.INPUT, vector_parameter=node.get_size_parameter(), diff --git a/pynestml/visitors/comment_collector_visitor.py b/pynestml/visitors/comment_collector_visitor.py index 7455e3213..6e4d007f1 100644 --- a/pynestml/visitors/comment_collector_visitor.py +++ b/pynestml/visitors/comment_collector_visitor.py @@ -84,7 +84,11 @@ def visitCompoundStmt(self, ctx): return (get_comments(ctx, self.__tokens, self.__strip_delim), get_pre_comments(ctx, self.__tokens, self.__strip_delim), get_in_comment(ctx, self.__tokens, self.__strip_delim)) - def visitInputPort(self, ctx): + def visitSpikeInputPort(self, ctx): + return (get_comments(ctx, self.__tokens, self.__strip_delim), get_pre_comments(ctx, self.__tokens, self.__strip_delim), + get_in_comment(ctx, self.__tokens, self.__strip_delim)) + + def visitContinuousInputPort(self, ctx): return (get_comments(ctx, self.__tokens, self.__strip_delim), get_pre_comments(ctx, self.__tokens, self.__strip_delim), get_in_comment(ctx, self.__tokens, self.__strip_delim)) diff --git a/tests/cocos_test.py b/tests/cocos_test.py index f4a17f6c0..24a805546 100644 --- a/tests/cocos_test.py +++ b/tests/cocos_test.py @@ -201,7 +201,7 @@ def test_invalid_no_values_assigned_to_input_ports(self): os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoValueAssignedToInputPort.nestml')) self.assertEqual(len( - Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 2) + Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 1) def test_valid_no_values_assigned_to_input_ports(self): Logger.set_logging_level(LoggingLevel.INFO) @@ -305,38 +305,6 @@ def test_valid_parameters_assigned_only_in_parameters_block(self): self.assertEqual(len( Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 0) - def test_invalid_continuous_input_ports_not_specified_with_keywords(self): - Logger.set_logging_level(LoggingLevel.INFO) - model = ModelParser.parse_model( - os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), - 'CoCoContinuousInputPortQualifierSpecified.nestml')) - self.assertEqual(len( - Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 1) - - def test_valid_continuous_input_ports_not_specified(self): - Logger.set_logging_level(LoggingLevel.INFO) - model = ModelParser.parse_model( - os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'valid')), - 'CoCoContinuousInputPortQualifierSpecified.nestml')) - self.assertEqual(len( - Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 0) - - def test_invalid_spike_input_port_without_datatype(self): - Logger.set_logging_level(LoggingLevel.INFO) - model = ModelParser.parse_model( - os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), - 'CoCoSpikeInputPortWithoutType.nestml')) - self.assertEqual(len( - Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 2) - - def test_valid_spike_input_port_without_datatype(self): - Logger.set_logging_level(LoggingLevel.INFO) - model = ModelParser.parse_model( - os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'valid')), - 'CoCoSpikeInputPortWithoutType.nestml')) - self.assertEqual(len( - Logger.get_all_messages_of_level_and_or_node(model.get_neuron_list()[0], LoggingLevel.ERROR)), 0) - def test_invalid_function_with_wrong_arg_number_detected(self): Logger.set_logging_level(LoggingLevel.INFO) model = ModelParser.parse_model( diff --git a/tests/invalid/CoCoContinuousInputPortQualifierSpecified.nestml b/tests/invalid/CoCoContinuousInputPortQualifierSpecified.nestml deleted file mode 100644 index f7e76c161..000000000 --- a/tests/invalid/CoCoContinuousInputPortQualifierSpecified.nestml +++ /dev/null @@ -1,36 +0,0 @@ -""" -CoCoContinuousInputPortQualifierSpecified.nestml -################################################ - - -Description -+++++++++++ - -This model is used to test if broken CoCos are identified correctly. Here, if continuous time input ports are not specified by qualifiers. - -Negative case. - - -Copyright statement -+++++++++++++++++++ - -This file is part of NEST. - -Copyright (C) 2004 The NEST Initiative - -NEST is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -NEST is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with NEST. If not, see . -""" -neuron CoCoContinuousInputPortQualifierSpecified: - input: - currents pA <- inhibitory continuous # qualifiers may not be specified for a continuous time input port diff --git a/tests/invalid/CoCoConvolveNotCorrectlyParametrized.nestml b/tests/invalid/CoCoConvolveNotCorrectlyParametrized.nestml index 111c12f45..b8c547c14 100644 --- a/tests/invalid/CoCoConvolveNotCorrectlyParametrized.nestml +++ b/tests/invalid/CoCoConvolveNotCorrectlyParametrized.nestml @@ -39,4 +39,4 @@ neuron CoCoConvolveNotCorrectlyParametrized: inline testB pA = convolve(V_m+V_m, spikeExc) input: - spikeExc integer <- excitatory spike + spikeExc <- excitatory spike diff --git a/tests/invalid/CoCoConvolveNotCorrectlyProvided.nestml b/tests/invalid/CoCoConvolveNotCorrectlyProvided.nestml index 864d99122..53795b21a 100644 --- a/tests/invalid/CoCoConvolveNotCorrectlyProvided.nestml +++ b/tests/invalid/CoCoConvolveNotCorrectlyProvided.nestml @@ -42,7 +42,7 @@ neuron CoCoConvolveNotCorrectlyProvided: V_m' = 20 mV/ms input: - spikeExc integer <- excitatory spike + spikeExc <- excitatory spike update: integrate_odes() diff --git a/tests/invalid/CoCoEachBlockUnique.nestml b/tests/invalid/CoCoEachBlockUnique.nestml index 15321dace..26b20ab36 100644 --- a/tests/invalid/CoCoEachBlockUnique.nestml +++ b/tests/invalid/CoCoEachBlockUnique.nestml @@ -39,7 +39,7 @@ neuron CoCoEachBlockUnique: test2 integer = 0 input: - spike1 pA <- spike + spike1 <- spike input: - spike2 pA <- spike + spike2 <- spike diff --git a/tests/invalid/CoCoInputPortWithRedundantTypes.nestml b/tests/invalid/CoCoInputPortWithRedundantTypes.nestml index 77107fdc1..e1bd7ac94 100644 --- a/tests/invalid/CoCoInputPortWithRedundantTypes.nestml +++ b/tests/invalid/CoCoInputPortWithRedundantTypes.nestml @@ -33,4 +33,4 @@ along with NEST. If not, see . """ neuron CoCoInputPortWithRedundantTypes: input: - spikeInhX2 integer <- inhibitory inhibitory spike # spike redundant keywords used + spikeInhX2 <- inhibitory inhibitory spike # spike redundant keywords used diff --git a/tests/invalid/CoCoPrioritiesCorrectlySpecified.nestml b/tests/invalid/CoCoPrioritiesCorrectlySpecified.nestml index 0c385c90c..85d7a6968 100644 --- a/tests/invalid/CoCoPrioritiesCorrectlySpecified.nestml +++ b/tests/invalid/CoCoPrioritiesCorrectlySpecified.nestml @@ -31,8 +31,8 @@ along with NEST. If not, see . """ synapse CoCoPrioritiesCorrectlySpecified: input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike onReceive(pre_spikes, priority=1): print("onReceive pre_spikes") diff --git a/tests/invalid/CoCoValueAssignedToInputPort.nestml b/tests/invalid/CoCoValueAssignedToInputPort.nestml index b45321617..d7326f522 100644 --- a/tests/invalid/CoCoValueAssignedToInputPort.nestml +++ b/tests/invalid/CoCoValueAssignedToInputPort.nestml @@ -33,7 +33,7 @@ along with NEST. If not, see . """ neuron CoCoValueAssignedToInputPort: input: - spikeInh integer <- inhibitory spike + spikeInh <- inhibitory spike update: - spikeInh = 10 + spikeInh = 10 / s diff --git a/tests/invalid/CoCoVectorInputPortSizeAndType.nestml b/tests/invalid/CoCoVectorInputPortSizeAndType.nestml index 35dcfb4d7..cdca00bb5 100644 --- a/tests/invalid/CoCoVectorInputPortSizeAndType.nestml +++ b/tests/invalid/CoCoVectorInputPortSizeAndType.nestml @@ -37,5 +37,5 @@ neuron CoCoVectorInputPortSizeAndType: TWO integer = 2 input: - foo[TWO] pA <- spike - bar[-3] pA <- spike + foo[TWO] <- spike + bar[-3] <- spike diff --git a/tests/nest_tests/resources/BiexponentialPostSynapticResponse.nestml b/tests/nest_tests/resources/BiexponentialPostSynapticResponse.nestml index 521fd9670..1bde519eb 100644 --- a/tests/nest_tests/resources/BiexponentialPostSynapticResponse.nestml +++ b/tests/nest_tests/resources/BiexponentialPostSynapticResponse.nestml @@ -56,10 +56,10 @@ neuron biexp_postsynaptic_response: kernel g_gap = g_gap_const * (exp(-t/tau_syn_decay_gap) - exp(-t/tau_syn_rise_gap)) kernel g_GABA'' = -(g_GABA + g_GABA' * (tau_syn_decay_E + tau_syn_rise_E)) / (tau_syn_decay_E * tau_syn_rise_E) - inline I_syn_exc pA = (F_E + convolve(g_ex, spikeExc)) * (V_m - E_ex) - inline I_syn_inh pA = (F_I + convolve(g_in, spikeInh)) * (V_m - E_in) - inline I_syn_gap pA = (F_I + convolve(g_gap, spikeGap)) * (V_m - E_gap) - inline I_syn_GABA pA = (F_I + convolve(g_GABA, spikeGABA)) * (V_m - E_gap) + inline I_syn_exc pA = (F_E + convolve(g_ex, spikeExc) * nS) * (V_m - E_ex) + inline I_syn_inh pA = (F_I + convolve(g_in, spikeInh) * nS) * (V_m - E_in) + inline I_syn_gap pA = (F_I + convolve(g_gap, spikeGap) * nS) * (V_m - E_gap) + inline I_syn_GABA pA = (F_I + convolve(g_GABA, spikeGABA) * nS) * (V_m - E_gap) inline I_leak pA = g_L * (V_m - E_L) V_m' = (-I_leak - I_syn_exc - I_syn_inh - I_syn_gap - I_syn_GABA + I_e + I_stim) / C_m @@ -83,8 +83,6 @@ neuron biexp_postsynaptic_response: tau_syn_rise_gap ms = 10 ms # Synaptic Time Constant Excitatory Synapse tau_syn_decay_gap ms = 11 ms # Synaptic Time Constant for Inhibitory Synapse - #tau_syn_alpha ms = 1.5ms # Synaptic Time Constant for Inhibitory Synapse - I_e pA = 0pA # Constant Current F_E nS = 0nS # Constant External input conductance (excitatory). F_I nS = 0nS # Constant External input conductance (inhibitory). @@ -111,10 +109,10 @@ neuron biexp_postsynaptic_response: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - spikeInh nS <- spike - spikeExc nS <- spike - spikeGap nS <- spike - spikeGABA nS <- spike + spikeInh <- spike + spikeExc <- spike + spikeGap <- spike + spikeGABA <- spike I_stim pA <- continuous output: diff --git a/tests/nest_tests/resources/FIR_filter.nestml b/tests/nest_tests/resources/FIR_filter.nestml index 56c82ab71..1f17302ce 100644 --- a/tests/nest_tests/resources/FIR_filter.nestml +++ b/tests/nest_tests/resources/FIR_filter.nestml @@ -43,11 +43,11 @@ neuron fir_filter: h[N] real = 1. # filter coefficients input: - spike_in real <- spike + spike_in <- spike update: # circular buffer for input spike count per timestep - x[i] = spike_in + x[i] = spike_in * s # compute the new value of y j integer = 0 diff --git a/tests/nest_tests/resources/InputPorts.nestml b/tests/nest_tests/resources/InputPorts.nestml index c19c07af6..98c85a0b0 100644 --- a/tests/nest_tests/resources/InputPorts.nestml +++ b/tests/nest_tests/resources/InputPorts.nestml @@ -34,12 +34,13 @@ neuron input_ports: bar pA = 1.5 pA input: - AMPA_spikes pA <- excitatory spike - GABA_spikes pA <- inhibitory spike - NMDA_spikes pA <- spike - foo[2] pA <- spike - my_spikes[3] pA <- excitatory spike - my_spikes2[3] pA <- inhibitory spike + AMPA_spikes <- excitatory spike + GABA_spikes <- inhibitory spike + NMDA_spikes <- spike + foo[2] <- spike + my_spikes[3] <- excitatory spike + my_spikes2[3] <- inhibitory spike + I_stim pA <- continuous update: - bar = foo[1] + bar = foo[1] * pA * s diff --git a/tests/nest_tests/resources/RecordableVariables.nestml b/tests/nest_tests/resources/RecordableVariables.nestml index 838d99418..fbca442a6 100644 --- a/tests/nest_tests/resources/RecordableVariables.nestml +++ b/tests/nest_tests/resources/RecordableVariables.nestml @@ -35,7 +35,7 @@ neuron recordable_variables: equations: kernel I_kernel = exp(-1/tau_syn*t) - inline I_syn pA = convolve(I_kernel, spikes) + inline I_syn pA = convolve(I_kernel, spikes) * pA recordable inline V_m mV = V_rel + V_reset V_rel' = -V_rel / tau_m + (I_syn + I_e + I_stim) / C_m @@ -48,7 +48,7 @@ neuron recordable_variables: V_thr mV = -55 mV input: - spikes pA <- spike + spikes <- spike I_stim pA <- continuous update: diff --git a/tests/nest_tests/resources/TimeVariableSynapse.nestml b/tests/nest_tests/resources/TimeVariableSynapse.nestml index ea02cc6a0..430c463ad 100644 --- a/tests/nest_tests/resources/TimeVariableSynapse.nestml +++ b/tests/nest_tests/resources/TimeVariableSynapse.nestml @@ -35,7 +35,7 @@ synapse time_variable_synapse: d ms = 1 ms @nest::delay input: - pre_spikes real <- spike + pre_spikes <- spike update: x = t diff --git a/tests/nest_tests/resources/add_spikes_to_ode.nestml b/tests/nest_tests/resources/add_spikes_to_ode.nestml index 07e6eb866..704309bc3 100644 --- a/tests/nest_tests/resources/add_spikes_to_ode.nestml +++ b/tests/nest_tests/resources/add_spikes_to_ode.nestml @@ -30,11 +30,11 @@ neuron add_spikes_to_ode: y real = 0 equations: - x' = -x + 42 * spikes / s # linear eq - y' = -y**2 + 123 * spikes / s # nonlinear eq + x' = -x + 42 * spikes # linear eq + y' = -y**2 + 123 * spikes # nonlinear eq input: - spikes real <- spike + spikes <- spike output: spike diff --git a/tests/nest_tests/resources/dopa_synapse_second_order.nestml b/tests/nest_tests/resources/dopa_synapse_second_order.nestml index 7edf129c3..8522b3ec7 100644 --- a/tests/nest_tests/resources/dopa_synapse_second_order.nestml +++ b/tests/nest_tests/resources/dopa_synapse_second_order.nestml @@ -44,8 +44,8 @@ synapse dopa_synapse_second_order: dopa_rate_d' = -dopa_rate / tau_dopa**2 * ms - 2 * dopa_rate_d / tau_dopa input: - pre_spikes real <- spike - dopa_spikes real <- spike + pre_spikes <- spike + dopa_spikes <- spike output: spike diff --git a/tests/nest_tests/resources/iaf_cond_exp_Istep.nestml b/tests/nest_tests/resources/iaf_cond_exp_Istep.nestml index 34c76ae03..921964377 100644 --- a/tests/nest_tests/resources/iaf_cond_exp_Istep.nestml +++ b/tests/nest_tests/resources/iaf_cond_exp_Istep.nestml @@ -34,8 +34,8 @@ neuron iaf_cond_exp_Istep: kernel g_in = exp(-t/tau_syn_in) # inputs from the inh conductance kernel g_ex = exp(-t/tau_syn_ex) # inputs from the exc conductance - inline I_syn_ex pA = convolve(g_ex, exc_spikes) * ( V_m - E_ex ) - inline I_syn_in pA = convolve(g_in, inh_spikes) * ( V_m - E_in ) + inline I_syn_ex pA = convolve(g_ex, exc_spikes) * nS * ( V_m - E_ex ) + inline I_syn_in pA = convolve(g_in, inh_spikes) * nS * ( V_m - E_in ) inline I_leak pA = g_L * ( V_m - E_L ) V_m' = ( -I_leak - I_syn_ex - I_syn_in + I_e + I_stim + I_step_now ) / C_m @@ -62,8 +62,8 @@ neuron iaf_cond_exp_Istep: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - inh_spikes nS <- inhibitory spike - exc_spikes nS <- excitatory spike + inh_spikes <- inhibitory spike + exc_spikes <- excitatory spike I_stim pA <- continuous output: diff --git a/tests/nest_tests/resources/iaf_psc_exp_multisynapse.nestml b/tests/nest_tests/resources/iaf_psc_exp_multisynapse.nestml index c0c1f513f..9908ccadc 100644 --- a/tests/nest_tests/resources/iaf_psc_exp_multisynapse.nestml +++ b/tests/nest_tests/resources/iaf_psc_exp_multisynapse.nestml @@ -21,7 +21,7 @@ neuron iaf_psc_exp_multisynapse_neuron: kernel I_kernel2 = exp(-1/tau_syn2*t) kernel I_kernel3 = -exp(-1/tau_syn3*t) - inline I_syn pA = convolve(I_kernel1, spikes1) - convolve(I_kernel2, spikes2) + convolve(I_kernel3, spikes3) + inline I_syn pA = (convolve(I_kernel1, spikes1) - convolve(I_kernel2, spikes2) + convolve(I_kernel3, spikes3)) * pA V_m' = -(V_m - E_L) / tau_m + (I_syn + I_e + I_stim) / C_m @@ -42,9 +42,9 @@ neuron iaf_psc_exp_multisynapse_neuron: RefractoryCounts integer = steps(t_ref) input: - spikes1 pA <- spike - spikes2 pA <- spike - spikes3 pA <- spike + spikes1 <- spike + spikes2 <- spike + spikes3 <- spike I_stim pA <- continuous output: diff --git a/tests/nest_tests/resources/iaf_psc_exp_multisynapse_vectors.nestml b/tests/nest_tests/resources/iaf_psc_exp_multisynapse_vectors.nestml index ae981eb9c..955100e38 100644 --- a/tests/nest_tests/resources/iaf_psc_exp_multisynapse_vectors.nestml +++ b/tests/nest_tests/resources/iaf_psc_exp_multisynapse_vectors.nestml @@ -21,7 +21,7 @@ neuron iaf_psc_exp_multisynapse_vectors_neuron: kernel I_kernel2 = exp(-1/tau_syn2*t) kernel I_kernel3 = -exp(-1/tau_syn3*t) - inline I_syn pA = convolve(I_kernel1, spikes[1]) - convolve(I_kernel2, spikes[2]) + convolve(I_kernel3, spikes[3]) + inline I_syn pA = (convolve(I_kernel1, spikes[1]) - convolve(I_kernel2, spikes[2]) + convolve(I_kernel3, spikes[3])) * pA V_m' = -(V_m - E_L) / tau_m + (I_syn + I_e + I_stim) / C_m @@ -42,7 +42,7 @@ neuron iaf_psc_exp_multisynapse_vectors_neuron: RefractoryCounts integer = steps(t_ref) input: - spikes[3] pA <- spike + spikes[3] <- spike I_stim pA <- continuous output: diff --git a/tests/nest_tests/resources/iaf_psc_exp_nonlineardendrite.nestml b/tests/nest_tests/resources/iaf_psc_exp_nonlineardendrite.nestml index 1dc555395..9b82d94bf 100644 --- a/tests/nest_tests/resources/iaf_psc_exp_nonlineardendrite.nestml +++ b/tests/nest_tests/resources/iaf_psc_exp_nonlineardendrite.nestml @@ -43,9 +43,9 @@ neuron iaf_psc_exp_nonlineardendrite: kernel I_kernel2 = (e / tau_syn2) * t * exp(-t / tau_syn2) kernel I_kernel3 = exp(-t / tau_syn3) - recordable inline I_dend pA = convolve(I_kernel2, I_2) + recordable inline I_dend pA = convolve(I_kernel2, I_2) * pA - inline I_syn pA = convolve(I_kernel1, I_1) + dend_curr_enabled * I_dend + I_dend_ap + convolve(I_kernel3, I_3) + I_e + inline I_syn pA = convolve(I_kernel1, I_1) * pA + dend_curr_enabled * I_dend + I_dend_ap + convolve(I_kernel3, I_3) * pA + I_e V_m' = -(V_m - E_L) / tau_m + I_syn / C_m @@ -66,9 +66,9 @@ neuron iaf_psc_exp_nonlineardendrite: T_dend_ap ms = 10 ms # time window over which the dendritic current clamp is active input: - I_1 pA <- spike - I_2 pA <- spike - I_3 pA <- spike + I_1 <- spike + I_2 <- spike + I_3 <- spike output: spike @@ -83,7 +83,7 @@ neuron iaf_psc_exp_nonlineardendrite: t_dend_ap = 0 ms dend_curr_enabled = 1. I_dend = 0 pA - I_dend' = 0 pA/ms + I_dend' = 0 * s**-1 I_dend_ap = 0 pA if I_dend > i_th: diff --git a/tests/nest_tests/resources/iaf_psc_exp_resolution_test.nestml b/tests/nest_tests/resources/iaf_psc_exp_resolution_test.nestml index 4508153a9..4c6fb7ab7 100644 --- a/tests/nest_tests/resources/iaf_psc_exp_resolution_test.nestml +++ b/tests/nest_tests/resources/iaf_psc_exp_resolution_test.nestml @@ -16,7 +16,7 @@ neuron iaf_psc_exp_resolution_test: equations: kernel I_kernel_inh = exp(-t/tau_syn_inh) kernel I_kernel_exc = exp(-t/tau_syn_exc) - inline I_syn pA = convolve(I_kernel_inh, inh_spikes) + convolve(I_kernel_exc, exc_spikes) + I_e + I_stim + inline I_syn pA = convolve(I_kernel_inh, inh_spikes) * pA + convolve(I_kernel_exc, exc_spikes) * pA + I_e + I_stim V_m' = -(V_m - E_L) / tau_m + I_syn / C_m parameters: @@ -38,8 +38,8 @@ neuron iaf_psc_exp_resolution_test: c ms = resolution() input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous output: diff --git a/tests/resources/CommentTest.nestml b/tests/resources/CommentTest.nestml index ecf6a13e0..131467a82 100644 --- a/tests/resources/CommentTest.nestml +++ b/tests/resources/CommentTest.nestml @@ -54,7 +54,7 @@ neuron commentTest: #neuron in comment ok #input comment ok input: - NMDA pA <- spike + NMDA <- spike #output comment ok output: diff --git a/tests/resources/NestMLPrinterTest.nestml b/tests/resources/NestMLPrinterTest.nestml index 72b534952..d99813652 100644 --- a/tests/resources/NestMLPrinterTest.nestml +++ b/tests/resources/NestMLPrinterTest.nestml @@ -66,7 +66,7 @@ neuron aeif_cond_alpha_implicit: # input pre input: # input decl pre - inh_spikes nS <- inhibitory spike # input decl in + inh_spikes <- inhibitory spike # input decl in # input decl post # output pre diff --git a/tests/resources/SynapseEventSequenceTest.nestml b/tests/resources/SynapseEventSequenceTest.nestml index 0c5b7a9ad..852843ba2 100644 --- a/tests/resources/SynapseEventSequenceTest.nestml +++ b/tests/resources/SynapseEventSequenceTest.nestml @@ -34,8 +34,8 @@ synapse SynapseEventSequenceTest: tr real = 1. input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike onReceive(pre_spikes, priority=1): tr += 1. diff --git a/tests/resources/random_number_generators_test.nestml b/tests/resources/random_number_generators_test.nestml index 6af85ae5c..776d511bd 100644 --- a/tests/resources/random_number_generators_test.nestml +++ b/tests/resources/random_number_generators_test.nestml @@ -35,8 +35,8 @@ neuron test_random: r' = random_uniform(42, 123) / s input: - exc_spikes nS <- excitatory spike - inh_spikes nS <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike currents pA <- continuous update: diff --git a/tests/resources/synapse_event_inv_priority_test.nestml b/tests/resources/synapse_event_inv_priority_test.nestml index b614fea11..6c09c1a6c 100644 --- a/tests/resources/synapse_event_inv_priority_test.nestml +++ b/tests/resources/synapse_event_inv_priority_test.nestml @@ -37,8 +37,8 @@ synapse synapse_event_inv_priority_test: d ms = 1. ms @nest::delay input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike onReceive(pre_spikes, priority=2): tr += 1. diff --git a/tests/resources/synapse_event_priority_test.nestml b/tests/resources/synapse_event_priority_test.nestml index b6ff2bf73..07684a491 100644 --- a/tests/resources/synapse_event_priority_test.nestml +++ b/tests/resources/synapse_event_priority_test.nestml @@ -37,8 +37,8 @@ synapse synapse_event_priority_test: d ms = 1. ms @nest::delay input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike onReceive(pre_spikes, priority=1): tr += 1. diff --git a/tests/valid/CoCoAssignmentToInlineExpression.nestml b/tests/valid/CoCoAssignmentToInlineExpression.nestml index f68b08be7..35d555afb 100644 --- a/tests/valid/CoCoAssignmentToInlineExpression.nestml +++ b/tests/valid/CoCoAssignmentToInlineExpression.nestml @@ -38,7 +38,7 @@ neuron CoCoAssignmentToInlineExpression: inline foo real = convolve(alpha_kernel, spikes_in) input: - spikes_in real <- spike + spikes_in <- spike update: foo = 42. diff --git a/tests/valid/CoCoContinuousInputPortQualifierSpecified.nestml b/tests/valid/CoCoContinuousInputPortQualifierSpecified.nestml deleted file mode 100644 index b2faca51c..000000000 --- a/tests/valid/CoCoContinuousInputPortQualifierSpecified.nestml +++ /dev/null @@ -1,34 +0,0 @@ -""" -CoCoContinuousInputPortQualifierSpecified.nestml -################################################ - - -Description -+++++++++++ - -This model is used to test if broken CoCos are identified correctly. Here, if continuous time input ports are not specified by qualifiers. - - -Copyright statement -+++++++++++++++++++ - -This file is part of NEST. - -Copyright (C) 2004 The NEST Initiative - -NEST is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -NEST is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with NEST. If not, see . -""" -neuron CoCoContinuousInputPortQualifierSpecified: - input: - currents pA <- continuous # no qualifier specified for current port, thus correct diff --git a/tests/valid/CoCoConvolveNotCorrectlyParametrized.nestml b/tests/valid/CoCoConvolveNotCorrectlyParametrized.nestml index d57b03a0a..f84358ee9 100644 --- a/tests/valid/CoCoConvolveNotCorrectlyParametrized.nestml +++ b/tests/valid/CoCoConvolveNotCorrectlyParametrized.nestml @@ -40,7 +40,7 @@ neuron CoCoConvolveNotCorrectlyParametrized: equations: kernel G' = -G / tau - inline testB pA = convolve(G, spikeExc) # convolve is now correctly parametrized + inline testB pA = convolve(G, spikeExc) * pA # convolve is now correctly parametrized input: - spikeExc pA <- excitatory spike + spikeExc <- excitatory spike diff --git a/tests/valid/CoCoConvolveNotCorrectlyProvided.nestml b/tests/valid/CoCoConvolveNotCorrectlyProvided.nestml index a792037ff..e7a8f8c99 100644 --- a/tests/valid/CoCoConvolveNotCorrectlyProvided.nestml +++ b/tests/valid/CoCoConvolveNotCorrectlyProvided.nestml @@ -37,7 +37,7 @@ neuron CoCoConvolveNotCorrectlyProvided: inline testB pA = convolve(test, spikeExc) * pA # convolve provided with a kernel and a spike input port, thus correct input: - spikeExc integer <- excitatory spike + spikeExc <- excitatory spike update: integrate_odes() diff --git a/tests/valid/CoCoInputPortWithRedundantTypes.nestml b/tests/valid/CoCoInputPortWithRedundantTypes.nestml index 2f8f01d8d..8f1cbbb1f 100644 --- a/tests/valid/CoCoInputPortWithRedundantTypes.nestml +++ b/tests/valid/CoCoInputPortWithRedundantTypes.nestml @@ -33,4 +33,4 @@ along with NEST. If not, see . """ neuron CoCoInputPortWithRedundantTypes: input: - spikeInh integer <- inhibitory spike # no redundant keywords used, thus correct + spikeInh <- inhibitory spike # no redundant keywords used, thus correct diff --git a/tests/valid/CoCoOutputPortDefinedIfEmitCall.nestml b/tests/valid/CoCoOutputPortDefinedIfEmitCall.nestml index ba8d5a597..53870b62b 100644 --- a/tests/valid/CoCoOutputPortDefinedIfEmitCall.nestml +++ b/tests/valid/CoCoOutputPortDefinedIfEmitCall.nestml @@ -59,8 +59,8 @@ neuron iaf_psc_exp: RefractoryCounts integer = steps(t_ref) # refractory time in steps input: - exc_spikes pA <- excitatory spike - inh_spikes pA <- inhibitory spike + exc_spikes <- excitatory spike + inh_spikes <- inhibitory spike I_stim pA <- continuous update: diff --git a/tests/valid/CoCoPrioritiesCorrectlySpecified.nestml b/tests/valid/CoCoPrioritiesCorrectlySpecified.nestml index 4ba6575b2..f3a8cc53f 100644 --- a/tests/valid/CoCoPrioritiesCorrectlySpecified.nestml +++ b/tests/valid/CoCoPrioritiesCorrectlySpecified.nestml @@ -31,8 +31,8 @@ along with NEST. If not, see . """ synapse CoCoPrioritiesCorrectlySpecified: input: - pre_spikes real <- spike - post_spikes real <- spike + pre_spikes <- spike + post_spikes <- spike onReceive(pre_spikes, priority=1): print("onReceive pre_spikes") diff --git a/tests/valid/CoCoResolutionLegallyUsed.nestml b/tests/valid/CoCoResolutionLegallyUsed.nestml index 86bc7a5b3..db0e30865 100644 --- a/tests/valid/CoCoResolutionLegallyUsed.nestml +++ b/tests/valid/CoCoResolutionLegallyUsed.nestml @@ -41,7 +41,7 @@ synapse CoCoResolutionLegallyUsed: q ms = resolution() input: - pre_spikes real <- spike + pre_spikes <- spike onReceive(pre_spikes): x ms = resolution() diff --git a/tests/valid/CoCoSpikeInputPortWithoutType.nestml b/tests/valid/CoCoSpikeInputPortWithoutType.nestml index b9daf2c50..d054b7422 100644 --- a/tests/valid/CoCoSpikeInputPortWithoutType.nestml +++ b/tests/valid/CoCoSpikeInputPortWithoutType.nestml @@ -33,4 +33,4 @@ along with NEST. If not, see . """ neuron CoCoSpikeInputPortWithoutType: input: # port is provided with a type, thus everything is correct - spikeAll integer <- spike + spikeAll <- spike diff --git a/tests/valid/CoCoValueAssignedToInputPort.nestml b/tests/valid/CoCoValueAssignedToInputPort.nestml index a285291e9..a4f3893ab 100644 --- a/tests/valid/CoCoValueAssignedToInputPort.nestml +++ b/tests/valid/CoCoValueAssignedToInputPort.nestml @@ -33,7 +33,7 @@ along with NEST. If not, see . """ neuron CoCoValueAssignedToInputPort: input: - spikeInh integer <- inhibitory spike + spikeInh <- inhibitory spike update: # input port not assigned to, thus everything is correct - test integer = spikeInh + 10 + test integer = spikeInh * s + 10 diff --git a/tests/valid/CoCoVectorInputPortSizeAndType.nestml b/tests/valid/CoCoVectorInputPortSizeAndType.nestml index 4626e471f..57eda8564 100644 --- a/tests/valid/CoCoVectorInputPortSizeAndType.nestml +++ b/tests/valid/CoCoVectorInputPortSizeAndType.nestml @@ -34,6 +34,6 @@ along with NEST. If not, see . """ neuron CoCoVectorInputPortSizeAndType: input: - foo[2] pA <- spike - bar1[3] pA <- excitatory spike - bar2[3] pA <- inhibitory spike + foo[2] <- spike + bar1[3] <- excitatory spike + bar2[3] <- inhibitory spike