Opened 14 years ago

Closed 3 years ago

Last modified 3 years ago

#1348 closed task (fixed)

Implement non-expanded arrays and for-loops in the front-end

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 (15)

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

comment:4 by Adrian Pop, 10 years ago

Priority: lowhigh

comment:5 by Volker Waurich, 10 years ago

Hi,
are there any plans to start the implementation for that in the near future?

comment:6 by Adrian Pop, 10 years ago

Already in progress for the new front-end. Hopefully we'll have something that can be used soon.

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:10 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:11 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:12 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

comment:13 by Per Östlund, 3 years ago

Resolution: fixed
Status: acceptedclosed

The new frontend only expands arrays and for-loops after flattening, and with -d=-nfScalarize it doesn't expand them at all. So I guess we can close this ticket.

comment:14 by Per Östlund, 3 years ago

Milestone: Future1.18.0

comment:15 by Francesco Casella, 3 years ago

Milestone: 1.18.01.19.0
Note: See TracTickets for help on using tickets.