Opened 14 years ago

Last modified 3 years ago

#1348 closed task

Implement non-expanded arrays and for-loops in the front-end — at Version 3

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: 1.19.0
Component: Frontend Version:
Keywords: Cc: Volker Waurich, Adrian Pop, Per Östlund

Description (last modified by Adrian Pop)

This task will cover the implementation of non-expanded arrays and for-loops in the compiler:

  • do not expand arrays and for loops during flattening
  • the arrays and for loops could be expanded between front-end and back-end if the back-end cannot handle them yet

Change History (3)

comment:1 by AlexeyLebedev, 14 years ago

I have added a test case (mofiles/NonExpArray1.mo) to sjoelunf-functiontree branch.

The dimensions of non-expanded arrays variables are represented in flat Modelica as 1:dim because they are represented in DAE.VAR as SLICE(RANGE(1:NONE():dim)) at the moment. This will probably be changed in the future, so the test case result will also change.

Unfortunately, it is not possible yet to have something like
{{{parameter Integer p;
Real x[p] = zeros(p);}}}

because expressions like zeros(p) can not be represented by Values.Value - Values.ARRAY can only represent an array of known dimension.

comment:2 by Henning Kiel, 10 years ago

Component: Backend
Milestone: White December1.9.3

comment:3 by Adrian Pop, 10 years ago

Cc: Volker Waurich added; AlexeyLebedev krsta removed
Component: BackendFrontend
Description: modified (diff)
Status: newaccepted
Summary: Implement non-expanded array objects in the compilerImplement non-expanded arrays and for-loops in the front-end
Note: See TracTickets for help on using tickets.