Repository navigation
Break modifiers (Modelica 3.6 selective model extension) (1.5.0) - #98
Merged
Merged
Conversation
- Absyn to SCode: `break x` to BREAK_COMPONENT, `break connect(a, b)` to BREAK_CONNECT. - ClassTree.breakComponents: a broken component becomes an empty node (model, block or connector only; not a builtin type's attributes); duplicates and checks skip empty nodes. - Connect breaks for the base class and its own base classes; unmatched ones are errors. Connects of broken components are dropped. - `x = break` makes the binding unbound; break submodifiers are not modifiers. - Instantiation, typing and flattening skip broken components; modifiers on them are errors. - Needs Absyn and SCode with the break variants, and an OMParser with the break grammar. Assisted-by: Claude Opus 5.5
test/OmcTestsuite holds files of OpenModelica's flattening testsuite unchanged; incorrect tests must be rejected. Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
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.
Selective model extension as in omc:
extends A(break x)removes component x (model, block or connector) and the connects that use it,extends A(break connect(a, b))removes that connect,x = breakleaves x unbound. Unmatched breaks, breaks of non-breakable elements and modifiers on broken components are errors (417-419).Tests: omc's 30 break tests from its flattening testsuite (test/OmcTestsuite, compared with omc's flat models; incorrect ones must be rejected): 30/30 locally.
Version 1.5.0; needs Absyn 1.4 (OpenModelica/Absyn.jl#5), SCode 1.3 (OpenModelica/SCode.jl#4) and OMParser 0.2.2 (OpenModelica/OMParser.jl#32). CI passes once those are merged and OMParser's library is released.
🤖 Generated with Claude Code