Opened 8 years ago

Closed 3 years ago

#4363 closed defect (duplicate)

Properly fix handling of Clocks the front-end, back-end and codegen

Reported by: adrpo Owned by: lochel
Priority: high Milestone: 1.19.0
Component: Backend Version:
Keywords: Cc: rfranke, sjoelund.se, lochel, bthiele

Description

See PR:
https://github.com/OpenModelica/OMCompiler/pull/1574

Currently we force in the front-end:

  • evaluation of solverMethod in Clock (Static.mo)
  • vectorization of clock operators (Static.mo)

because:

  • back-end does not evaluate the solverMethod
  • the C++ runtime does not support non-vectorized clock operators

This ticket is for fixing these issues:

  1. revert PR https://github.com/OpenModelica/OMCompiler/pull/1574
  2. implement evaluation of clocks in SynchronousFeatures.resolveClocks
  3. add proper support for non-vectorized clocked operators in the C++ runtime

Change History (4)

comment:1 Changed 8 years ago by adrpo

@sjoelund.se: are you sure we don't need vectorization of clock operators in the fron-end? As far as I can tell the specification says that interval takes a clock not an expression.

comment:2 Changed 8 years ago by sjoelund.se

For interval:

This operator returns the interval between the previous and present tick of the clock of the expression, in which this operator is called and the clock of the optional argument u.

u can be an array, but interval always returns a Real value, never an array. Bernhard read the specification wrong and implemented the operators to vectorize for clocked expressions.

A possible fix to be more similar to what we had before would be to add Evaluate=true to the solverMethod input argument and adapt the frontend to evaluate this input although I would prefer the backend since the frontend cannot always evaluate expressions.

comment:3 Changed 8 years ago by bthiele

After discussing it with Martin I created a Modelica ticket for discussing/clarifying this issue (https://trac.modelica.org/Modelica/ticket/2161).

comment:4 Changed 3 years ago by casella

  • Milestone changed from Future to 1.19.0
  • Resolution set to duplicate
  • Status changed from new to closed

Mostly obsolete, can be considered as a duplicate of https://github.com/OpenModelica/OpenModelica/issues/7854.

See also GitHub ticket https://github.com/OpenModelica/OpenModelica/issues/4363

Note: See TracTickets for help on using tickets.