eclipse-modisco / org.eclipse.modisco

Eclipse Public License 2.0
0 stars 0 forks source link

Debug KDMtoUML for non-trivial models #1057

Open eclipse-modisco-bot opened 3 days ago

eclipse-modisco-bot commented 3 days ago

| --- | --- | | Bugzilla Link | 559506 | | Status | NEW | | Importance | P3 normal | | Reported | Jan 24, 2020 07:00 EDT | | Modified | Feb 05, 2020 05:10 EDT | | See also | 559115, 559507, Gerrit change https://git.eclipse.org/r/156895, 559016, Gerrit change https://git.eclipse.org/r/157158, Gerrit change https://git.eclipse.org/r/157157, Gerrit change https://git.eclipse.org/r/157164, Gerrit change https://git.eclipse.org/r/157185, Git commit 26b58bd5, Git commit 28a33ff7, Git commit 5ef0c1c0, Git commit afd47db6, Git commit 9d9c8576 | | Reporter | Ed Willink |

Description

Bug 559016#c21 reports a

org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature uml!Model.packagedElement to value

whose diagnosus was confused by the lack of UML2 currency in the MoDisco project (Bug 559115).

Debugging the actual failure. An ArrayStoreException occurs in the assignment of a Sequence of 15423 elements to Model.packagedElement. The failure occurs at the 629th assignment. Earlier assignments are of {Package,Interface,Class}Impl. The failure is for a PropertyImpl. Looks like a straightforward bug in

bundleresource://656.fwk2131772703/org/eclipse/modisco/kdm/uml2converter/internal/resources/transformations/KDMtoUML.asm

Don't assign non-PackageableElement to package.packagedElement.

Trying to figure out if UML has changed. I give up. UML 2.5 is PDF browsable. 2.2-Infra/Super are impenetrable. The UML2 migration guides are not that helpfule but the 2.2-to2.4 notes that Property ceases to be a TemplateableElement derivation. LOading the UML2 2.2.0 UML.ecore siggests that Property inheritance is not significantly chnaged.

Examining KDM2UML.atl we have:

rule ExtensionFamilyToProfile {\ from src :kdm!ExtensionFamily\ to tgt :uml!Profile (\ name <- src.name\ ,packagedElement <- src.annotation\ ,packagedElement <- src.attribute\ ,packagedElement <- src.stereotype )\ }

which seems to have no ability to restrict packagedElement assignments to genuine PacakeableElements.

Clearly the TX is just plain broken. Never ever worked. Never tested on a realistic model with adequate coverage.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 24, 2020 07:20

As well as KDM2UML being broken its KDM is vintage; Bug 559507.

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Jan 30, 2020 12:18

Commenting out packedElement assignments the failure changes from a unsupported assignment to an empty stack, probably due to isCollection/isMap not being supported on a Void / empty collection.

Specifically

rule CodeModelToModel extends KDMModelToModel {\ from src :kdm!CodeModel\ to tgt :uml!Model (\ packagedElement <- src.codeElement --12 )\ }

seems to be able to assign a Property.

The complexity of this defeats mindless tweaking, a re-design of the output containment tree is need to accommodate the UML 2.5 change.

Probably needs to be done in conjunction with a KDM update. Bug 559507.


Until someone steps forward for the redesign, may be we just eliminate the

Discovery->Discovers->Discover UML from KDM Model...

menu entry that clearly does not work.

eclipse-modisco-bot commented 3 days ago

Jan 30, 2020 12:47

New Gerrit change created: https://git.eclipse.org/r/156895

eclipse-modisco-bot commented 3 days ago

Feb 04, 2020 11:19

New Gerrit change created: https://git.eclipse.org/r/157158

eclipse-modisco-bot commented 3 days ago

Feb 04, 2020 11:19

New Gerrit change created: https://git.eclipse.org/r/157157

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Feb 04, 2020 11:23

Fabien Giquel commented on the Gerrit:

ok for this uml2converter.ui/plugin.xml.\ But in order to complete disactivation : the extensions from org.eclipse.modisco.usecase.simpletransformationschain.ui/plugin.xml should be commented too : it proposes menus for shorcut transfo "java(->kdm)->uml" in using the KTMtoUML.atl step.


Trimming the extensions from org.eclipse.modisco.kdm.uml2converter.ui probably reduced the UI plugin to zero functionality, and casts doubt on the non-UI functionality it facilitated.

The org.eclipse.modisco.usecase.simpletransformationschain.ui extensions all seem to exploit the {Java/Project>->KDM->UML capability. So yes, they need to be hidden too. But that makes org.eclipse.modisco.usecase.simpletransformationschain.ui zero functionality and again casts doubt on the non-UI functionality.

All org.eclipse.modisco.kdm.uml2converter, org.eclipse.modisco.usecase.simpletransformationschain functionaity marked as deprecated (pending a KDMtoUML fix / amputation).

eclipse-modisco-bot commented 3 days ago

Feb 04, 2020 12:40

New Gerrit change created: https://git.eclipse.org/r/157164

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 03:36

New Gerrit change created: https://git.eclipse.org/r/157185

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 04:59

Gerrit change https://git.eclipse.org/r/156895 was merged to [master].\ Commit: http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/commit/?id=26b58bd549df6ff165f67fcaab89431add8dc8c1

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 04:59

Gerrit change https://git.eclipse.org/r/157158 was merged to [master].\ Commit: http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/commit/?id=28a33ff7a0a9ef5c9a9eb8843b5fa2605ec01538

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 04:59

Gerrit change https://git.eclipse.org/r/157164 was merged to [master].\ Commit: http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/commit/?id=5ef0c1c0da09ae0f9978f61809895ff436b2af4a

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 04:59

Gerrit change https://git.eclipse.org/r/157157 was merged to [master].\ Commit: http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/commit/?id=afd47db61ba853a034dc7c41959172a4aebb1567

eclipse-modisco-bot commented 3 days ago

Feb 05, 2020 04:59

Gerrit change https://git.eclipse.org/r/157185 was merged to [master].\ Commit: http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/commit/?id=9d9c85765010c4d7db78d6021759ba660e0cd494

eclipse-modisco-bot commented 3 days ago

By Ed Willink on Feb 05, 2020 05:10

Deprecation/suppression of three plugin.xml's of transitive KDMtoUML invocations pushed to master for 1.5.1M2 today.

(In reply to Ed Willink from comment #2)

The complexity of this defeats mindless tweaking, a re-design of the output containment tree is need to accommodate the UML 2.5 change.

This bug remains open awaiting help/enthusiasm for the KDMtoUML.atl re-design.