[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Lazy re-evaluation (was: More AxiomUI)

From: Page, Bill
Subject: RE: [Axiom-developer] Lazy re-evaluation (was: More AxiomUI)
Date: Thu, 23 Jun 2005 01:24:06 -0400

On Thursday, June 23, 2005 12:51 AM I wrote:

> ...
> So Axiom only has to do the following:
> (1') -> n:=3
>    (1)  3
>                                           Type: PositiveInteger
> (2') -> x:=f(n)
>    (2)  f(3)
>                                           Type: Expression Integer
> (3') -> n:=2
>    (3)  2
>                                           Type: PositiveInteger

Actually I just made a small mistake. In fact line (3) does not
have to be re-executed as such. Since Axiom maintains a history,
all that we need to do is to restore it's value:

(3') -> n := %%(3)

where I have added the primes ' to emphasize that these commands
are being repeated (or as in the case of (3), restored).

Of course in this very simple example there is no significant
difference. But if line (3) happened to involve a very lengthy
calculation, it would be greatly to our advantage that we can
simply restore the value that is consistent with what is now
displayed on the page.

As Bob McElrath stated earlier, in a long and complex calculation,
it would be much better to be able to depend on the fact that the
machine is always going to do just the minimum that is required
in order to ensure that the state of Axiom is consistent with the
sequence of commands on the page. I have also sometimes found
myself in the situation that Bob describes where I seem to be
unable to reproduce a desired result displayed in my worksheet
simply because I have forgotten one critical link in the chain of
dependencies while making some side-attempt to solve some other
apparently unrelated problem. Of course one soon becomes suspicious
of this possibility and probably hits the !!! button to re-execute
the whole worksheet and then goes to lunch while the machine
tediously retraces all of it's steps... it seems a pity that we
have to waste machine resources on something like this.

Bill Page. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]