Skip to content

Break modifiers (Modelica 3.6 selective model extension) (1.5.0) - #98

Merged
JKRT merged 3 commits into
masterfrom
break-modifiers
Oct 10, 2026
Merged

JKRT merged 3 commits into
masterfrom
break-modifiers

Conversation

@JKRT

@JKRT JKRT commented Oct 10, 2026

Copy link
Copy Markdown
Member

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 = break leaves 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

JKRT added 3 commits October 10, 2026 11:15
- 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
@JKRT
JKRT merged commit 0c0881d into master Oct 10, 2026
14 of 19 checks passed
@JKRT
JKRT deleted the break-modifiers branch October 23, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant