Opened 17 years ago
Closed 17 years ago
#525 closed defect (fixed)
Problem with Series Lazy Evaluation
Reported by: | Christian Paz | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | TimeSetAlgebra | Version: | 1.1.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
I had an error inmersed into a estimation system that brings an unexpected error the first time compiled, and the second time the error did not happen.
Then, I discovered that when series are not "forced" to exist, the same code can result in different values. For example:
Code to change dating and getting the last not null date of the transformed serie
Serie um_diario = SubSer(Rand(0,1, Diario), y2006m01, y2007m02 );
Serie um=Do(DatCh(um_diario, Semanal, SumS));
Date x=Last(um);
Matrix OOO = SerMat(um);
Serie dos = MatSerSet(OOO, Dating(um), First(um))[1];
Date y=Last(um);
Text If(x!=y, WriteLn("Last was "+FormatDate(x)+" and now it is "+FormatDate(y)));
I expected x==y because um did not change in the middle of these two sentences.
Even TOL is Lazy, the moment when I do a "Last", the serie should be evaluated. Also see that in um creation a Do sentence is used.
Thanks in advance.
Christian
Change History (3)
comment:1 Changed 17 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:2 Changed 17 years ago by
Status: | new → assigned |
---|
comment:3 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Sorry, problem was solved som weeks ago bu I didn't remember to notify here
I've tested the code with old versions and it worked as you are expecting until version TOL 1.1.3 and has the observed behaviour on 1.1.6 from 1.1.4
I will see if it's possible to recover old version way.
Thanks to report it