freeof...



About freeof... it was, I think,
originally intended to be the purely syntactic
version of depending on one or more variables.

Without looking at free/bound variables etc.

That is, freeof(x,exp) simply looked at exp as
a lisp expression and searched for $x  anywhere in it.

It was intended for  matching   a*x^2+b*x+c   where
a,b,c  were free of x.

We could implement it and explain it that way,  and
then have some other program  depends_on ??  that
does the more complicated dependency analysis here..

RJf


  Robert Dodier wrote:

> Hi Stavros,
> 
> about the freeof function -- it doesn't seem to handle block yet.
> 
> 
> 
>>Also fixes 1079508 (correctly).
> 
> 
>>	((and (eq (caar e) 'mblock) ($listp (cadr e)))
> 
> 
> The first test wants to be (or (eq (caar e) 'mprog) (eq (caar e)
> 'mprogn)), right? mblock isn't the atom which marks block(...)
> and (...) objects.
> 
> 
>>	 (mapand (lambda (binding)
>>		   (if (atom binding)
>>		       (eq binding var)
>>		     (and (eq (caar binding) 'msetq)
>>			  (eq (cadr binding) var))))
>>		 (cadr e)))
> 
> 
> The last bit wants to be (cdadr e) I think -- as it stands
> it yields an error "MLIST is not a LIST".
> 
> After making those 2 changes, I get 
> freeof (x, 'block([x], x)) => T,  OK
> but freeof (x, y, 'block([x,y], x*y)) => F, ?? That doesn't seem right.
> Also freeof (x, 'block([y,x], y*x)) => F,  
> that doesn't seem right either.
> 
> For what it's worth,
> Robert Dodier
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard. 
> http://promotions.yahoo.com/new_mail 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima