I am working on a problem statement involving adding some transformation to the EA models based on mathematical computations.
I am trying to achieve these transformations on EA models via a script using the jArchi scripting plugin version 1.2.0. and the version of Archi I am using is 4.9.3. And I am also using JDK 11 with HotSpot JVM from Eclipse Adoptium (previously, AdoptOpenJDK ), which ships with the Nashorn scripting engine.
Now, I know that we can use external libraries like PapaParse using
load(__DIR__ + "lib/papaparse.min.js");
which works fine, but when I try to add a library like
load(__DIR__ + "lib/math.min.js");
the scripts fail to execute because of the Nashorn scripting engine.
After reading the documentation, I understood that the engine shipped with the JDK does not support all features of ES6 and has full support until ES 5.1. The documentation for the engine says it supports scopes like let
, but when I run the script from the plugin, it fails. Also, the arrow function expressions commonly used in the foreach
loop of JS are not working because of the lack of support from the JS engine.
With the above background information out of the way, I have the following questions,
- What JS libraries are supported by the jArchi plugin?
- Is math processing, especially matrix multiplication, possible inside a script?
- What would be a viable solution for use cases involving matrix computations for EA models?
Try it with the GraalVM engine which has been present in jArchi for some time. Just select that engine in Archi's preferences.