Issue #22

Reverse engineering problems

Added by Marijan Matic over 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:05 December 2011
Priority:MediumDue date:
Assignee:Fran├žois Jaouen% Done:

100%

Category:-
Target version:2.0.13

Description

JavaDesigner v.2.0.12

When trying to reverse the part of JDK (1.6.0_29), Modelio breakes and finish with reverse cancelation. Here is the plugin log when trying to reverse file java\lang\Double.java

race: Closing the session 0
trace: Finalizing the session 0
Modelio/ModelerModule 7.0.08 - Copyright 2008-2011 Modeliosoft
Initialization of the "ModelingWizard" mdac
Modelio/ModelingWizard 4.0.03 - Copyright 2008-2011 Modeliosoft
Modelio/JavaDesigner 2.0.12 - Copyright 2008-2011 Modeliosoft
Parsing start at 5 Dec 2011 10:32:43 GMT
Double.java:62:49: unexpected token: ffffffffffffP
Double.java:72:25: unexpected token: double
Double.java:81:25: unexpected token: double
Double.java:90:25: unexpected token: int
Double.java:99:25: unexpected token: int
Double.java:106:25: unexpected token: int
Double.java:114:25: unexpected token: Class
Double.java:178:19: unexpected token: String
Double.java:179:59: expecting EOF, found ';'
    at antlr.Parser.match(Parser.java:211)
    at com.modeliosoft.modelio.javadesigner.reverse.antlr.struct.JavaStructRecognizer.compilationUnit(JavaStructRecognizer.java:535)
    at com.modeliosoft.modelio.javadesigner.reverse.structuralModel.StructuralModel.addFile(StructuralModel.java:180)
    at com.modeliosoft.modelio.javadesigner.reverse.structuralModel.StructuralModel.createStructuralModel(StructuralModel.java:1245)
    at com.modeliosoft.modelio.javadesigner.reverse.RTReverseProgressBar.reverseSourcesfiles(RTReverseProgressBar.java:145)
    at com.modeliosoft.modelio.javadesigner.reverse.RTReverseProgressBar.launchReverseFromDirectory(RTReverseProgressBar.java:103)
    at com.modeliosoft.modelio.javadesigner.reverse.RTReverseProgressBar.run(RTReverseProgressBar.java:50)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Reversing C:\DOCUME~1\hr1uz077\LOCALS~1\Temp\java5439836155478355553.xml into 'ReverseTest' {200e3bb0-1745-11e1-9acf-0030057d90ee} Package
Start of reverse core at 5 Dec 2011 10:37:43 GMT
Unmarshal at 5 Dec 2011 10:37:43 GMT
Reverse elements at 5 Dec 2011 10:37:45 GMT
Set links at 5 Dec 2011 10:37:45 GMT
Cleaner at 5 Dec 2011 10:37:45 GMT
Post treatment at 5 Dec 2011 10:37:45 GMT
End of reverse core at 5 Dec 2011 10:37:45 GMT
java.lang.InterruptedException
    at com.modeliosoft.modelio.javadesigner.reverse.RTReverseProgressBar.run(RTReverseProgressBar.java:73)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

It seems that parsing

public static final double MAX_VALUE = 0x1.fffffffffffffP+1023; // 1.7976931348623157e+308

makes unrecoverable problem when resolving the hexadecimal exponent character ‘P’. Of course JDK 7 is not supported so trying to reverse Java 7 can also get errors.

Probably some changes in package com.modeliosoft.modelio.javadesigner.reverse.antlr.complete will be needed. I am not acquainted with ANTLR so I can help much.

History

#1 Updated by Christophe Malgouyres over 8 years ago

You’re right, it is probably an error in the ANTLR grammar. We have to look closely before changing anything in it, as it is quite a sensitive area.

#2 Updated by Christophe Malgouyres about 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Fran├žois Jaouen
  • Target version set to 2.1.00

Fixed by FJA when integrating Java 1.7 syntax in the ANTLR grammar (revision 92)

Some heavy work is currently in progress on the reverse, but in a separate branch in order to limit side effects (for now). Therefore, this issue will be set to resolved as soon as the branch is merged.

#3 Updated by Christophe Malgouyres about 8 years ago

  • Status changed from Assigned to Resolved
  • Target version changed from 2.1.00 to 2.0.13

Fix integrated into the trunk in revision 119 for version 2.0.13.

#4 Updated by Christophe Demeulemeester about 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF