|
| 1 | +Version 7.4.0 |
| 2 | +============= |
| 3 | + |
| 4 | +This release introduces a new **OCL utility package** under |
| 5 | +``besser.BUML.metamodel.ocl`` (chain, clone, predicates, substitute, walk) and a |
| 6 | +new **OCL normalization subsystem** under ``besser.BUML.notations.ocl.normalization`` |
| 7 | +that rewrites parsed constraints into a canonical CNF/iterator-fused form. It also |
| 8 | +ships modeling-perspective toggles in the Web Modeling Editor (filter the workspace |
| 9 | +to the diagram families a project actually uses) and a fix that clears the |
| 10 | +stereotype label when an Abstract or Enumeration class is toggled back to a plain |
| 11 | +class. ``bocl`` is bumped to ``1.0.1`` to pick up the matching parser-side fixes. |
| 12 | + |
| 13 | +New Features and Improvements |
| 14 | +----------------------------- |
| 15 | + |
| 16 | +**OCL Utility Package** (``besser.BUML.metamodel.ocl``) |
| 17 | + |
| 18 | +* Added ``walk`` — post-order traversal helper that skips structural ``InfixOperator`` markers and surfaces only AST nodes. |
| 19 | +* Added ``clone`` — typed AST cloner that preserves shared metamodel references (Property, InfixOperator) while deep-copying the expression tree, so rewrite rules can mutate without touching the source. |
| 20 | +* Added ``substitute`` — capture-avoiding substitution with an explicit ``ScopeStack`` (push/pop in try/finally), correct under nested iterators and shadowed iterator variables. |
| 21 | +* Added ``chain`` — extracts the property-call chain rooted at a navigation expression, surfacing the navigation path consumers need for downstream analysis. |
| 22 | +* Added ``predicates`` — composable predicate set (``is_op``, ``is_and``, ``is_implies``, ``is_xor``, ``is_isempty``, ``is_loop``, …) for matching nodes in rewrite rules and external analyzers. |
| 23 | + |
| 24 | +**OCL Normalization Subsystem** (``besser.BUML.notations.ocl.normalization``) |
| 25 | + |
| 26 | +* Added a fixed-iteration rewrite engine (``normalize.normalize``) that drives a deterministic, ordered rule pipeline to a fixpoint, with a developer-bug ``max_iterations`` guard against non-terminating rules. |
| 27 | +* Added six rule modules covering the normalization tactics: ``boolean`` (NNF / De Morgan / double-negation elimination), ``cnf`` (implies-elimination, if-bool-elim, distribute-or-over-and), ``collection`` (size/isEmpty / notEmpty rewrites), ``iterator`` (select/forall/exists fusion), ``multiplicity`` (multiplicity-aware optimizations), ``all_instances`` (allInstances rewrites). |
| 28 | +* Added ``pretty_printer`` for human-readable round-tripping of OCL ASTs back to source form. |
| 29 | +* Added ``api.parse_ocl`` as the single new public entry point that wraps the existing ANTLR parser and surfaces aggregated ``BOCLSyntaxError`` instead of raising on the first error. |
| 30 | +* Added ``wrapping_visitor`` so external callers can catch parse-shaped errors uniformly across the visitor stack. |
| 31 | +* Narrowed the ``IfBoolElim`` rewrite to only fire on if-expressions whose branches are boolean-typed, and surfaced unresolved-property errors as ``BOCLSyntaxError`` instead of bare ``Exception``. |
| 32 | + |
| 33 | +**Web Modeling Editor — Frontend** |
| 34 | + |
| 35 | +* Added **Modeling Perspectives**: settings panel toggles per diagram family (Class, Object, State Machine, Agent, GUI, Quantum, …) that filter the workspace sidebar, mobile navigation, and command palette in lockstep. Disabled perspectives are hidden everywhere they would otherwise create switch targets. |
| 36 | +* Fixed a class-diagram bug where toggling Abstract or Enumeration **off** left the stereotype label and italic styling on the element; the toggle now clears ``stereotype``, ``italic``, and ``underline`` on the underlying ``UMLClass`` instance. |
| 37 | +* Fixed assistant ``modify_model`` routing: the hook now dispatches model modifications through ``modelingService.injectToEditor`` (with an ``updateDiagramModelThunk`` fallback when the service ref is null) and rejects unknown action names instead of silently skipping them. |
| 38 | + |
| 39 | +Dependencies |
| 40 | +------------ |
| 41 | + |
| 42 | +* Bumped ``bocl`` to ``1.0.1`` in both ``requirements.txt`` and ``besser/utilities/web_modeling_editor/backend/requirements.txt`` to pick up the matching OCL parser-side fixes that this release's normalization layer depends on. |
| 43 | + |
| 44 | +Testing |
| 45 | +------- |
| 46 | + |
| 47 | +* Backend: new ``tests/BUML/metamodel/ocl/`` test package covers ``walk``, ``clone``, ``substitute``, ``chain``, and ``predicates`` with capture-avoidance and idempotence cases. |
| 48 | +* Backend: new ``tests/BUML/notations/ocl/`` test package covers the parser, normalization rules (T1–T8 from the design PRD), pretty-printer round-trip, and wrapping-visitor error reporting. |
| 49 | +* Frontend: ``ProjectSettingsPanel.test.tsx`` extended with perspective-toggle assertions covering enabled/disabled state across the seven perspective checkboxes. |
0 commit comments