BlueBrain / nmodl

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

Fix recursive FUNCTION calls #1278

Closed JCGoran closed 1 month ago

JCGoran commented 1 month ago

The following mod file does not compile under both NEURON and coreNEURON codegen:

NEURON {
    SUFFIX recursion
}
FUNCTION f(n) {
    f = f(n)
}

Some more examples are added in recursion.mod, which should cover all of the cases of interest (note that only some of them are tested for correctness since the convoluted ones don't have a terminating condition, but they should all at least compile).

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.25%. Comparing base (0edbed9) to head (c54a85c). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1278 +/- ## ========================================== - Coverage 86.29% 86.25% -0.05% ========================================== Files 178 178 Lines 13267 13277 +10 ========================================== + Hits 11449 11452 +3 - Misses 1818 1825 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bbpbuildbot commented 1 month ago

Logfiles from GitLab pipeline #212750 (:white_check_mark:) have been uploaded here!

Status and direct links:

1uc commented 1 month ago

Nice, what's the purpose of testing both fib and factorial? How do they differ and enhance eachother?

bbpbuildbot commented 1 month ago

Logfiles from GitLab pipeline #212878 (:white_check_mark:) have been uploaded here!

Status and direct links: