ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("antarex.memoi.MemoizationAutoAspects");

(.lara)
import antarex.memoi.MemoizationAutoAspects;

Aspects

BuildStaticCallGraph

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.



MemoizeElements

Memoizes the elements of the array memoiFuncs with the default parameters.


Inputs

memoiFuncs.: string[] - An element is a string Filename%Line.
memoiFuncs: any

findMemoizables

Returns in memoizableFunctions the detected memoizable functions (excluding the math functions).


Inputs

memoizableFunctions,: string[] - the set of the detected memoizable functions encoded by Filename%Line.

Outputs

memoizableFunctions: any (optional)

findmemoizable_fpstep

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.



printMemoizables

Prints the detected memoizable functions/methods, elements of the input parameter.


Inputs

memoiFuncs.: string[] - An element is a string Filename%Line.
memoiFuncs: any