BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
49 stars 15 forks source link

Suffix not set properly if NEURON block does not have a SUFFIX #1226

Closed JCGoran closed 1 month ago

JCGoran commented 4 months ago

According to the NMODL spec:

If the SUFFIX statement is absent, the file name is used as the suffix (with the addition of an underscore character).

The following file creates a mod_suffix which is an empty string:

NEURON {
}

STATE { x }

INITIAL {
  x = 42
}

BREAKPOINT {
    SOLVE dX METHOD cnexp
}

DERIVATIVE dX { x' = -x }

This can be verified by looking at the generated cpp file, which has the following functions:

void nrn_init_
void nrn_state_
static void nrn_jacob_