Hi,

That's possible. As usual apparently, first use your
functions/packages first and issue:

)ltr PACKAGE;mylocalfunc

>From what I understood you need to specify each local function to trace.

Just tested on a personal package. Modified code is (put locally
jlPeakFlops() and comment the export, it is exported otherwise):

Implementation ==> add
        jlPeakFlops : () -> JF64
        jlPeakFlops() == jlEvalString("peakflops()")

        normalize(v : JF64VEC) ==
            vt := copy(v)
            jlPeakFlops()
            jlFunctionF64Vec("normalize!", vt)
            vt

The session with modified package:

(1) -> )lib JRLA
   JuliaRealLinearAlgebra is now explicitly exposed in frame frame1
   JuliaRealLinearAlgebra will be automatically loaded when needed from
      /home/greg/Git/jlfricas/JRLA.NRLIB/JRLA
(1) -> v:=nrand(4)$JF64VEC

   (1)

    -0.9845958110357397
    -1.7483549860195138
    -0.27299052001630286
    -0.583854441867172

(2) -> normalize(v)

   (2)

    -0.4671851701911034
    -0.8295845996325711
    -0.1295324651241532
    -0.2770356462349861

(3) -> )ltr JRLA;jlPeakFlops

   Function traced: JRLA;jlPeakFlops
(3) -> jlPeakFlops()
   There are no library operations named jlPeakFlops
      Use HyperDoc Browse or issue
                                             )what op jlPeakFlops
      to learn if there is any operation containing " jlPeakFlops " in its name.

   Cannot find a no-argument definition or library operation named jlPeakFlops .

(3) -> )tr JRLA

   Function traced: JRLA;jlPeakFlops
   Packages traced:
      JuliaRealLinearAlgebra
   Parameterized constructors traced:
      JRLA
(3) -> normalize(v)
 1<enter JuliaRealLinearAlgebra.normalize,17 : #(-0.9845958110357397
                                                        -1.7483549860195138
                                                        -0.27299052001630286
                                                        -0.583854441867172)
  1<enter JRLA;jlPeakFlops : ...

- Greg


Le ven. 29 nov. 2024 à 14:27, Waldek Hebisch <[email protected]> a écrit :
>
> On Wed, Sep 18, 2024 at 12:02:49PM +0800, Qian Yun wrote:
> > (1) -> )trace INT )local
> >   The )local option has been withdrawn
> >   Use )ltr to trace local functions.
> >
> > But we also have the following in i-syscmd.boot.
> >     ltrace l == trace l
> >
> > So it seems that the ability to trace local functions in spad
> > is not available right now?
>
> Yes, it is not available.
>
> > Maybe we can start by cleaning up those outdated stuff.
>
> Cleaning, yes.  But tracing local functions is desirable and
> AFAICS dispatch machinery works OK.  Simply, we do not have
> an implementation.  We should probably fix misleading message,
> to something like:
>
>   The )local option currently is unimplemented
>
>
> --
>                               Waldek Hebisch
>
> --
> You received this message because you are subscribed to the Google Groups 
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion visit 
> https://groups.google.com/d/msgid/fricas-devel/Z0nBOOD8PTUsPsOA%40fricas.org.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dayqaJErfnBUuJq9YBr77XOdva3XisVykwQeDX7HyiJBQ%40mail.gmail.com.

Reply via email to