Call graph

10 views
Skip to first unread message

Svend Sørensen

unread,
Jul 19, 2021, 4:18:58 PM7/19/21
to yacas
I would like to make a call graph for all functions defined in the
Yacas scripting language.

ex. this function Outer.

// outer product of vectors
Outer(t1_IsVector, t2_IsVector) <--
[
   Local(i,j,n,m,result);
   n:=Length(t1);
   m:=Length(t2);
   result:=ZeroMatrix(n,m);
   For(i:=1,i<=n,i++)
      For(j:=1,j<=m,j++)
         result[i][j]:=t1[i]*t2[j];
   result;
];

would result in the string:

"Outer Local Length ZeroMatrix For := <= ++ *"

A tab separated list of functions names, with the current function first.

How do I best approach this task?

Has anybody done something similar?.. (I don't want to do repeat work).

I assume, I have to get hold of the script parser, or the evaluator code, and work from there. Am I wrong in this assumption?

Reply all
Reply to author
Forward
0 new messages