[groovy-dev] Groovy as the script engine in a powerfull java math language

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[groovy-dev] Groovy as the script engine in a powerfull java math language

Raphaël Valyi
purpose: I'm looking for people who may help to replace a script engine by Groovy in a existing java math language


I would like to suggest using Groovy in a powerfull math programming language very handy to plot, handle fractals, nonlinear dynamics...
The framework I'm talking about is called Fractal Aid (FrAid): <a href="http://fraid.sf.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://fraid.sf.net  .Until now, FrAid has got its own script engine with keywords linked against a full set of usefull mathematical functions just like GNU Octave or Matlab.

I'm not a developper of FrAid but I use it in an other framework dedicated to ecology and economics ecology: EmSim <a href="http://emsim.sf.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://emsim.sf.net
But I'm very sure that using Groovy as the sript interpreter will definitely turn FrAid a ground breaking java math framework.

Here is what I expect from using Groovy instead:
- lighter and more efficient interpreter
- bug corrections
- all extra features from Groovy
- more standard API which may increase the development of FrAid
- more modularity: when a program will invoke Groovy it may mix maths and java and make scripts to alter every objects, including dynamically.
- more reuse

My own framework (EmSim) is actually a diagram editor. Once a feature rich diagram is created, its graph topology (based on JGraph) and graph cell user objects generates a script. Currently interpreting the script only result in plotting curves. But I' m currently extending the possiblities and in the future I would like those script to be able to change the diagram itself or even produce java code. This might turn it a very powerfull java application subclassable in things like UML to XMI/java IDE, genetic algoritms on objects and so on... So replacing the script interpreter is just a step toward that direction.

What to do:
I think this is only a matter of replacing the classes dedicated to the script parser and interpreter and to update the keywords links in order Groovy invoke the math functions correctly. I first thought about using Beanshell, but Groovy is better suited because it supports non java syntax for scripting, just as FrAid does. Also notice that FrAid handle complex numbers. I there a way to plug that behavior into Groovy also? Please if you are interrested in helping or using such a framework email me or reply to the list. Thanks,

Raphael Valyi