> 
> (1) -> t := sqrt (2* sqrt(a^4));
> 
> (2) -> # tower sqrt(t*t*t)
> 
>    (2)  4
> 
> (3) -> )compile manip.spad
> -- or compile any other spad file
> 
> (3) -> # tower sqrt(t*t*t)
> 
>    (3)  3
> 
> 
> I use '#' to make output shorter.  As you can see, after
> compiling a file, the output of "tower" changes!
> 
> This is pretty serious. Is this a known behaviour?

Yes.  ')compile' replaces old kernel cache by new one
(it has to because after compile potentially all
constructors are invalid).  In effect all kernels
stored in variables are invalid.  Arguably ')compile'
should clear all interpreter variables.  I guess that
original authors decided that most variables remain
valid and users using ')compile' can recompute ones
which became invalid.  OTOH user normally have no
way to invalidate cached constructors (beside recompiling
the conctructor, but this is time consuming and
require knowledge of dependencies), so ')compile'
invalidates them all.  Smarter ')compile' could
track dependencies and try to invalidate only
minimal set of constructors, but this is tricky
to implements.

-- 
                              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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to