5. Options to the Resource Analysis for Hume

This section shortly summarises the main options for the resource analysis. A full discussion is given in the ART3 Manual.

The --help option gives an up-to-date list of all available options.

5.1. List of Options

5.2. Notes on Numeric Potential

As an experimental feature through option --ap, we support potential for numeric values. This means that the potential depends on the actual numeric runtime value, which requires a value range analysis. The included value range analysis is very primitive. It does not work across boxes nor function calls. It is incomplete, which means in particular that it is not safe to use. In order to ensure safety, the user has to investigate that all values that were assigned a positive potential never reach a value below zero at any time during execution. Otherwise the analysis' result is meaningless!

However, the analysis allows the manual insertion of pragmas (signals, see Sction Section 5.3) to help guiding the value range analysis. Signal 9000 can be used to deny potential to an expression of a numeric type. This is always safe to do, so numeric variables, especially function arguments, which cannot be expected to be non-negative. The disadvantage is of course, that the analysis may not succeed anymore due to super-linear costs.

Signals 6000 and 7000 can be used to manually set the bounds for a numeric type. This should be done very carefully, as the validity of the result depends on the correctness of the specified bounds. Note that a numeric value with a negative lower bound can never be assigned any potential, hence a negative value attached to signal 6000 or 7000 will automatically trigger 9000.

Another pitfall lies in increasing the upper bound for a value that already has potential assigned to it, for an increase in value would mean an unjustified increase in potential, rendering the entire analysis useless. However, the analysis will allow it and issue a warning in this case. This can again be avoided by first sending the signal 9000, i.e. <>7000,"45.5"<><>9000,"nopot"<>.

5.3. Signals

Signals are expressions within the Schopenhauer sourecode, which may influence the analysis. A signal is always written in this manner: <>code;string<>expression A signal must always precede a normal art3-expression and comes into effect before and/or after the expression it is bound to is examined by the analysis.

A table of available signals, together with examples of their use, is given in the ART3 Manual.