Skip to content

Simplifying ( / partial implementation removal) of INDEPENDENT block in NMODL #1998

Description

@pramodk

This is based on a discussion with @nrnhines in #1957. By looking at the usage and implementation of the INDEPENDENT block, we concluded the following:

  • In INDEPENDENT block, usage of variable t only makes sense
  • Most of the MOD files use the variable t. There are few that use v but that's not required.
  • Looking at the implementation, declaring a variable as an independent only mark (treat) that variable as ASSIGNED.
    • but variables like t and v is used and they are already available as RAMGE/ASSIGNED, use of the INDEPENDENT block is doing nothing today.
  • Not the rest of the production FROM x TO y WITH z (unit) has no effect.

So we decided to do the following:

  • We will keep the production in the bison parser
  • We should just check if the independent variable is t. If this is not the case, we should throw a warning like: Warning: Only variable t should be used in the INDEPENDENT block but XX is used
  • Apart from the above check and issuing the warning, we should remove all other code related to the INDEPENDENT construct.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions