Opened 5 years ago

Closed 5 years ago

#5980 closed defect (fixed)

OMC Spins forever if components are mutally recursive

Reported by: John Tinnerholm Owned by: John Tinnerholm
Priority: critical Milestone: 1.16.0
Component: MetaModelica Version: v1.16.0-dev
Keywords: package, components, recursion Cc:

Description

Code like:

package UT
  constant Real CONST1 = CONST2 * 3;
  constant Real CONST2 = CONST1 + 3;
  function f
    output Real ro;
  algorithm
    ro := CONST1 + CONST2;
  end f;
end UT;

Results in the omc spinning forever if it is used with the -g=MetaModelica flag

Change History (4)

comment:1 by Philip Hannebohm, 5 years ago

Should omc detect a circular dependency and fail, or actually try to solve the linear system?
Never mind, I just saw ticket #5979 so I guess it should fail with error message.

Last edited 5 years ago by Philip Hannebohm (previous) (diff)

comment:2 by Francesco Casella, 5 years ago

See the Modelica Specification, Sect. 4.4.3

in reply to:  2 comment:3 by Philip Hannebohm, 5 years ago

Replying to casella:

See the Modelica Specification, Sect. 4.4.3

Thanks for the reference!

comment:4 by John Tinnerholm, 5 years ago

Milestone: Future1.16.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.