[Soot-list] SPARK call graph generation

Bernhard Berger berber at tzi.de
Tue May 9 04:06:30 EDT 2017


Hi Upulee,

how do you generate the call graph? Normally Soot expects a static main-method to work correctly. Using non-static entry points has showed to result ins troubles: https://mailman.cs.mcgill.ca/pipermail/soot-list/2013-January/005105.html <https://mailman.cs.mcgill.ca/pipermail/soot-list/2013-January/005105.html>

Regards, Bernhard

> Am 08.05.2017 um 23:37 schrieb Upulee Kanewala <upuleegk at gmail.com <mailto:upuleegk at gmail.com>>:
> 
> 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 <http://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
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170509/c564eec1/attachment.html>


More information about the Soot-list mailing list