Repository navigation
OCT rejects Frames.smallRotation (if-expression with branches of different sizes) - #3
Open
hubertus65 wants to merge 1 commit into
Open
hubertus65 wants to merge 1 commit into
hubertus65 wants to merge 1 commit into
Conversation
OCT rejects Frames.smallRotation (if-expression with branches of different sizes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UmNZkRw6HV9CeBvNk36AzT
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.
Adds
ImpactFailures.IfExpressionDifferentSizesInFunction, a minimal model with MSL 4.1.0 that fails in Modelon Impact (impact.modelon.cloud, checked 2026-10-31).Failure: OCT rejects both functions:
Trigger:
phi := if withResidues then {...6 elements...} else {...3 elements...},where
withResiduesis a function input, not a parameter expression. This follows thespecification rule that branches of different sizes need a parameter condition, so the MSL code is the
problem here rather than OCT. OpenModelica 1.27.1 accepts it.
Workaround in the MSL: modelica#4848 assigns
phiin anif-statement. Its size is already fixed by the declaration
phi[if withResidues then 6 else 3].OpenModelica results are bit-identical, and OCT compiles and simulates the changed functions.
Upstream MSL pull request: modelica#4848
🤖 Generated with Claude Code
https://claude.ai/code/session_01UmNZkRw6HV9CeBvNk36AzT