How to specific arbitrary values in a MSE file?

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

How to specific arbitrary values in a MSE file?

abergel
Hi!

Imagine I am parsing JavaScript code, and I am computing some metrics at the same time I am parsing the JavaScript. How can I embed these metrics values in the .MSE file?
I remember the inFusion crew did this in iPlasma.

By the way, is there a JavaScript -> MSE somewhere? Nobody has worked on this?

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




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

Re: How to specific arbitrary values in a MSE file?

Tudor Girba-2
Hi Alex,

Any property that you put in MSE will be stored in a dictionary of the entity if you do not already have meta-descriptions for it.

Doru


On Thu, Sep 25, 2014 at 9:15 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

Imagine I am parsing JavaScript code, and I am computing some metrics at the same time I am parsing the JavaScript. How can I embed these metrics values in the .MSE file?
I remember the inFusion crew did this in iPlasma.

By the way, is there a JavaScript -> MSE somewhere? Nobody has worked on this?

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




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



--

"Every thing has its own flow"

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

Re: How to specific arbitrary values in a MSE file?

abergel
Thanks!
That’s work pretty well!

I have created an MSE file:
=-=-=-==-=-=-==-=-=-=
(
(FAMIX.Function (id: 1)
(name 'helloWorld')
(myGreatMetric 10))
)
=-=-=-==-=-=-==-=-=-=

Once loaded, I can do when inspecting the moose model:
self allFunctions anyOne propertyNamed: ‘myGreatMetric'
=> 10

Leonardo, I am convinced that you should do the MSE way instead of exporting your JavaScript code to JSON and then importing them within Moose. This is way too much work.
You can compute the metrics you need in JavaScript (e.g., doing the computation on the AST using Esprima), and then putting everything in the MSE file.

Let us know how it goes!

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



On Sep 25, 2014, at 4:46 PM, Tudor Girba <[hidden email]> wrote:

Hi Alex,

Any property that you put in MSE will be stored in a dictionary of the entity if you do not already have meta-descriptions for it.

Doru


On Thu, Sep 25, 2014 at 9:15 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

Imagine I am parsing JavaScript code, and I am computing some metrics at the same time I am parsing the JavaScript. How can I embed these metrics values in the .MSE file?
I remember the inFusion crew did this in iPlasma.

By the way, is there a JavaScript -> MSE somewhere? Nobody has worked on this?

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




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



--

"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


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