Repository navigation
Generator, parser and analyser: lookups instead of whole-model scans - #1496
Open
FinbarArgus wants to merge 5 commits into
Open
FinbarArgus wants to merge 5 commits into
FinbarArgus wants to merge 5 commits into
Conversation
- AnalyserModel::analyserVariable(): a map from equivalence group to analyser variable, built at the end of analysis. - Generator: each variable's index among the tracked variables of its list, computed once per list and generation. - Parser: connections find their components in a map of the model's components by name. - Analyser: the equations computing each variable, gathered in one pass over the equations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ew9LjxY3znMKSNg8AK2kSn
hsorby
requested changes
Oct 12, 2026
hsorby
left a comment
Contributor
There was a problem hiding this comment.
Looks pretty good, just a small tidy up of the documentation for the buildAnalyserVariableByGroup method.
…el_p.h Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ew9LjxY3znMKSNg8AK2kSn
Contributor
I am not, so I am going to edit the PR so that it looks a bit more like the rest of the analyser/generator code. |
agarny
approved these changes
Oct 13, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #1495.
Replaces four whole-model scans with lookups. Generated code and printed models are unchanged.
AnalyserModel::analyserVariable(): a map from equivalence group to analyser variable, built at the end of analysis.Generator: each variable's index among the tracked variables of its list, computed once per list and generation.Parser::loadConnection(): components found in a map of the model's components by name.Seconds (Release, GCC 11), for a whole-cell model (25 states, 567 variables) replicated N times:
mainmainAnalysis time is mostly validation, which #1477 addresses; with #1477 and #1479, this PR takes analysis at N = 16 from 1.31 s to 0.79 s.
Verification: all 75 test targets pass (GCC,
TWAE=ON); LLVM coverage is 100% (regions, functions, lines, branches);clang-format18 reports no changes; the generated C and printed models at N = 1 and 8 are byte-identical tomain.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ew9LjxY3znMKSNg8AK2kSn