Skip to content
Draft
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
7e694be
chore: dependency update
ichxorya May 6, 2026
5730154
fix: move use-gui archunit output to `target`
ichxorya May 6, 2026
a95fb3e
chore: show existing problems before fix
ichxorya May 6, 2026
dc8a360
docs: add note on this PR
ichxorya May 6, 2026
d08243a
docs: (unchecked) cyclic visualization
May 6, 2026
8d3b7ea
refactor(api): break circular dependency between api and api.impl
ichxorya May 7, 2026
8df70f3
docs: update notes
ichxorya May 7, 2026
7eed12f
refactor(test): replace import to free the `exports org.tzi.use.api.i…
ichxorya May 15, 2026
1c64371
chore: clean up this mis-pasted text
ichxorya May 15, 2026
2d6f12e
fix: resolve cyclic bug 8
ichxorya May 15, 2026
f0e4b4f
docs: note that we need to address the breaking api changes, leading …
ichxorya May 15, 2026
4b22c80
fix: mini fix per copilot's comment
ichxorya May 15, 2026
4fe9153
fix: bug 5 resolved
ichxorya May 15, 2026
96ce6f3
fix: bug 6 resolved
ichxorya May 15, 2026
18303df
docs: plan for bug 7
ichxorya May 15, 2026
a7044e5
fix: bug 7 resolved
ichxorya May 16, 2026
044e1d0
fix: bug 2 resolved
ichxorya May 16, 2026
81f8a99
fix: address copilot review on generate_cycle_mermaid.py
ichxorya May 16, 2026
9435ae3
refactor: bug 3 Phase A — split runtime root into spi/ and bootstrap/
ichxorya May 16, 2026
b968dac
docs: bug 3 Phase A — before/after/Δ diagrams in PR notes
ichxorya May 16, 2026
c0f9624
refactor: bug 3 Phase B — SPI consolidation + descriptors next to fac…
ichxorya May 16, 2026
94ed78c
fix: bug 3 resolved — Phase C closes runtime cycles (5 → 0)
ichxorya May 16, 2026
e663e3f
fix: bug 1 Phase A — break mm → sys edges (uml triangle 5 → 3 cycles)
May 16, 2026
0aef0f0
fix: bug 9 + graph→util cleanup — core cycle 34 → 29
May 16, 2026
cfbb943
fix: bug 12 — move ModelBrowserSorting to gui.util/utilFX (GUI cycles…
May 16, 2026
8304e00
fix: bug 13 — kill viewsFX → mainFX edge (GUI 10 → 9 cycles)
May 16, 2026
48c0c82
fix: bug 14 — kill util → views (GUI 9 → 5 cycles)
May 16, 2026
e0192d3
docs: update PR notes — record Bugs 9, 10, 12, 13, 14; refresh metrics
May 16, 2026
16381e4
fix: bug 19 — kill uml → gen back-edge (core 29→20, entire 246→213)
May 17, 2026
b199fe7
fix: bug 20 — kill gen → parser back-edge (core 20→19, entire 213→203)
May 17, 2026
2136523
fix: bug 16 — move CompilationFailedException to parser; loosen Symbo…
May 17, 2026
3e320f1
refactor: move util.uml.sorting → uml.mm.sorting (no cycle change yet)
May 17, 2026
139cfe9
fix: bug 11 — move shared coverage visitors to uml.analysis.coverage …
May 17, 2026
9baafc4
fix: bug 23 — kill util → uml back-edge (core 8→2, entire 146→118)
May 17, 2026
f6f6a4d
refactor: move SrcPos + SemanticException to util (no cycle change yet)
May 17, 2026
6cee57f
fix: eliminate remaining uml → parser back-edge (entire-project 118 →…
May 17, 2026
712f1f6
fix: move ShellReadline + TestModelUtil — entire-project 94 → 3
May 17, 2026
7ba0b5d
docs: update PR notes — entire-project 275 → 3 (99% reduction)
May 17, 2026
1d0c69c
fix: bugs 26+27 — plugin SPI refactor, entire-project 3 → 0 ✅
May 17, 2026
8bfb54d
fix: extract IPluginActionProxy + relocate diagram plugin classes (gu…
May 17, 2026
a2d308f
fix: break views↔graphlayout + views↔mainFX cycles (gui 5 → 1)
May 17, 2026
26793fb
docs: update PR notes — entire-project 275 → 0 (100% ✅), gui 14 → 1
May 17, 2026
9122978
refactor: move ViewFrame to gui.views (incremental, main↔views cycle …
May 17, 2026
5be59e6
fix: break gui_main and shell sub-slice cycles
May 17, 2026
1a2339a
refactor: move ModelBrowser handlers + EvalOCLDialog (gui cycle uncha…
May 17, 2026
f01432a
refactor: move View interface from gui.views to gui.main
May 17, 2026
2f51a17
refactor: ViewManager invokes ViewFrame.close() reflectively
May 17, 2026
f5fa293
docs: PR notes — record sub-slice + layered-arch zero-cycle achievements
May 17, 2026
04d1e12
docs: document factory-pattern path for remaining gui:main↔views cycle
May 17, 2026
7e85b92
docs: final ArchUnit metrics — 11/13 tests pass with zero cycles
May 17, 2026
de27efc
fix: bug 17 + bug 1 — collapse gui.main↔views and uml mm/ocl/sys cycl…
May 17, 2026
a0f0c05
docs: refresh Current Metrics table — all 14 cycle tests at zero
May 17, 2026
52057e6
docs: finalization
May 17, 2026
42ab578
refactor: revert slicer-collapse rename + collapse ocl→mm subpackages
May 17, 2026
5721338
refactor: extract IModelState + relocate MLinkSet/MSystemException to…
May 17, 2026
1a40345
/8
May 17, 2026
aded938
refactor: relocate operation-invoking expressions to sys.expr and MLi…
May 17, 2026
a77e602
docs: refresh PR notes — Bug 1 Phase B+C now genuinely resolved
May 17, 2026
fb49605
docs: honest verification of ArchUnit state — what runs, what doesn't…
May 17, 2026
ed16b20
test: relocate expression/system tests to sys to clear uml-with-tests…
May 17, 2026
3e0e243
test: relocate all cross-slice tests to org.tzi.use.integration.*
May 17, 2026
5c10b6b
fix: cast MObject.state(IModelState) results in use-gui
May 17, 2026
d5af9fc
docs: PR notes reflect genuine zero across every ArchUnit test
May 17, 2026
94a857f
chore: move orphan package.html + correct doc's soil/RubyHelper paths
May 17, 2026
3056e38
docs: add diff analysis vs main with mermaid diagrams
May 17, 2026
54f16fb
fix: remove most of the warnings related to this PR
May 17, 2026
52ed155
docs: remove temp files that aren't needed anymore
May 17, 2026
96d283e
fix: GUI booting problems due to obsolete plugins
May 17, 2026
2ef8584
test(arch): run all 6 ArchUnit tests under surefire 3.5.2 + vintage, …
claude May 31, 2026
0d6ea24
docs: add temporary reviewer-facing verification status (decycle-2)
claude May 31, 2026
0c83e9b
docs: add independent code review of the decycle-2 PR
claude May 31, 2026
d0c684e
fix: guard MObjectState downcasts of getSelf().state() with a descrip…
ichxorya Jun 3, 2026
93d26bb
docs: add MIGRATING.md and correct two package-fact errors in the PR …
ichxorya Jun 3, 2026
d17335a
refactor(gui): relocate edges.GUI demo to break the edges<->util pack…
ichxorya Jun 3, 2026
5db1e15
test(arch): measure the gui.views.diagrams cycle blind-spot (non-gating)
ichxorya Jun 3, 2026
a2d5095
refactor(gui): extract diagrams.framework foundation slice
ichxorya Jun 3, 2026
8fe4ee5
refactor(gui): merge waypoints into elements.waypoints
ichxorya Jun 3, 2026
1c447ba
refactor(gui): peel elements off the diagram via framework interfaces
ichxorya Jun 3, 2026
4c375bd
refactor(gui): route diagram views through framework.IMainWindowServices
ichxorya Jun 3, 2026
d198b1f
refactor(gui): invert AllLayoutTypes/StyleInfoBase node coupling via …
ichxorya Jun 3, 2026
334b536
refactor(gui): relocate DiagramView framework to a base slice
ichxorya Jun 3, 2026
a373b64
refactor(gui): untangle event<->types (relocate Hide actions, invert …
ichxorya Jun 3, 2026
b22c24b
refactor(gui): break type/selection -> root via a framework main-wind…
ichxorya Jun 3, 2026
920418f
refactor(gui): move IFXWindowHost to framework + StyleInfo* into clas…
ichxorya Jun 3, 2026
d45022f
refactor(gui): dissolve the selection slice + gate gui.views.diagrams…
ichxorya Jun 3, 2026
8a1d193
build(assembly): bundle the 5 plugins rebuilt against the decycled 7.…
ichxorya Jun 3, 2026
23bfeab
docs(MIGRATING): document the gui.views.diagrams decycling relocations
ichxorya Jun 3, 2026
037f02f
chore: decycle-2 minor changes; autonomous refactor to fit the plugin…
ichxorya Jun 5, 2026
417bb34
Merge branch 'useocl:main' into main
ichxorya Jun 5, 2026
27d0ddb
Merge branch 'main' into decycle-2
ichxorya Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
357 changes: 357 additions & 0 deletions README_nghiabt_notes_on_this_pr/bug-2_plan.md

Large diffs are not rendered by default.

424 changes: 424 additions & 0 deletions README_nghiabt_notes_on_this_pr/bug-3_plan.md

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions README_nghiabt_notes_on_this_pr/bug-6_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Bug 6 plan — `parser.ocl ↔ parser.use / parser.soil` cycles

Status: **Planned**, not yet implemented.
Location: `org.tzi.use.parser.{ocl, use, soil.ast}` (use-core).

## What the ArchUnit report actually shows

Two cycles are reported by the `org.tzi.use.parser` slice rule:

1. `ocl → use → ocl`
2. `ocl → use → soil → ocl`

**Both cycles share the same single `ocl → use` edge** — it is the only
import from `parser.ocl` into `parser.use` in the codebase:

```
parser.ocl.ASTEnumTypeDefinition extends parser.use.ASTClassifier
```

The other directions (`use → ocl`, `use → soil`, `soil → ocl`) have many
edges and are the natural data flow of the parser AST (USE/SOIL AST
nodes reference OCL types and expressions). Trying to remove edges in
those directions would mean moving most of the parser around.

**Therefore: remove the single `ocl → use` edge and both cycles go to
zero in one move.**

## Fix: move `ASTEnumTypeDefinition` from `parser.ocl` to `parser.use`

Rationale:
- Enum type definitions are declared at the model level (in `.use`
files via `enum { ... }`), which is the USE-language grammar — not
the OCL expression grammar. The class is currently in `parser.ocl`
for historical reasons only.
- The class already extends `parser.use.ASTClassifier`, so moving it
*removes* a cross-package import rather than adding one.
- Blast radius is tiny:
- 1 file moves (`ASTEnumTypeDefinition.java`).
- 1 external Java import (`parser.use.ASTModel`) — same target
package after the move, so the import line is *deleted*, not
rewritten.
- Generated `USEParser.java` references it via
`import org.tzi.use.parser.ocl.*;` in the grammar `@header`. That
import will still resolve to other ocl AST classes; the
`ASTEnumTypeDefinition` reference will resolve via same-package
lookup once the file is in `parser.use`. **No grammar change
needed.**
- No `module-info` change needed: both `parser.ocl` and
`parser.use` are already exported.

### Concrete code-fix steps

1. `git mv use-core/src/main/java/org/tzi/use/parser/ocl/ASTEnumTypeDefinition.java use-core/src/main/java/org/tzi/use/parser/use/ASTEnumTypeDefinition.java`
2. In the moved file:
- Change `package org.tzi.use.parser.ocl;` → `package org.tzi.use.parser.use;`
- Drop `import org.tzi.use.parser.use.ASTClassifier;` (intra-package now).
3. In `parser/use/ASTModel.java`: drop the now-unused
`import org.tzi.use.parser.ocl.ASTEnumTypeDefinition;`.
4. Sanity-grep for any straggler FQN references:
`grep -rn 'parser\.ocl\.ASTEnumTypeDefinition' use-core/src use-gui/src`
— expect zero matches outside the moved file.

### Expected ArchUnit outcome

After the move:
- `parser.ocl → parser.use` edges: **0** (down from 1).
- `parser` slice cycle count: **2 → 0**.
- All `use → ocl` and `soil → ocl` edges remain and are now part of a
clean DAG: `use → {ocl, soil}`, `soil → ocl`.

## ⚙ Workflow for this PR — re-record after the fix

This is the workflow this PR has been using for every cycle bug
(matches what was done for Bugs 4, 5, 8). **Do not skip the archunit
snapshot regeneration steps — the in-repo `target_archunit_temp/`
directories are the PR's checked-in evidence of cycle state and the
reviewer reads them as part of the diff.**

1. **Capture the "before" state** (only if not already captured):
```bash
cp use-core/target_archunit_temp/archunit-reports/failure_report_maven_cycles_parser.txt \
docs/archunit-history/before-fix/bug-6_failure_report_maven_cycles_parser.txt
```
This matches the existing
`docs/archunit-history/before-fix/bug-4_…` and `bug-8_…` files.

2. **Apply the code fix** (the `git mv` + import edits above).

3. **Wipe stale build output and rebuild** so ArchUnit reports
regenerate from the moved class:
```bash
mvn -pl use-core,use-gui -am clean package -DskipTests=false
```
(Or `mvn clean package` from the repo root if working on all
modules. ArchUnit slice tests run during the `test` phase, so a
`package` covers it.)

4. **Refresh the checked-in archunit snapshots** by copying the freshly
generated outputs over:
```bash
cp -r use-core/target/archunit-reports/. use-core/target_archunit_temp/archunit-reports/
cp -r use-core/target/archunit-results/. use-core/target_archunit_temp/archunit-results/ 2>/dev/null || true
cp -r use-gui/target/archunit-reports/. use-gui/target_archunit_temp/archunit-reports/
cp -r use-gui/target/archunit-results/. use-gui/target_archunit_temp/archunit-results/
```
Notes:
- The `failure_report_maven_cycles_parser.txt` should now be
**absent** under `target/archunit-reports/` (the test deletes
stale reports when cycle count is 0, per the post-Copilot fix).
If the file still exists in `target_archunit_temp/` after the
copy, delete it explicitly:
`git rm use-core/target_archunit_temp/archunit-reports/failure_report_maven_cycles_parser.txt`.
- The `entire_project` failure report in
`use-gui/target_archunit_temp/archunit-reports/` will change
because the top-level slice cycle inventory shifts when
intermediate edges move. Expect a large diff there; that's normal
(see Bug 5 commit `4fe9153a` for the same pattern).

5. **Update PR notes**: edit
`README_nghiabt_notes_on_this_pr/nghiabt_notes_on_this_pr.md` Bug 6
section to:
- Change heading to `## Bug 6: … — ✅ RESOLVED`.
- Update severity line to
`~~Low — 2 cycles~~ → **0 cycles**`.
- Replace "Fix direction" bullet with the actual fix description.
- Add Before/After mermaid blocks (same pattern as Bug 4/5).
- Add a **⚠ Breaking API change — migration note** for the
`parser.ocl.ASTEnumTypeDefinition` → `parser.use.ASTEnumTypeDefinition`
class move (external callers that use the FQN will need an
import update; suggested release-note tag: `[breaking] parser`).

6. **Commit** with the conventional message format used by previous
bug fixes in this PR:
```
fix: bug 6 resolved
```
Stage: code changes, module-info (if any), notes file, archived
before-fix report, refreshed `target_archunit_temp/` files.

7. **Verify the cycle count once more** before pushing, using the
ad-hoc probe (because the use-core JUnit-5 surefire plugin isn't
wired up — see Bug 5 notes):
```bash
# From repo root, after the build in step 3:
javac -cp "$(cat /tmp/cp.txt):use-core/target/classes" -d /tmp /tmp/CycleProbe.java
java -cp "/tmp:$(cat /tmp/cp.txt):use-core/target/classes" CycleProbe use-core/target/classes
# Expect: "Cycles in org.tzi.use.parser: 0"
```
(The probe class definition is in the Bug 5 session log; same
shape as `CycleProbe.java` used for `org.tzi.use.gen`, just change
the package constant to `org.tzi.use.parser`.)

## Risks / things to double-check

- `USEParser.java` is a generated file under `use-core/target/generated-sources/`.
After `mvn clean`, it is regenerated from `USE.g` during the
`generate-sources` phase. Confirm the regenerated file compiles
cleanly with `ASTEnumTypeDefinition` resolved from `parser.use`
rather than `parser.ocl`. If for some reason ANTLR resolves the
`parser.ocl.*` wildcard import preferentially, the fix is to add
`import org.tzi.use.parser.use.ASTEnumTypeDefinition;` to the
`@header` block of `USE.g` — but I do not expect this to be needed
because the generated parser class itself sits in `parser.use`, and
same-package lookup wins over wildcard imports in Java.
- The `parser` slice cycle test is in `MavenCyclicDependenciesCoreTest`
(JUnit 5). The convenience workflow above runs the test via `mvn
package`; the GUI test (JUnit 4) does not have a `parser` slice, so
watch for the report from the use-core build, not the use-gui one.
Loading
Loading