fix(typecheck,compile): allow deferred parameter [:] dims and speed u…#162
Merged
Conversation
…p clock/strict compile
checks
- allow unresolved [:] for parameter/constant dimensions until binding/instantiation, add
regression test
- optimize clock runtime precompute (reverse alias index + lower hot-path allocations)
- cache canonicalized paths in strict compile diagnostics to reduce repeated FS work
- add strict compile-check timing struct and expose timing in wasm/source-root compile APIs
- add profiling helper script for perf/flamegraph + folded AI-readable artifacts
- For WindPowerPlants.Components.GenericVariableSpeedGeneratorElectrical, compile-check wall
time dropped from ~1m42s to ~12.7s (about 8x faster).
Signed-off-by: yeus <Thomas.Meschede@web.de>
change test to omit timing-related values for equality testing...
Signed-off-by: yeus <Thomas.Meschede@web.de>
jgoppert
requested changes
May 11, 2026
| @@ -0,0 +1,198 @@ | |||
| #!/usr/bin/env bash | |||
Member
There was a problem hiding this comment.
I like this script, but it would be good if we could leverage the rum developer tool for things like this. So far I've managed to avoid bash/python scripts entirely, which helps with crossplatform support.
jgoppert
approved these changes
May 13, 2026
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.
Summary
unresolved until later binding/instantiation (MLS-aligned), instead of failing early in
typecheck.
matching.
diagnostics.
artifacts.
WindPowerPlants.Components.GenericVariableSpeedGeneratorElectrical: compile-check wall
time reduced from ~1m42s to ~12.7s (~8x faster).
Code Size Budget (required)
If net_added_lines is positive, add:
surfaces in compile APIs and (2) a reusable profiling script (scripts/
profile_rumoca_model.sh). The performance fixes in clock precompute also require new
indexing/data-structure code to avoid repeated scans.
precompute.
code.
diagnostics.
into shared helpers and tighten script option parsing utilities (planned as a cleanup
commit after merge).
Design Notes
into error payload formatting.
lookup in hot inference loops.
strict failure collection.
compile session strict-check path, and wasm/source-root API serialization. A single-
module tweak would not address end-to-end compile latency and observability.
replaced by indexed lookup.
cached resolution.
Testing
WindPowerPlants.Components.GenericVariableSpeedGeneratorElectrical ... (before/after
timing comparison)
modelica-libraries/WindPowerPlants.zip --targets-prefix WindPowerPlants --target-
class-types model,block --json
regression test in crates/rumoca-phase-typecheck/src/tests.rs
(test_parameter_colon_dimension_without_binding_is_allowed).
model compile checks.
(__compile_phase_timing, __compile_check_timing) before comparing compile vs compile_to_json,
while keeping strict equality for the full semantic payload.
Reviewer Checklist