[Soot-list] SPARK call graph generation

Upulee Kanewala upuleegk at gmail.com
Mon May 8 17:37:21 EDT 2017


Hello all,

I am using SPARK to generate the call graph for a method from JScience
listed below. The generated call graph only has the following three nodes
and the edges:

solve -> StringBuilder:<init>
solve -> DimentionException:<init>
DimentionException:<init> -> RunTimeException:<init>

What is the reason for missing the other method calls in the solve()
method. Am I missing an option that is causing this? (I followed the
examples in the survivor's guide to write my code).


 /**
     * Returns the solution X of the equation: A * X = B  with
     * <code>this = A.lu()</code> using back and forward substitutions.
     *
     * @param  B the input matrix.
     * @return the solution X = (1 / A) * B.
     * @throws DimensionException if the dimensions do not match.
     */
    public DenseMatrix<F> solve(Matrix<F> B) {
        if (_n != B.getNumberOfRows())
            throw new DimensionException("Input vector has "
                    + B.getNumberOfRows() + " rows instead of " + _n);

        // Copies B with pivoting.
        final int n = B.getNumberOfColumns();
        DenseMatrix<F> X = createNullDenseMatrix(_n, n);
        for (int i = 0; i < _n; i++) {
            for (int j = 0; j < n; j++) {
                X.set(i, j, B.get(_pivots.get(i).intValue(), j));
            }
        }

        // Solves L * Y = pivot(B)
        for (int k = 0; k < _n; k++) {
            for (int i = k + 1; i < _n; i++) {
                F luik = _LU.get(i, k);
                for (int j = 0; j < n; j++) {
                    X.set(i, j, X.get(i, j).plus(
                            luik.times(X.get(k, j).opposite())));
                }
            }
        }

        // Solves U * X = Y;
        for (int k = _n - 1; k >= 0; k--) {
            for (int j = 0; j < n; j++) {
                X.set(k, j, (_LU.get(k, k).inverse()).times(X.get(k, j)));
            }
            for (int i = 0; i < k; i++) {
                F luik = _LU.get(i, k);
                for (int j = 0; j < n; j++) {
                    X.set(i, j, X.get(i, j).plus(
                            luik.times(X.get(k, j).opposite())));
                }
            }
        }
        return X;
    }


Thanks,
- Upulee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170508/bffde6e9/attachment.html>


More information about the Soot-list mailing list