Hi Stef,
thanks for the info.

My famix generator is using a "proprietary" model to generate the FAMIX file. 
My IL "analysis engine", which based on Microsoft CCI to create the "proprietary" is not really in a shape to be open sourced (I fear I would ruine my professional career if somebody sees how badly it is implemented ;-). Yes I am not proud but it does the job and it was build in my rare spare time).

But I could offer to open source the famix generator and place it under the MIT license as an intermediate step. The long term goal for me would be to switch to Roslyn and have a sound implementation which can also be open sourced. 

The question to you is if such a (half-hearted) solution would be ok for you?
If so then I would put the code into my github repo

Cheers
Thomas



Von: "Stéphane Ducasse" <stephane.ducasse@inria.fr>
An: "Moose-related development" <moose-dev@list.inf.unibe.ch>
Gesendet: Mittwoch, 16. Mai 2018 20:17:20
Betreff: [Moose-dev] Re: C# importer ?

Thanks Thomas. 
Our objectives now is to put all the importer under MIT license. 

Stef

On 16 May 2018, at 17:59, Thomas Haug <thomas.haug@mathema.de> wrote:

Hi Johan,

you might take a look at my famix generator for IL code:

At the moment I am using Microsoft CCI but I have also begun to use Roslyn to generate Famix models. 
During the upcoming weeks I will release a new version of the generator and my other tool (also change the license to that everything can be also used for commerical use). 

Cheers
Thomas




Von: "Usman Bhatti" <usman.bhatti@gmail.com>
An: "Moose-related development" <moose-dev@list.inf.unibe.ch>
Gesendet: Montag, 16. April 2018 10:21:46
Betreff: [Moose-dev] Re: C# importer ?



On Mon, Apr 16, 2018 at 10:07 AM, Johan Fabry <Johan@raincode.com> wrote:

Hi Usman,

 

Thanks for the reply! In the mean time I have been looking at using Roslyn: the .NET reflection API's, to make a XML dump of the structure of the code. I am almost there so I will keep going this route.


Excellent!
 

 

Now I can write a basic class structure with simple call information, and it's only 160 LOC of C# code. But the thing is that parsing is not enough, I also want the semantic analysis that gives type information (argument types, receiver type) and I don’t want to write that myself. Roslyn is supposed to give me that as well so I am investigating that now.


I hope it does.
Now, Mono.Cecil also does name resolution but sometimes I encountered limitations with it hence I would also support that you go for a solution provided by MS.

regards.
Usman
 

 

--

Johan Fabry,  Senior Software Engineer. 

johan@raincode.com | Email too brief? Here's whyhttp://emailcharter.org

 

From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Usman Bhatti
Sent: Monday, April 16, 2018 9:59 AM
To: Moose-related development <moose-dev@list.inf.unibe.ch>
Subject: [Moose-dev] Re: C# importer ?

 

Hi John,

 

Sorry for the late reply.

 

I worked on a C# (MSIL) importer a few years back while I was working in Inria.

 

This parser was based on Mono project and a library Mono.Cecil that provides API to access MSIL.

 

The importer I wrote was able to extract the basic information required  to create FAMIX model (Classes, Namespaces, methods, attributes, invocations, accesses, params).

I think it might also have started to extract Generics but that part might not be complete. I didn't rewrite FAME/FAMIX for C# but used a library to transform FAME/FAMIX in Java to C#.

That meant that I could reuse the meta-model + MSE import/export from existing code. 

 

But I haven't been able to work on it since 6 years now. But if you are interested, you may have a look here at the code here:

 

One day when I get some time I would like to replace Mono.Cecil with Microsoft's parser that has been opensourced since.

 

HTH,

 

regards.

Usman

 

 

 

 

 

 

 

On Thu, Apr 12, 2018 at 12:09 PM, Johan Fabry <Johan@raincode.com> wrote:

Hi all,

And now it looks like I will need to analyze a part of our own code, written in C#. Is there a parser for C# in Moose and if so, how extensive/solid is it?

TIA
--
Johan Fabry,  Senior Software Engineer. 
johan@raincode.com | Email too brief? Here's why! http://emailcharter.org

_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev

 


_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev