[ann] jdt2famix standalone - alpha version

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[ann] jdt2famix standalone - alpha version

Tudor Girba-2
Hi,

I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.

Here is the repository including some basic info:
https://github.com/girba/jdt2famix

The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.

However, there are still things to do:
- finish the coverage of the imported entities (see below).
- improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
- check the semantics of the produced data (possibly by comparing with VerveineJ).
- find a better way to package the application.
- integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.

As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.

Please let me know what you think, and most importantly please give it a try and provide feedback.

Here is a detailed list of what works and what is left to do:
✓Namespace
✓Type
✓Type without binding
✓Inheritance without binding
✓Interface
✓Parameterizable Class
✓ParameterizedType
✓Method
✓Constructor
✓Visibility (public, private, protected, package)
✓Parameter
✓Method signature
✓Local variable
✓Attribute
✓Anonymous Class
✓Anonymous Class with Parameterized Type
✓Invocation
✓Super invocation
✓Constructor Invocation
✓Super constructor invocation
✓Class instantiation
✓Class initializer
✓Invocation receiver
✓Field read access in invocation receiver
✓Field read access in invocation parameter
✓Field read access in class instantiation
✓Field read access in assignment
✓Field read access in super invocation parameter
✓Field write access in assignment
✓Local write access in assignment
✓Local read access in invocation receiver
✓Local read access in invocation parameter
✓Local read access in super invocation parameter
✓Local read access in super constructor parameter
✓Read access through return
✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
✓Read access in synchronized
✓Attribute initializer
✓Read access in attribute initializer
✓Read access to qualified enum value
✓Read access to qualified attribute
✓Parentheses
✓Enum
✓EnumValue
✓Array types []
✓AnnotationType
✓AnnotationType attributes
✓AnnotationInstance for types
☐AnnotationInstance for attributes
☐AnnotationInstance for methods
☐AnnotationInstance for parameters
☐Generic Type in Method scope
☐Class reference
☐Inner Class
☐Wildcard types <?>
☐ThrownException
☐CaughtException
☐DeclaredException
☐SourceAnchor
☐Array Access
☐Comments
☐Implicit variables
☐Lambda variables


Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"One cannot do more than one can do."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Richard Wettel-3
Great news, Doru! Thank you. I'll gladly give it a try soon.

Cheers
Ricky





On Tue, Jul 19, 2016 at 3:41 PM +0200, "Tudor Girba" <[hidden email]> wrote:

Hi,

I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.

Here is the repository including some basic info:
https://github.com/girba/jdt2famix

The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.

However, there are still things to do:
- finish the coverage of the imported entities (see below).
- improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
- check the semantics of the produced data (possibly by comparing with VerveineJ).
- find a better way to package the application.
- integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.

As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.

Please let me know what you think, and most importantly please give it a try and provide feedback.

Here is a detailed list of what works and what is left to do:
✓Namespace
✓Type
✓Type without binding
✓Inheritance without binding
✓Interface
✓Parameterizable Class
✓ParameterizedType
✓Method
✓Constructor
✓Visibility (public, private, protected, package)
✓Parameter
✓Method signature
✓Local variable
✓Attribute
✓Anonymous Class
✓Anonymous Class with Parameterized Type
✓Invocation
✓Super invocation
✓Constructor Invocation
✓Super constructor invocation
✓Class instantiation
✓Class initializer
✓Invocation receiver
✓Field read access in invocation receiver
✓Field read access in invocation parameter
✓Field read access in class instantiation
✓Field read access in assignment
✓Field read access in super invocation parameter
✓Field write access in assignment
✓Local write access in assignment
✓Local read access in invocation receiver
✓Local read access in invocation parameter
✓Local read access in super invocation parameter
✓Local read access in super constructor parameter
✓Read access through return
✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
✓Read access in synchronized
✓Attribute initializer
✓Read access in attribute initializer
✓Read access to qualified enum value
✓Read access to qualified attribute
✓Parentheses
✓Enum
✓EnumValue
✓Array types []
✓AnnotationType
✓AnnotationType attributes
✓AnnotationInstance for types
☐AnnotationInstance for attributes
☐AnnotationInstance for methods
☐AnnotationInstance for parameters
☐Generic Type in Method scope
☐Class reference
☐Inner Class
☐Wildcard types 
☐ThrownException
☐CaughtException
☐DeclaredException
☐SourceAnchor
☐Array Access
☐Comments
☐Implicit variables
☐Lambda variables


Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"One cannot do more than one can do."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

abergel
In reply to this post by Tudor Girba-2
Hi Doru,

This is fantastic.

I tried, but I got some error. Here is what I did:
-=-=-=-=-=-=-=-=
~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
Cloning into 'jdt2famix'...
remote: Counting objects: 2044, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
Resolving deltas: 100% (772/772), done.
Checking connectivity... done.
~/Dropbox/Document> cd jdt2famix/
~/Dropbox/Document/jdt2famix> ./release.sh
./release.sh: line 11: mvn: command not found
cp: ./target/jdt2famix*.jar: No such file or directory
./release.sh: line 15: mvn: command not found
~/Dropbox/Document/jdt2famix>
-=-=-=-=-=-=-=-=

What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?

Alexandre


> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>
> Here is the repository including some basic info:
> https://github.com/girba/jdt2famix
>
> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>
> However, there are still things to do:
> - finish the coverage of the imported entities (see below).
> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
> - check the semantics of the produced data (possibly by comparing with VerveineJ).
> - find a better way to package the application.
> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>
> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>
> Please let me know what you think, and most importantly please give it a try and provide feedback.
>
> Here is a detailed list of what works and what is left to do:
> ✓Namespace
> ✓Type
> ✓Type without binding
> ✓Inheritance without binding
> ✓Interface
> ✓Parameterizable Class
> ✓ParameterizedType
> ✓Method
> ✓Constructor
> ✓Visibility (public, private, protected, package)
> ✓Parameter
> ✓Method signature
> ✓Local variable
> ✓Attribute
> ✓Anonymous Class
> ✓Anonymous Class with Parameterized Type
> ✓Invocation
> ✓Super invocation
> ✓Constructor Invocation
> ✓Super constructor invocation
> ✓Class instantiation
> ✓Class initializer
> ✓Invocation receiver
> ✓Field read access in invocation receiver
> ✓Field read access in invocation parameter
> ✓Field read access in class instantiation
> ✓Field read access in assignment
> ✓Field read access in super invocation parameter
> ✓Field write access in assignment
> ✓Local write access in assignment
> ✓Local read access in invocation receiver
> ✓Local read access in invocation parameter
> ✓Local read access in super invocation parameter
> ✓Local read access in super constructor parameter
> ✓Read access through return
> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
> ✓Read access in synchronized
> ✓Attribute initializer
> ✓Read access in attribute initializer
> ✓Read access to qualified enum value
> ✓Read access to qualified attribute
> ✓Parentheses
> ✓Enum
> ✓EnumValue
> ✓Array types []
> ✓AnnotationType
> ✓AnnotationType attributes
> ✓AnnotationInstance for types
> ☐AnnotationInstance for attributes
> ☐AnnotationInstance for methods
> ☐AnnotationInstance for parameters
> ☐Generic Type in Method scope
> ☐Class reference
> ☐Inner Class
> ☐Wildcard types <?>
> ☐ThrownException
> ☐CaughtException
> ☐DeclaredException
> ☐SourceAnchor
> ☐Array Access
> ☐Comments
> ☐Implicit variables
> ☐Lambda variables
>
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "One cannot do more than one can do."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Nicolas Anquetil
In reply to this post by Tudor Girba-2
very nice

I will look at it when I come back from vacation

nicolas

On 19/07/2016 15:41, Tudor Girba wrote:

> Hi,
>
> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>
> Here is the repository including some basic info:
> https://github.com/girba/jdt2famix
>
> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>
> However, there are still things to do:
> - finish the coverage of the imported entities (see below).
> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
> - check the semantics of the produced data (possibly by comparing with VerveineJ).
> - find a better way to package the application.
> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>
> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>
> Please let me know what you think, and most importantly please give it a try and provide feedback.
>
> Here is a detailed list of what works and what is left to do:
> ✓Namespace
> ✓Type
> ✓Type without binding
> ✓Inheritance without binding
> ✓Interface
> ✓Parameterizable Class
> ✓ParameterizedType
> ✓Method
> ✓Constructor
> ✓Visibility (public, private, protected, package)
> ✓Parameter
> ✓Method signature
> ✓Local variable
> ✓Attribute
> ✓Anonymous Class
> ✓Anonymous Class with Parameterized Type
> ✓Invocation
> ✓Super invocation
> ✓Constructor Invocation
> ✓Super constructor invocation
> ✓Class instantiation
> ✓Class initializer
> ✓Invocation receiver
> ✓Field read access in invocation receiver
> ✓Field read access in invocation parameter
> ✓Field read access in class instantiation
> ✓Field read access in assignment
> ✓Field read access in super invocation parameter
> ✓Field write access in assignment
> ✓Local write access in assignment
> ✓Local read access in invocation receiver
> ✓Local read access in invocation parameter
> ✓Local read access in super invocation parameter
> ✓Local read access in super constructor parameter
> ✓Read access through return
> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
> ✓Read access in synchronized
> ✓Attribute initializer
> ✓Read access in attribute initializer
> ✓Read access to qualified enum value
> ✓Read access to qualified attribute
> ✓Parentheses
> ✓Enum
> ✓EnumValue
> ✓Array types []
> ✓AnnotationType
> ✓AnnotationType attributes
> ✓AnnotationInstance for types
> ☐AnnotationInstance for attributes
> ☐AnnotationInstance for methods
> ☐AnnotationInstance for parameters
> ☐Generic Type in Method scope
> ☐Class reference
> ☐Inner Class
> ☐Wildcard types <?>
> ☐ThrownException
> ☐CaughtException
> ☐DeclaredException
> ☐SourceAnchor
> ☐Array Access
> ☐Comments
> ☐Implicit variables
> ☐Lambda variables
>
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "One cannot do more than one can do."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
Nicolas Anquetil
RMod team -- Inria Lille

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by abergel
Ah, indeed. You need Maven:
https://maven.apache.org/download.cgi

I updated the instructions as well.

Let me know if it works.

Cheers,
Doru


> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>
> Hi Doru,
>
> This is fantastic.
>
> I tried, but I got some error. Here is what I did:
> -=-=-=-=-=-=-=-=
> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
> Cloning into 'jdt2famix'...
> remote: Counting objects: 2044, done.
> remote: Compressing objects: 100% (20/20), done.
> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
> Resolving deltas: 100% (772/772), done.
> Checking connectivity... done.
> ~/Dropbox/Document> cd jdt2famix/
> ~/Dropbox/Document/jdt2famix> ./release.sh
> ./release.sh: line 11: mvn: command not found
> cp: ./target/jdt2famix*.jar: No such file or directory
> ./release.sh: line 15: mvn: command not found
> ~/Dropbox/Document/jdt2famix>
> -=-=-=-=-=-=-=-=
>
> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>
> Alexandre
>
>
>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>
>> Hi,
>>
>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>
>> Here is the repository including some basic info:
>> https://github.com/girba/jdt2famix
>>
>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>
>> However, there are still things to do:
>> - finish the coverage of the imported entities (see below).
>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>> - find a better way to package the application.
>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>
>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>
>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>
>> Here is a detailed list of what works and what is left to do:
>> ✓Namespace
>> ✓Type
>> ✓Type without binding
>> ✓Inheritance without binding
>> ✓Interface
>> ✓Parameterizable Class
>> ✓ParameterizedType
>> ✓Method
>> ✓Constructor
>> ✓Visibility (public, private, protected, package)
>> ✓Parameter
>> ✓Method signature
>> ✓Local variable
>> ✓Attribute
>> ✓Anonymous Class
>> ✓Anonymous Class with Parameterized Type
>> ✓Invocation
>> ✓Super invocation
>> ✓Constructor Invocation
>> ✓Super constructor invocation
>> ✓Class instantiation
>> ✓Class initializer
>> ✓Invocation receiver
>> ✓Field read access in invocation receiver
>> ✓Field read access in invocation parameter
>> ✓Field read access in class instantiation
>> ✓Field read access in assignment
>> ✓Field read access in super invocation parameter
>> ✓Field write access in assignment
>> ✓Local write access in assignment
>> ✓Local read access in invocation receiver
>> ✓Local read access in invocation parameter
>> ✓Local read access in super invocation parameter
>> ✓Local read access in super constructor parameter
>> ✓Read access through return
>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>> ✓Read access in synchronized
>> ✓Attribute initializer
>> ✓Read access in attribute initializer
>> ✓Read access to qualified enum value
>> ✓Read access to qualified attribute
>> ✓Parentheses
>> ✓Enum
>> ✓EnumValue
>> ✓Array types []
>> ✓AnnotationType
>> ✓AnnotationType attributes
>> ✓AnnotationInstance for types
>> ☐AnnotationInstance for attributes
>> ☐AnnotationInstance for methods
>> ☐AnnotationInstance for parameters
>> ☐Generic Type in Method scope
>> ☐Class reference
>> ☐Inner Class
>> ☐Wildcard types <?>
>> ☐ThrownException
>> ☐CaughtException
>> ☐DeclaredException
>> ☐SourceAnchor
>> ☐Array Access
>> ☐Comments
>> ☐Implicit variables
>> ☐Lambda variables
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "One cannot do more than one can do."
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Richard Wettel-3
Hi Doru

I tried to parse ArgoUML (what else, right?) and got the following exception:

Exception in thread "main" java.lang.NullPointerException
        at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
        at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
        at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
        at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
        at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
        at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
        at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
        at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
        at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
        at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
        at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
        at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
        at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
        at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
        at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
        at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
        at com.feenk.jdt2famix.Importer.run(Importer.java:28)
        at com.feenk.jdt2famix.injava.Main.main(Main.java:25)

I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.

Cheers
Ricky


> On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:
>
> Ah, indeed. You need Maven:
> https://maven.apache.org/download.cgi
>
> I updated the instructions as well.
>
> Let me know if it works.
>
> Cheers,
> Doru
>
>
>> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>>
>> Hi Doru,
>>
>> This is fantastic.
>>
>> I tried, but I got some error. Here is what I did:
>> -=-=-=-=-=-=-=-=
>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>> Cloning into 'jdt2famix'...
>> remote: Counting objects: 2044, done.
>> remote: Compressing objects: 100% (20/20), done.
>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>> Resolving deltas: 100% (772/772), done.
>> Checking connectivity... done.
>> ~/Dropbox/Document> cd jdt2famix/
>> ~/Dropbox/Document/jdt2famix> ./release.sh
>> ./release.sh: line 11: mvn: command not found
>> cp: ./target/jdt2famix*.jar: No such file or directory
>> ./release.sh: line 15: mvn: command not found
>> ~/Dropbox/Document/jdt2famix>
>> -=-=-=-=-=-=-=-=
>>
>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>
>> Alexandre
>>
>>
>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>
>>> Here is the repository including some basic info:
>>> https://github.com/girba/jdt2famix
>>>
>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>
>>> However, there are still things to do:
>>> - finish the coverage of the imported entities (see below).
>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>> - find a better way to package the application.
>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>
>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>
>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>
>>> Here is a detailed list of what works and what is left to do:
>>> ✓Namespace
>>> ✓Type
>>> ✓Type without binding
>>> ✓Inheritance without binding
>>> ✓Interface
>>> ✓Parameterizable Class
>>> ✓ParameterizedType
>>> ✓Method
>>> ✓Constructor
>>> ✓Visibility (public, private, protected, package)
>>> ✓Parameter
>>> ✓Method signature
>>> ✓Local variable
>>> ✓Attribute
>>> ✓Anonymous Class
>>> ✓Anonymous Class with Parameterized Type
>>> ✓Invocation
>>> ✓Super invocation
>>> ✓Constructor Invocation
>>> ✓Super constructor invocation
>>> ✓Class instantiation
>>> ✓Class initializer
>>> ✓Invocation receiver
>>> ✓Field read access in invocation receiver
>>> ✓Field read access in invocation parameter
>>> ✓Field read access in class instantiation
>>> ✓Field read access in assignment
>>> ✓Field read access in super invocation parameter
>>> ✓Field write access in assignment
>>> ✓Local write access in assignment
>>> ✓Local read access in invocation receiver
>>> ✓Local read access in invocation parameter
>>> ✓Local read access in super invocation parameter
>>> ✓Local read access in super constructor parameter
>>> ✓Read access through return
>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>> ✓Read access in synchronized
>>> ✓Attribute initializer
>>> ✓Read access in attribute initializer
>>> ✓Read access to qualified enum value
>>> ✓Read access to qualified attribute
>>> ✓Parentheses
>>> ✓Enum
>>> ✓EnumValue
>>> ✓Array types []
>>> ✓AnnotationType
>>> ✓AnnotationType attributes
>>> ✓AnnotationInstance for types
>>> ☐AnnotationInstance for attributes
>>> ☐AnnotationInstance for methods
>>> ☐AnnotationInstance for parameters
>>> ☐Generic Type in Method scope
>>> ☐Class reference
>>> ☐Inner Class
>>> ☐Wildcard types <?>
>>> ☐ThrownException
>>> ☐CaughtException
>>> ☐DeclaredException
>>> ☐SourceAnchor
>>> ☐Array Access
>>> ☐Comments
>>> ☐Implicit variables
>>> ☐Lambda variables
>>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "One cannot do more than one can do."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "There are no old things, there are only old ways of looking at them."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Uko2
In reply to this post by abergel
Also you can do

brew install maven

If you are using homebrew


Uko

Sent from my iPhone

> On 19 Jul 2016, at 17:44, Alexandre Bergel <[hidden email]> wrote:
>
> Hi Doru,
>
> This is fantastic.
>
> I tried, but I got some error. Here is what I did:
> -=-=-=-=-=-=-=-=
> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
> Cloning into 'jdt2famix'...
> remote: Counting objects: 2044, done.
> remote: Compressing objects: 100% (20/20), done.
> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
> Resolving deltas: 100% (772/772), done.
> Checking connectivity... done.
> ~/Dropbox/Document> cd jdt2famix/
> ~/Dropbox/Document/jdt2famix> ./release.sh
> ./release.sh: line 11: mvn: command not found
> cp: ./target/jdt2famix*.jar: No such file or directory
> ./release.sh: line 15: mvn: command not found
> ~/Dropbox/Document/jdt2famix>
> -=-=-=-=-=-=-=-=
>
> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>
> Alexandre
>
>
>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>
>> Hi,
>>
>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>
>> Here is the repository including some basic info:
>> https://github.com/girba/jdt2famix
>>
>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>
>> However, there are still things to do:
>> - finish the coverage of the imported entities (see below).
>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>> - find a better way to package the application.
>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>
>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>
>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>
>> Here is a detailed list of what works and what is left to do:
>> ✓Namespace
>> ✓Type
>> ✓Type without binding
>> ✓Inheritance without binding
>> ✓Interface
>> ✓Parameterizable Class
>> ✓ParameterizedType
>> ✓Method
>> ✓Constructor
>> ✓Visibility (public, private, protected, package)
>> ✓Parameter
>> ✓Method signature
>> ✓Local variable
>> ✓Attribute
>> ✓Anonymous Class
>> ✓Anonymous Class with Parameterized Type
>> ✓Invocation
>> ✓Super invocation
>> ✓Constructor Invocation
>> ✓Super constructor invocation
>> ✓Class instantiation
>> ✓Class initializer
>> ✓Invocation receiver
>> ✓Field read access in invocation receiver
>> ✓Field read access in invocation parameter
>> ✓Field read access in class instantiation
>> ✓Field read access in assignment
>> ✓Field read access in super invocation parameter
>> ✓Field write access in assignment
>> ✓Local write access in assignment
>> ✓Local read access in invocation receiver
>> ✓Local read access in invocation parameter
>> ✓Local read access in super invocation parameter
>> ✓Local read access in super constructor parameter
>> ✓Read access through return
>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>> ✓Read access in synchronized
>> ✓Attribute initializer
>> ✓Read access in attribute initializer
>> ✓Read access to qualified enum value
>> ✓Read access to qualified attribute
>> ✓Parentheses
>> ✓Enum
>> ✓EnumValue
>> ✓Array types []
>> ✓AnnotationType
>> ✓AnnotationType attributes
>> ✓AnnotationInstance for types
>> ☐AnnotationInstance for attributes
>> ☐AnnotationInstance for methods
>> ☐AnnotationInstance for parameters
>> ☐Generic Type in Method scope
>> ☐Class reference
>> ☐Inner Class
>> ☐Wildcard types <?>
>> ☐ThrownException
>> ☐CaughtException
>> ☐DeclaredException
>> ☐SourceAnchor
>> ☐Array Access
>> ☐Comments
>> ☐Implicit variables
>> ☐Lambda variables
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "One cannot do more than one can do."
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

abergel
Works Great!
@ Doru: maybe you can add the brew command to install maven on the website

I was able to produce the MSE files

This is fantastic!

Alexandre


> On Jul 20, 2016, at 8:37 AM, Yuriy Tymchuk <[hidden email]> wrote:
>
> Also you can do
>
> brew install maven
>
> If you are using homebrew
>
>
> Uko
>
> Sent from my iPhone
>
>> On 19 Jul 2016, at 17:44, Alexandre Bergel <[hidden email]> wrote:
>>
>> Hi Doru,
>>
>> This is fantastic.
>>
>> I tried, but I got some error. Here is what I did:
>> -=-=-=-=-=-=-=-=
>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>> Cloning into 'jdt2famix'...
>> remote: Counting objects: 2044, done.
>> remote: Compressing objects: 100% (20/20), done.
>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>> Resolving deltas: 100% (772/772), done.
>> Checking connectivity... done.
>> ~/Dropbox/Document> cd jdt2famix/
>> ~/Dropbox/Document/jdt2famix> ./release.sh
>> ./release.sh: line 11: mvn: command not found
>> cp: ./target/jdt2famix*.jar: No such file or directory
>> ./release.sh: line 15: mvn: command not found
>> ~/Dropbox/Document/jdt2famix>
>> -=-=-=-=-=-=-=-=
>>
>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>
>> Alexandre
>>
>>
>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>
>>> Here is the repository including some basic info:
>>> https://github.com/girba/jdt2famix
>>>
>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>
>>> However, there are still things to do:
>>> - finish the coverage of the imported entities (see below).
>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>> - find a better way to package the application.
>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>
>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>
>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>
>>> Here is a detailed list of what works and what is left to do:
>>> ✓Namespace
>>> ✓Type
>>> ✓Type without binding
>>> ✓Inheritance without binding
>>> ✓Interface
>>> ✓Parameterizable Class
>>> ✓ParameterizedType
>>> ✓Method
>>> ✓Constructor
>>> ✓Visibility (public, private, protected, package)
>>> ✓Parameter
>>> ✓Method signature
>>> ✓Local variable
>>> ✓Attribute
>>> ✓Anonymous Class
>>> ✓Anonymous Class with Parameterized Type
>>> ✓Invocation
>>> ✓Super invocation
>>> ✓Constructor Invocation
>>> ✓Super constructor invocation
>>> ✓Class instantiation
>>> ✓Class initializer
>>> ✓Invocation receiver
>>> ✓Field read access in invocation receiver
>>> ✓Field read access in invocation parameter
>>> ✓Field read access in class instantiation
>>> ✓Field read access in assignment
>>> ✓Field read access in super invocation parameter
>>> ✓Field write access in assignment
>>> ✓Local write access in assignment
>>> ✓Local read access in invocation receiver
>>> ✓Local read access in invocation parameter
>>> ✓Local read access in super invocation parameter
>>> ✓Local read access in super constructor parameter
>>> ✓Read access through return
>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>> ✓Read access in synchronized
>>> ✓Attribute initializer
>>> ✓Read access in attribute initializer
>>> ✓Read access to qualified enum value
>>> ✓Read access to qualified attribute
>>> ✓Parentheses
>>> ✓Enum
>>> ✓EnumValue
>>> ✓Array types []
>>> ✓AnnotationType
>>> ✓AnnotationType attributes
>>> ✓AnnotationInstance for types
>>> ☐AnnotationInstance for attributes
>>> ☐AnnotationInstance for methods
>>> ☐AnnotationInstance for parameters
>>> ☐Generic Type in Method scope
>>> ☐Class reference
>>> ☐Inner Class
>>> ☐Wildcard types <?>
>>> ☐ThrownException
>>> ☐CaughtException
>>> ☐DeclaredException
>>> ☐SourceAnchor
>>> ☐Array Access
>>> ☐Comments
>>> ☐Implicit variables
>>> ☐Lambda variables
>>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "One cannot do more than one can do."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by Richard Wettel-3
Hi Ricky,

Great. Thanks. That is what I am looking for.

I also parsed a version of ArgoUML, and it worked. So, it must be an edge case that is sensitive to the exact code you chose.

Could you tell me how to get the exact sources that you parsed? Also, did you get libraries as well?

Cheers,
Doru


> On Jul 20, 2016, at 12:32 AM, Richard Wettel <[hidden email]> wrote:
>
> Hi Doru
>
> I tried to parse ArgoUML (what else, right?) and got the following exception:
>
> Exception in thread "main" java.lang.NullPointerException
> at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
> at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
> at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
> at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
> at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
> at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
> at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
> at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
> at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
> at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
> at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
> at com.feenk.jdt2famix.Importer.run(Importer.java:28)
> at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
>
> I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.
>
> Cheers
> Ricky
>
>
>> On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:
>>
>> Ah, indeed. You need Maven:
>> https://maven.apache.org/download.cgi
>>
>> I updated the instructions as well.
>>
>> Let me know if it works.
>>
>> Cheers,
>> Doru
>>
>>
>>> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>> Hi Doru,
>>>
>>> This is fantastic.
>>>
>>> I tried, but I got some error. Here is what I did:
>>> -=-=-=-=-=-=-=-=
>>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>>> Cloning into 'jdt2famix'...
>>> remote: Counting objects: 2044, done.
>>> remote: Compressing objects: 100% (20/20), done.
>>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>>> Resolving deltas: 100% (772/772), done.
>>> Checking connectivity... done.
>>> ~/Dropbox/Document> cd jdt2famix/
>>> ~/Dropbox/Document/jdt2famix> ./release.sh
>>> ./release.sh: line 11: mvn: command not found
>>> cp: ./target/jdt2famix*.jar: No such file or directory
>>> ./release.sh: line 15: mvn: command not found
>>> ~/Dropbox/Document/jdt2famix>
>>> -=-=-=-=-=-=-=-=
>>>
>>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>>
>>> Alexandre
>>>
>>>
>>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>>
>>>> Here is the repository including some basic info:
>>>> https://github.com/girba/jdt2famix
>>>>
>>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>>
>>>> However, there are still things to do:
>>>> - finish the coverage of the imported entities (see below).
>>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>>> - find a better way to package the application.
>>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>>
>>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>>
>>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>>
>>>> Here is a detailed list of what works and what is left to do:
>>>> ✓Namespace
>>>> ✓Type
>>>> ✓Type without binding
>>>> ✓Inheritance without binding
>>>> ✓Interface
>>>> ✓Parameterizable Class
>>>> ✓ParameterizedType
>>>> ✓Method
>>>> ✓Constructor
>>>> ✓Visibility (public, private, protected, package)
>>>> ✓Parameter
>>>> ✓Method signature
>>>> ✓Local variable
>>>> ✓Attribute
>>>> ✓Anonymous Class
>>>> ✓Anonymous Class with Parameterized Type
>>>> ✓Invocation
>>>> ✓Super invocation
>>>> ✓Constructor Invocation
>>>> ✓Super constructor invocation
>>>> ✓Class instantiation
>>>> ✓Class initializer
>>>> ✓Invocation receiver
>>>> ✓Field read access in invocation receiver
>>>> ✓Field read access in invocation parameter
>>>> ✓Field read access in class instantiation
>>>> ✓Field read access in assignment
>>>> ✓Field read access in super invocation parameter
>>>> ✓Field write access in assignment
>>>> ✓Local write access in assignment
>>>> ✓Local read access in invocation receiver
>>>> ✓Local read access in invocation parameter
>>>> ✓Local read access in super invocation parameter
>>>> ✓Local read access in super constructor parameter
>>>> ✓Read access through return
>>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>>> ✓Read access in synchronized
>>>> ✓Attribute initializer
>>>> ✓Read access in attribute initializer
>>>> ✓Read access to qualified enum value
>>>> ✓Read access to qualified attribute
>>>> ✓Parentheses
>>>> ✓Enum
>>>> ✓EnumValue
>>>> ✓Array types []
>>>> ✓AnnotationType
>>>> ✓AnnotationType attributes
>>>> ✓AnnotationInstance for types
>>>> ☐AnnotationInstance for attributes
>>>> ☐AnnotationInstance for methods
>>>> ☐AnnotationInstance for parameters
>>>> ☐Generic Type in Method scope
>>>> ☐Class reference
>>>> ☐Inner Class
>>>> ☐Wildcard types <?>
>>>> ☐ThrownException
>>>> ☐CaughtException
>>>> ☐DeclaredException
>>>> ☐SourceAnchor
>>>> ☐Array Access
>>>> ☐Comments
>>>> ☐Implicit variables
>>>> ☐Lambda variables
>>>>
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "One cannot do more than one can do."
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "There are no old things, there are only old ways of looking at them."
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by abergel
Hi,

Thanks.

Now, we need to also look at the quality of the produced models. So, if you notice that something is not quite right (maybe there is missing or too much information), please let me know.

Cheers,
Doru


> On Jul 20, 2016, at 2:13 AM, Alexandre Bergel <[hidden email]> wrote:
>
> Works Great!
> @ Doru: maybe you can add the brew command to install maven on the website
>
> I was able to produce the MSE files
>
> This is fantastic!
>
> Alexandre
>
>
>> On Jul 20, 2016, at 8:37 AM, Yuriy Tymchuk <[hidden email]> wrote:
>>
>> Also you can do
>>
>> brew install maven
>>
>> If you are using homebrew
>>
>>
>> Uko
>>
>> Sent from my iPhone
>>
>>> On 19 Jul 2016, at 17:44, Alexandre Bergel <[hidden email]> wrote:
>>>
>>> Hi Doru,
>>>
>>> This is fantastic.
>>>
>>> I tried, but I got some error. Here is what I did:
>>> -=-=-=-=-=-=-=-=
>>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>>> Cloning into 'jdt2famix'...
>>> remote: Counting objects: 2044, done.
>>> remote: Compressing objects: 100% (20/20), done.
>>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>>> Resolving deltas: 100% (772/772), done.
>>> Checking connectivity... done.
>>> ~/Dropbox/Document> cd jdt2famix/
>>> ~/Dropbox/Document/jdt2famix> ./release.sh
>>> ./release.sh: line 11: mvn: command not found
>>> cp: ./target/jdt2famix*.jar: No such file or directory
>>> ./release.sh: line 15: mvn: command not found
>>> ~/Dropbox/Document/jdt2famix>
>>> -=-=-=-=-=-=-=-=
>>>
>>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>>
>>> Alexandre
>>>
>>>
>>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>>
>>>> Here is the repository including some basic info:
>>>> https://github.com/girba/jdt2famix
>>>>
>>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>>
>>>> However, there are still things to do:
>>>> - finish the coverage of the imported entities (see below).
>>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>>> - find a better way to package the application.
>>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>>
>>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>>
>>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>>
>>>> Here is a detailed list of what works and what is left to do:
>>>> ✓Namespace
>>>> ✓Type
>>>> ✓Type without binding
>>>> ✓Inheritance without binding
>>>> ✓Interface
>>>> ✓Parameterizable Class
>>>> ✓ParameterizedType
>>>> ✓Method
>>>> ✓Constructor
>>>> ✓Visibility (public, private, protected, package)
>>>> ✓Parameter
>>>> ✓Method signature
>>>> ✓Local variable
>>>> ✓Attribute
>>>> ✓Anonymous Class
>>>> ✓Anonymous Class with Parameterized Type
>>>> ✓Invocation
>>>> ✓Super invocation
>>>> ✓Constructor Invocation
>>>> ✓Super constructor invocation
>>>> ✓Class instantiation
>>>> ✓Class initializer
>>>> ✓Invocation receiver
>>>> ✓Field read access in invocation receiver
>>>> ✓Field read access in invocation parameter
>>>> ✓Field read access in class instantiation
>>>> ✓Field read access in assignment
>>>> ✓Field read access in super invocation parameter
>>>> ✓Field write access in assignment
>>>> ✓Local write access in assignment
>>>> ✓Local read access in invocation receiver
>>>> ✓Local read access in invocation parameter
>>>> ✓Local read access in super invocation parameter
>>>> ✓Local read access in super constructor parameter
>>>> ✓Read access through return
>>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>>> ✓Read access in synchronized
>>>> ✓Attribute initializer
>>>> ✓Read access in attribute initializer
>>>> ✓Read access to qualified enum value
>>>> ✓Read access to qualified attribute
>>>> ✓Parentheses
>>>> ✓Enum
>>>> ✓EnumValue
>>>> ✓Array types []
>>>> ✓AnnotationType
>>>> ✓AnnotationType attributes
>>>> ✓AnnotationInstance for types
>>>> ☐AnnotationInstance for attributes
>>>> ☐AnnotationInstance for methods
>>>> ☐AnnotationInstance for parameters
>>>> ☐Generic Type in Method scope
>>>> ☐Class reference
>>>> ☐Inner Class
>>>> ☐Wildcard types <?>
>>>> ☐ThrownException
>>>> ☐CaughtException
>>>> ☐DeclaredException
>>>> ☐SourceAnchor
>>>> ☐Array Access
>>>> ☐Comments
>>>> ☐Implicit variables
>>>> ☐Lambda variables
>>>>
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "One cannot do more than one can do."
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Reasonable is what we are accustomed with."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by Tudor Girba-2
Hi again,

By looking at the stack, I think I know where the problem comes from: it seems it is possible to have a method binding for which the declaring class is null. I thought this is not possible, so now I would like to understand the case when this happens because I do not know how to reproduce that.

Java is really not an easy language, and the JDT AST is also not regular enough. I only put guard conditions when I have a case that was broken and this forces me to have a better coverage for the future.

Of course, in the end, we will have to catch all exceptions on a file to file basis :)

Cheers,
Doru


> On Jul 20, 2016, at 4:40 AM, Tudor Girba <[hidden email]> wrote:
>
> Hi Ricky,
>
> Great. Thanks. That is what I am looking for.
>
> I also parsed a version of ArgoUML, and it worked. So, it must be an edge case that is sensitive to the exact code you chose.
>
> Could you tell me how to get the exact sources that you parsed? Also, did you get libraries as well?
>
> Cheers,
> Doru
>
>
>> On Jul 20, 2016, at 12:32 AM, Richard Wettel <[hidden email]> wrote:
>>
>> Hi Doru
>>
>> I tried to parse ArgoUML (what else, right?) and got the following exception:
>>
>> Exception in thread "main" java.lang.NullPointerException
>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
>> at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
>> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
>> at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>> at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>> at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>> at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>> at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>> at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>> at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
>> at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
>> at com.feenk.jdt2famix.Importer.run(Importer.java:28)
>> at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
>>
>> I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.
>>
>> Cheers
>> Ricky
>>
>>
>>> On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:
>>>
>>> Ah, indeed. You need Maven:
>>> https://maven.apache.org/download.cgi
>>>
>>> I updated the instructions as well.
>>>
>>> Let me know if it works.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>>>>
>>>> Hi Doru,
>>>>
>>>> This is fantastic.
>>>>
>>>> I tried, but I got some error. Here is what I did:
>>>> -=-=-=-=-=-=-=-=
>>>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>>>> Cloning into 'jdt2famix'...
>>>> remote: Counting objects: 2044, done.
>>>> remote: Compressing objects: 100% (20/20), done.
>>>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>>>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>>>> Resolving deltas: 100% (772/772), done.
>>>> Checking connectivity... done.
>>>> ~/Dropbox/Document> cd jdt2famix/
>>>> ~/Dropbox/Document/jdt2famix> ./release.sh
>>>> ./release.sh: line 11: mvn: command not found
>>>> cp: ./target/jdt2famix*.jar: No such file or directory
>>>> ./release.sh: line 15: mvn: command not found
>>>> ~/Dropbox/Document/jdt2famix>
>>>> -=-=-=-=-=-=-=-=
>>>>
>>>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>>>
>>>> Alexandre
>>>>
>>>>
>>>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>>>
>>>>> Here is the repository including some basic info:
>>>>> https://github.com/girba/jdt2famix
>>>>>
>>>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>>>
>>>>> However, there are still things to do:
>>>>> - finish the coverage of the imported entities (see below).
>>>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>>>> - find a better way to package the application.
>>>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>>>
>>>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>>>
>>>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>>>
>>>>> Here is a detailed list of what works and what is left to do:
>>>>> ✓Namespace
>>>>> ✓Type
>>>>> ✓Type without binding
>>>>> ✓Inheritance without binding
>>>>> ✓Interface
>>>>> ✓Parameterizable Class
>>>>> ✓ParameterizedType
>>>>> ✓Method
>>>>> ✓Constructor
>>>>> ✓Visibility (public, private, protected, package)
>>>>> ✓Parameter
>>>>> ✓Method signature
>>>>> ✓Local variable
>>>>> ✓Attribute
>>>>> ✓Anonymous Class
>>>>> ✓Anonymous Class with Parameterized Type
>>>>> ✓Invocation
>>>>> ✓Super invocation
>>>>> ✓Constructor Invocation
>>>>> ✓Super constructor invocation
>>>>> ✓Class instantiation
>>>>> ✓Class initializer
>>>>> ✓Invocation receiver
>>>>> ✓Field read access in invocation receiver
>>>>> ✓Field read access in invocation parameter
>>>>> ✓Field read access in class instantiation
>>>>> ✓Field read access in assignment
>>>>> ✓Field read access in super invocation parameter
>>>>> ✓Field write access in assignment
>>>>> ✓Local write access in assignment
>>>>> ✓Local read access in invocation receiver
>>>>> ✓Local read access in invocation parameter
>>>>> ✓Local read access in super invocation parameter
>>>>> ✓Local read access in super constructor parameter
>>>>> ✓Read access through return
>>>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>>>> ✓Read access in synchronized
>>>>> ✓Attribute initializer
>>>>> ✓Read access in attribute initializer
>>>>> ✓Read access to qualified enum value
>>>>> ✓Read access to qualified attribute
>>>>> ✓Parentheses
>>>>> ✓Enum
>>>>> ✓EnumValue
>>>>> ✓Array types []
>>>>> ✓AnnotationType
>>>>> ✓AnnotationType attributes
>>>>> ✓AnnotationInstance for types
>>>>> ☐AnnotationInstance for attributes
>>>>> ☐AnnotationInstance for methods
>>>>> ☐AnnotationInstance for parameters
>>>>> ☐Generic Type in Method scope
>>>>> ☐Class reference
>>>>> ☐Inner Class
>>>>> ☐Wildcard types <?>
>>>>> ☐ThrownException
>>>>> ☐CaughtException
>>>>> ☐DeclaredException
>>>>> ☐SourceAnchor
>>>>> ☐Array Access
>>>>> ☐Comments
>>>>> ☐Implicit variables
>>>>> ☐Lambda variables
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>> www.feenk.com
>>>>>
>>>>> "One cannot do more than one can do."
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "There are no old things, there are only old ways of looking at them."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "In a world where everything is moving ever faster,
> one might have better chances to win by moving slower."
>
>
>
>

--
www.tudorgirba.com
www.feenk.com

"Things happen when they happen,
not when you talk about them happening."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

abergel
Yes. The VerveineJ experience shows that it is complicated to extract information from the AST.

Keep doing!

Alexandre


> On Jul 20, 2016, at 1:01 PM, Tudor Girba <[hidden email]> wrote:
>
> Hi again,
>
> By looking at the stack, I think I know where the problem comes from: it seems it is possible to have a method binding for which the declaring class is null. I thought this is not possible, so now I would like to understand the case when this happens because I do not know how to reproduce that.
>
> Java is really not an easy language, and the JDT AST is also not regular enough. I only put guard conditions when I have a case that was broken and this forces me to have a better coverage for the future.
>
> Of course, in the end, we will have to catch all exceptions on a file to file basis :)
>
> Cheers,
> Doru
>
>
>> On Jul 20, 2016, at 4:40 AM, Tudor Girba <[hidden email]> wrote:
>>
>> Hi Ricky,
>>
>> Great. Thanks. That is what I am looking for.
>>
>> I also parsed a version of ArgoUML, and it worked. So, it must be an edge case that is sensitive to the exact code you chose.
>>
>> Could you tell me how to get the exact sources that you parsed? Also, did you get libraries as well?
>>
>> Cheers,
>> Doru
>>
>>
>>> On Jul 20, 2016, at 12:32 AM, Richard Wettel <[hidden email]> wrote:
>>>
>>> Hi Doru
>>>
>>> I tried to parse ArgoUML (what else, right?) and got the following exception:
>>>
>>> Exception in thread "main" java.lang.NullPointerException
>>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
>>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
>>> at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
>>> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
>>> at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>>> at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>>> at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
>>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
>>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
>>> at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
>>> at com.feenk.jdt2famix.Importer.run(Importer.java:28)
>>> at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
>>>
>>> I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.
>>>
>>> Cheers
>>> Ricky
>>>
>>>
>>>> On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Ah, indeed. You need Maven:
>>>> https://maven.apache.org/download.cgi
>>>>
>>>> I updated the instructions as well.
>>>>
>>>> Let me know if it works.
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>> Hi Doru,
>>>>>
>>>>> This is fantastic.
>>>>>
>>>>> I tried, but I got some error. Here is what I did:
>>>>> -=-=-=-=-=-=-=-=
>>>>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>>>>> Cloning into 'jdt2famix'...
>>>>> remote: Counting objects: 2044, done.
>>>>> remote: Compressing objects: 100% (20/20), done.
>>>>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>>>>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>>>>> Resolving deltas: 100% (772/772), done.
>>>>> Checking connectivity... done.
>>>>> ~/Dropbox/Document> cd jdt2famix/
>>>>> ~/Dropbox/Document/jdt2famix> ./release.sh
>>>>> ./release.sh: line 11: mvn: command not found
>>>>> cp: ./target/jdt2famix*.jar: No such file or directory
>>>>> ./release.sh: line 15: mvn: command not found
>>>>> ~/Dropbox/Document/jdt2famix>
>>>>> -=-=-=-=-=-=-=-=
>>>>>
>>>>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>>>>
>>>>> Alexandre
>>>>>
>>>>>
>>>>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>>>>
>>>>>> Here is the repository including some basic info:
>>>>>> https://github.com/girba/jdt2famix
>>>>>>
>>>>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>>>>
>>>>>> However, there are still things to do:
>>>>>> - finish the coverage of the imported entities (see below).
>>>>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>>>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>>>>> - find a better way to package the application.
>>>>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>>>>
>>>>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>>>>
>>>>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>>>>
>>>>>> Here is a detailed list of what works and what is left to do:
>>>>>> ✓Namespace
>>>>>> ✓Type
>>>>>> ✓Type without binding
>>>>>> ✓Inheritance without binding
>>>>>> ✓Interface
>>>>>> ✓Parameterizable Class
>>>>>> ✓ParameterizedType
>>>>>> ✓Method
>>>>>> ✓Constructor
>>>>>> ✓Visibility (public, private, protected, package)
>>>>>> ✓Parameter
>>>>>> ✓Method signature
>>>>>> ✓Local variable
>>>>>> ✓Attribute
>>>>>> ✓Anonymous Class
>>>>>> ✓Anonymous Class with Parameterized Type
>>>>>> ✓Invocation
>>>>>> ✓Super invocation
>>>>>> ✓Constructor Invocation
>>>>>> ✓Super constructor invocation
>>>>>> ✓Class instantiation
>>>>>> ✓Class initializer
>>>>>> ✓Invocation receiver
>>>>>> ✓Field read access in invocation receiver
>>>>>> ✓Field read access in invocation parameter
>>>>>> ✓Field read access in class instantiation
>>>>>> ✓Field read access in assignment
>>>>>> ✓Field read access in super invocation parameter
>>>>>> ✓Field write access in assignment
>>>>>> ✓Local write access in assignment
>>>>>> ✓Local read access in invocation receiver
>>>>>> ✓Local read access in invocation parameter
>>>>>> ✓Local read access in super invocation parameter
>>>>>> ✓Local read access in super constructor parameter
>>>>>> ✓Read access through return
>>>>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>>>>> ✓Read access in synchronized
>>>>>> ✓Attribute initializer
>>>>>> ✓Read access in attribute initializer
>>>>>> ✓Read access to qualified enum value
>>>>>> ✓Read access to qualified attribute
>>>>>> ✓Parentheses
>>>>>> ✓Enum
>>>>>> ✓EnumValue
>>>>>> ✓Array types []
>>>>>> ✓AnnotationType
>>>>>> ✓AnnotationType attributes
>>>>>> ✓AnnotationInstance for types
>>>>>> ☐AnnotationInstance for attributes
>>>>>> ☐AnnotationInstance for methods
>>>>>> ☐AnnotationInstance for parameters
>>>>>> ☐Generic Type in Method scope
>>>>>> ☐Class reference
>>>>>> ☐Inner Class
>>>>>> ☐Wildcard types <?>
>>>>>> ☐ThrownException
>>>>>> ☐CaughtException
>>>>>> ☐DeclaredException
>>>>>> ☐SourceAnchor
>>>>>> ☐Array Access
>>>>>> ☐Comments
>>>>>> ☐Implicit variables
>>>>>> ☐Lambda variables
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>> www.feenk.com
>>>>>>
>>>>>> "One cannot do more than one can do."
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "There are no old things, there are only old ways of looking at them."
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "In a world where everything is moving ever faster,
>> one might have better chances to win by moving slower."
>>
>>
>>
>>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Things happen when they happen,
> not when you talk about them happening."
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Richard Wettel-3
In reply to this post by Tudor Girba-2
Hi Doru

Here are the sources I parsed:

At the time of the error I run the script from within the src folder.
I tried afterwards in the parent folder, where both src and lib are, and it worked. It was also fast.

Cheers
Ricky


On 20 Jul 2016, at 12:40, Tudor Girba <[hidden email]> wrote:

Hi Ricky,

Great. Thanks. That is what I am looking for.

I also parsed a version of ArgoUML, and it worked. So, it must be an edge case that is sensitive to the exact code you chose.

Could you tell me how to get the exact sources that you parsed? Also, did you get libraries as well?

Cheers,
Doru


On Jul 20, 2016, at 12:32 AM, Richard Wettel <[hidden email]> wrote:

Hi Doru

I tried to parse ArgoUML (what else, right?) and got the following exception:

Exception in thread "main" java.lang.NullPointerException
at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
at com.feenk.jdt2famix.Importer.run(Importer.java:28)
at com.feenk.jdt2famix.injava.Main.main(Main.java:25)

I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.

Cheers
Ricky


On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:

Ah, indeed. You need Maven:
https://maven.apache.org/download.cgi

I updated the instructions as well.

Let me know if it works.

Cheers,
Doru


On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:

Hi Doru,

This is fantastic.

I tried, but I got some error. Here is what I did:
-=-=-=-=-=-=-=-=
~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
Cloning into 'jdt2famix'...
remote: Counting objects: 2044, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
Resolving deltas: 100% (772/772), done.
Checking connectivity... done.
~/Dropbox/Document> cd jdt2famix/
~/Dropbox/Document/jdt2famix> ./release.sh
./release.sh: line 11: mvn: command not found
cp: ./target/jdt2famix*.jar: No such file or directory
./release.sh: line 15: mvn: command not found
~/Dropbox/Document/jdt2famix>
-=-=-=-=-=-=-=-=

What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?

Alexandre


On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:

Hi,

I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.

Here is the repository including some basic info:
https://github.com/girba/jdt2famix

The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.

However, there are still things to do:
- finish the coverage of the imported entities (see below).
- improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
- check the semantics of the produced data (possibly by comparing with VerveineJ).
- find a better way to package the application.
- integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.

As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.

Please let me know what you think, and most importantly please give it a try and provide feedback.

Here is a detailed list of what works and what is left to do:
✓Namespace
✓Type
✓Type without binding
✓Inheritance without binding
✓Interface
✓Parameterizable Class
✓ParameterizedType
✓Method
✓Constructor
✓Visibility (public, private, protected, package)
✓Parameter
✓Method signature
✓Local variable
✓Attribute
✓Anonymous Class
✓Anonymous Class with Parameterized Type
✓Invocation
✓Super invocation
✓Constructor Invocation
✓Super constructor invocation
✓Class instantiation
✓Class initializer
✓Invocation receiver
✓Field read access in invocation receiver
✓Field read access in invocation parameter
✓Field read access in class instantiation
✓Field read access in assignment
✓Field read access in super invocation parameter
✓Field write access in assignment
✓Local write access in assignment
✓Local read access in invocation receiver
✓Local read access in invocation parameter
✓Local read access in super invocation parameter
✓Local read access in super constructor parameter
✓Read access through return
✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
✓Read access in synchronized
✓Attribute initializer
✓Read access in attribute initializer
✓Read access to qualified enum value
✓Read access to qualified attribute
✓Parentheses
✓Enum
✓EnumValue
✓Array types []
✓AnnotationType
✓AnnotationType attributes
✓AnnotationInstance for types
☐AnnotationInstance for attributes
☐AnnotationInstance for methods
☐AnnotationInstance for parameters
☐Generic Type in Method scope
☐Class reference
☐Inner Class
☐Wildcard types <?>
☐ThrownException
☐CaughtException
☐DeclaredException
☐SourceAnchor
☐Array Access
☐Comments
☐Implicit variables
☐Lambda variables


Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"One cannot do more than one can do."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Meinert Schwartau
In reply to this post by Tudor Girba-2


---------- Weitergeleitete Nachricht ----------
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Cc: 
Date: Tue, 19 Jul 2016 07:41:05 -0600
Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
  

improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.



I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.

Getting the download url for all java github projects is very easy:
     

Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories

How do you think about it?

Best regards
Meinert



 

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by Richard Wettel-3
Great. I could reproduce this.

Thanks!

Doru

> On Jul 20, 2016, at 6:53 AM, Richard Wettel <[hidden email]> wrote:
>
> Hi Doru
>
> Here are the sources I parsed:
> https://dl.dropboxusercontent.com/u/49837227/ArgoUML.zip
>
> At the time of the error I run the script from within the src folder.
> I tried afterwards in the parent folder, where both src and lib are, and it worked. It was also fast.
>
> Cheers
> Ricky
>
>
>> On 20 Jul 2016, at 12:40, Tudor Girba <[hidden email]> wrote:
>>
>> Hi Ricky,
>>
>> Great. Thanks. That is what I am looking for.
>>
>> I also parsed a version of ArgoUML, and it worked. So, it must be an edge case that is sensitive to the exact code you chose.
>>
>> Could you tell me how to get the exact sources that you parsed? Also, did you get libraries as well?
>>
>> Cheers,
>> Doru
>>
>>
>>> On Jul 20, 2016, at 12:32 AM, Richard Wettel <[hidden email]> wrote:
>>>
>>> Hi Doru
>>>
>>> I tried to parse ArgoUML (what else, right?) and got the following exception:
>>>
>>> Exception in thread "main" java.lang.NullPointerException
>>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromTypeBinding(InJavaImporter.java:181)
>>> at com.feenk.jdt2famix.injava.InJavaImporter.ensureMethodFromMethodBinding(InJavaImporter.java:358)
>>> at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:600)
>>> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:325)
>>> at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:302)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>>> at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:263)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:267)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:137)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
>>> at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:635)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:470)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>>> at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
>>> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>>> at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
>>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
>>> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
>>> at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
>>> at com.feenk.jdt2famix.Importer.run(Importer.java:28)
>>> at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
>>>
>>> I have jdk1.8.0_91 and apache-maven-3.3.9 on my Mac, running on El Capitan.
>>>
>>> Cheers
>>> Ricky
>>>
>>>
>>>> On 19 Jul 2016, at 21:20, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Ah, indeed. You need Maven:
>>>> https://maven.apache.org/download.cgi
>>>>
>>>> I updated the instructions as well.
>>>>
>>>> Let me know if it works.
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>> On Jul 19, 2016, at 9:44 AM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>> Hi Doru,
>>>>>
>>>>> This is fantastic.
>>>>>
>>>>> I tried, but I got some error. Here is what I did:
>>>>> -=-=-=-=-=-=-=-=
>>>>> ~/Dropbox/Document> git clone [hidden email]:girba/jdt2famix.git
>>>>> Cloning into 'jdt2famix'...
>>>>> remote: Counting objects: 2044, done.
>>>>> remote: Compressing objects: 100% (20/20), done.
>>>>> remote: Total 2044 (delta 6), reused 0 (delta 0), pack-reused 2024
>>>>> Receiving objects: 100% (2044/2044), 1.45 MiB | 54.00 KiB/s, done.
>>>>> Resolving deltas: 100% (772/772), done.
>>>>> Checking connectivity... done.
>>>>> ~/Dropbox/Document> cd jdt2famix/
>>>>> ~/Dropbox/Document/jdt2famix> ./release.sh
>>>>> ./release.sh: line 11: mvn: command not found
>>>>> cp: ./target/jdt2famix*.jar: No such file or directory
>>>>> ./release.sh: line 15: mvn: command not found
>>>>> ~/Dropbox/Document/jdt2famix>
>>>>> -=-=-=-=-=-=-=-=
>>>>>
>>>>> What are the prerequisites? I see you use the “mvn”? Is it Meaven? How to install it?
>>>>>
>>>>> Alexandre
>>>>>
>>>>>
>>>>>> On Jul 19, 2016, at 3:41 PM, Tudor Girba <[hidden email]> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am happy to announce that I now obtained a reasonable first beta stage of a standalone jdt2famix Java importer. This is implemented in Java, it works from the command line and has a similar structure to VerveineJ (the previous solution relied on JNIPort, but that did not scale well due to 32bits and needs rethinking). It is based on FameJava and JDT, and it is available under EPL2. The model is a new Famix version generated out of the Pharo meta-descriptions. To this end, I extended a bit the tool support around Fame and I will follow up with some details one that.
>>>>>>
>>>>>> Here is the repository including some basic info:
>>>>>> https://github.com/girba/jdt2famix
>>>>>>
>>>>>> The importer was created through fine-grained tests, there are some 100 of them right now, and the coverage of the importer is more than 93%.
>>>>>>
>>>>>> However, there are still things to do:
>>>>>> - finish the coverage of the imported entities (see below).
>>>>>> - improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>>>>>> - check the semantics of the produced data (possibly by comparing with VerveineJ).
>>>>>> - find a better way to package the application.
>>>>>> - integrate in Moose with one click. Ideally, even downloading the application should be doable directly from Moose. The goal here is to make jdt2famix part of the Moose 6 release.
>>>>>>
>>>>>> As a deadline, I am targeting August 1 for a beta version, and August 10 for a Moose 6.0 release.
>>>>>>
>>>>>> Please let me know what you think, and most importantly please give it a try and provide feedback.
>>>>>>
>>>>>> Here is a detailed list of what works and what is left to do:
>>>>>> ✓Namespace
>>>>>> ✓Type
>>>>>> ✓Type without binding
>>>>>> ✓Inheritance without binding
>>>>>> ✓Interface
>>>>>> ✓Parameterizable Class
>>>>>> ✓ParameterizedType
>>>>>> ✓Method
>>>>>> ✓Constructor
>>>>>> ✓Visibility (public, private, protected, package)
>>>>>> ✓Parameter
>>>>>> ✓Method signature
>>>>>> ✓Local variable
>>>>>> ✓Attribute
>>>>>> ✓Anonymous Class
>>>>>> ✓Anonymous Class with Parameterized Type
>>>>>> ✓Invocation
>>>>>> ✓Super invocation
>>>>>> ✓Constructor Invocation
>>>>>> ✓Super constructor invocation
>>>>>> ✓Class instantiation
>>>>>> ✓Class initializer
>>>>>> ✓Invocation receiver
>>>>>> ✓Field read access in invocation receiver
>>>>>> ✓Field read access in invocation parameter
>>>>>> ✓Field read access in class instantiation
>>>>>> ✓Field read access in assignment
>>>>>> ✓Field read access in super invocation parameter
>>>>>> ✓Field write access in assignment
>>>>>> ✓Local write access in assignment
>>>>>> ✓Local read access in invocation receiver
>>>>>> ✓Local read access in invocation parameter
>>>>>> ✓Local read access in super invocation parameter
>>>>>> ✓Local read access in super constructor parameter
>>>>>> ✓Read access through return
>>>>>> ✓Read accesses in: do, while, if, for, switch, enhanced for, conditional (?:)
>>>>>> ✓Read access in synchronized
>>>>>> ✓Attribute initializer
>>>>>> ✓Read access in attribute initializer
>>>>>> ✓Read access to qualified enum value
>>>>>> ✓Read access to qualified attribute
>>>>>> ✓Parentheses
>>>>>> ✓Enum
>>>>>> ✓EnumValue
>>>>>> ✓Array types []
>>>>>> ✓AnnotationType
>>>>>> ✓AnnotationType attributes
>>>>>> ✓AnnotationInstance for types
>>>>>> ☐AnnotationInstance for attributes
>>>>>> ☐AnnotationInstance for methods
>>>>>> ☐AnnotationInstance for parameters
>>>>>> ☐Generic Type in Method scope
>>>>>> ☐Class reference
>>>>>> ☐Inner Class
>>>>>> ☐Wildcard types <?>
>>>>>> ☐ThrownException
>>>>>> ☐CaughtException
>>>>>> ☐DeclaredException
>>>>>> ☐SourceAnchor
>>>>>> ☐Array Access
>>>>>> ☐Comments
>>>>>> ☐Implicit variables
>>>>>> ☐Lambda variables
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>> www.feenk.com
>>>>>>
>>>>>> "One cannot do more than one can do."
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "There are no old things, there are only old ways of looking at them."
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "In a world where everything is moving ever faster,
>> one might have better chances to win by moving slower."
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
In reply to this post by Meinert Schwartau
Hi Meinert,

> On Jul 20, 2016, at 12:38 PM, Meinert Schwartau <[hidden email]> wrote:
>
>
>
> ---------- Weitergeleitete Nachricht ----------
> From: Tudor Girba <[hidden email]>
> To: Moose-related development <[hidden email]>
> Cc:
> Date: Tue, 19 Jul 2016 07:41:05 -0600
> Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
>  
>
> improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>
>
>
> I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
>
> Getting the download url for all java github projects is very easy:
>      
>      https://api.github.com/search/repositories?q=language:Java
>
> Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
>
> How do you think about it?

Indeed, I had a plan to look at multiple projects, although I did not think about all projects :).

One thing we need to take into account is also the presence of libraries. When we do not have external libraries, the logic of importing is different than when we have them. Yet, most errors are likely to occur when the external libraries are missing because this is when you have only partial information.

It would be cool to try both variations. If we have a maven project or something similar, we can automate the download of dependencies.

Would you like to help in that direction?

Cheers,
Doru




> Best regards
> Meinert
>
>
>
>
>  
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

“Live like you mean it."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Fwd: [ann] jdt2famix standalone - alpha version

Meinert Schwartau
In reply to this post by Meinert Schwartau
As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:

jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java

Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation

at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)

at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)

at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)




---------- Weitergeleitete Nachricht ----------
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Cc: 
Date: Tue, 19 Jul 2016 07:41:05 -0600
Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
  

improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.



I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.

Getting the download url for all java github projects is very easy:
     

Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories

How do you think about it?

Best regards
Meinert



 


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Meinert Schwartau
Wie analysing guava I had similar problems:

git clone https://github.com/google/guava.git

cd guava

mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``

../jdt2famix/release/jdt2famix.sh 

Then I got the following exception:

jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java

jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java

Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method

at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)

at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)

at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)

at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)

at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)

at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)

at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)

at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)

at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)

at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)

at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)

at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)

at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)

at com.feenk.jdt2famix.Importer.run(Importer.java:28)

at com.feenk.jdt2famix.injava.Main.main(Main.java:25)

Best regards

Meinert


2016-07-20 22:33 GMT+02:00 Meinert Schwartau <[hidden email]>:
As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:

jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java

Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation

at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)

at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)

at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)

at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)




---------- Weitergeleitete Nachricht ----------
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Cc: 
Date: Tue, 19 Jul 2016 07:41:05 -0600
Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
  

improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.



I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.

Getting the download url for all java github projects is very easy:
     

Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories

How do you think about it?

Best regards
Meinert



 



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Tudor Girba-2
Thanks! I will look at these.

Cheers,
Doru


> On Jul 20, 2016, at 2:50 PM, Meinert Schwartau <[hidden email]> wrote:
>
> Wie analysing guava I had similar problems:
>
> git clone https://github.com/google/guava.git
>
> cd guava
>
>
> mvn dependency:copy-dependencies -DoutputDirectory=dependencies -DoverWriteSnapshots=true -DoverWriteReleases=false``
>
> ../jdt2famix/release/jdt2famix.sh
>
> Then I got the following exception:
>
> jdt2famix - parsing started - /Users/meinert/Develop/moose_parser/guava
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/Beta.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtCompatible.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/GwtIncompatible.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/package-info.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/annotations/VisibleForTesting.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Absent.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/AbstractIterator.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/Ascii.java
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/guava/guava/src/com/google/common/base/CaseFormat.java
>
> Exception in thread "main" java.lang.ClassCastException: com.feenk.jdt2famix.model.famix.Enum cannot be cast to com.feenk.jdt2famix.model.famix.Method
>
> at com.feenk.jdt2famix.injava.InJavaImporter.createInvocationFromMethodBinding(InJavaImporter.java:598)
>
> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:293)
>
> at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:231)
>
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>
> at org.eclipse.jdt.core.dom.EnumConstantDeclaration.accept0(EnumConstantDeclaration.java:260)
>
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>
> at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:281)
>
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>
> at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782)
>
> at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
>
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>
> at com.feenk.jdt2famix.injava.AstRequestor.acceptAST(AstRequestor.java:17)
>
> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1029)
>
> at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
>
> at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
>
> at com.feenk.jdt2famix.Importer.run(Importer.java:28)
>
>
> at com.feenk.jdt2famix.injava.Main.main(Main.java:25)
>
> Best regards
>
> Meinert
>
>
> 2016-07-20 22:33 GMT+02:00 Meinert Schwartau <[hidden email]>:
> As a first test I tried to import the spring framework from github (https://github.com/spring-projects/spring-framework) and got some exceptions e.g when I tried to import spring-core:
>
> jdt2famix - importing - /Users/meinert/Develop/moose_parser/spring-framework/spring-core/src/main/java/org/springframework/util/SocketUtils.java
>
> Exception in thread "main" java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumConstantDeclaration cannot be cast to org.eclipse.jdt.core.dom.ClassInstanceCreation
>
> at com.feenk.jdt2famix.injava.InJavaImporter.ensureTypeFromAnonymousDeclaration(InJavaImporter.java:303)
>
> at com.feenk.jdt2famix.injava.AstVisitor.visit(AstVisitor.java:119)
>
> at org.eclipse.jdt.core.dom.AnonymousClassDeclaration.accept0(AnonymousClassDeclaration.java:141)
>
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
>
>
>
>
> ---------- Weitergeleitete Nachricht ----------
> From: Tudor Girba <[hidden email]>
> To: Moose-related development <[hidden email]>
> Cc:
> Date: Tue, 19 Jul 2016 07:41:05 -0600
> Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
>  
>
> improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.
>
>
>
> I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.
>
> Getting the download url for all java github projects is very easy:
>      
>      https://api.github.com/search/repositories?q=language:Java
>
> Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories
>
> How do you think about it?
>
> Best regards
> Meinert
>
>
>
>
>  
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"We are all great at making mistakes."








_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ann] jdt2famix standalone - alpha version

Ben Coman
In reply to this post by Meinert Schwartau


On Thu, Jul 21, 2016 at 2:38 AM, Meinert Schwartau <[hidden email]> wrote:


---------- Weitergeleitete Nachricht ----------
From: Tudor Girba <[hidden email]>
To: Moose-related development <[hidden email]>
Cc: 
Date: Tue, 19 Jul 2016 07:41:05 -0600
Subject: [Moose-dev] [ann] jdt2famix standalone - alpha version
  

improve the error handling. As Java has a ton of edge cases, it would be great if you would use it to parse your systems and report possible errors. We would then manufacture test cases out of those.



I'll definitely give it a try. Because the number of people who'll try this out will be limited, to be sure that there aren't any bugs in this parser I suggest that we let it parse all java github projects. Then we could group the resulting errors (if there exists any ;-)) per error type, write tests for these edge cases and then fix them. If all of the java git hub projects can per parsed without errors then we could be really sure this parser can is at least to parse the edge cases without exceptions. For sure, we don't know if the result makes sense but at least it produces a result.

Getting the download url for all java github projects is very easy:
     

Further optional parameters for this url for paging: {&page,per_page,sort,order}. Documentation for this request: https://developer.github.com/v3/search/#search-repositories

How do you think about it?

I wonder if you could automate this with...

cheers -ben 

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
12