(.js)
laraImport("antarex.memoi.MemoizationAutoAspects");
(.lara)
import antarex.memoi.MemoizationAutoAspects;
It builts the Static Call Graph of the application in a global variable callGraph.
And in case of a reference to a known pure function, the information is stored in the
global variable memoiFunctions["pure finction"] = STATE.YES that expresses
that the pure fonction is memoizable.
Memoizes the elements of the array memoiFuncs with the default parameters.
Returns in memoizableFunctions the detected memoizable functions (excluding the math functions).
Search the memoizable functions of the application.
The status of a function for the memoization is stored in a global array ( memoiFunctions ).
For a function F of a file FILENAME, memoiFunctions[getidfunction( F, FILENAME)] = V,
where getidfunction(x,y) is a function that guarantees the of the reference.
- V =STATE.YES => F is memoizable
- V =STATE.NO => F is not memoizable
- V =STATE.UNDEF => the status of F is undefined
- V =STATE.VISITED => internal used (for recursivity detection).
The inline function are ignored.
Prints the detected memoizable functions/methods, elements of the input parameter.