View Issue Details

IDProjectCategoryView StatusLast Update
0000568ascendcompilerpublic2013-02-21 00:49
Assigned To 
Status newResolutionopen 
Product VersionSVN 
Target Version1.0Fixed in Version 
Summary0000568: If the statements inside a compound statement (e.g. a FOR loop) depend one on another, they are not executed.
DescriptionFor example:

FOR i IN [1..n] CREATE
x[i] IS_A solver_var;
z[i] ALIASES x[i];

In this example, CheckFOR returns 0 because x[i] is not defined yet and the ALIASES statement can't be executed, so neither of the two statements is executed and x[i] stays undefined. So FOR is never executed.

As Ben wrote, the problem is that our bitlist for instantiator statement execution does not handle compound statements well.
TagsNo tags attached.




2012-11-09 20:42

developer   ~0000929

I have thought about creating a bitlist for each iteration of the loop, but for large nested loops such bitlists require much memory. I think it can be avoided by creating only two bitlists for each compound statement: one has the same meaning as the usual bitlist of the model, and the other indicates if the statement has been changed in this loop (if it is contained in the loop statement list). This idea will work only if the following assumption is true: if a statement can't be executed in one iteration of the loop, it won't be executed in others, and vice versa. I have thought about different models and it seems to me that it is always true.

I have tried storing bitlists in statement structs, but I have come to a conclusion that this won't work for models containing arrays of models. So now I suppose that it is better to store the bitlists it models, not statements.

Issue History

Date Modified Username Field Change
2012-10-19 19:19 Ksenija New Issue
2012-10-21 18:29 svn
2012-10-28 01:49 svn
2012-11-09 20:42 Ksenija Note Added: 0000929
2012-11-30 20:12 svn
2012-12-29 19:04 svn
2013-02-21 00:49 svn