Opened 15 years ago

Last modified 15 years ago

#1221 closed defect (fixed)

Equality constraint functions calls are not properly tagged with inline information

Reported by: Peter Aronsson Owned by: Peter Aronsson
Priority: blocker Milestone:
Component: Version:
Keywords: Cc: Peter Aronsson, Adrian Pop

Description

Inst.mo near line 13925 reads:
{{{ breakDAEElements =

{DAE.EQUATION(zeroVector,

DAE.CALL(fpath1,{DAE.CREF(c1_1, DAE.ET_OTHER()), DAE.CREF(c2_1, DAE.ET_OTHER())},

false, false, DAE.ET_REAL(), DAE.NO_INLINE()),

source set the origin of the element
)};}}}

The problem is that the call is set with DAE.NO_INLINE(). But that is not neccesarily true. if the 'fpath1' function has annotation(Inline=true) which it normally does, this must bereflected in the call, otherwise inlining won't work.

There are two solutions as I see it:

  1. extend the DAE.EqualityConstraint to   Option<tuple<Absyn.Path, Integer,InlineType>>
  1. Add a lookup of fpath1 just above in the code to find out the inlinetype.


I propose solution 1, since that is the most effective and won't slow things down with another lookup call.


A good testcase for this is  fourbar1 model, since it requires the equalityConstraint function.

Change History (2)

comment:1 by Adrian Pop, 15 years ago

Solution 2 would be OK as this case is ONLY selected if you
connect overconstrained types, which doesn't happen very often.

I'll implement solution 2 for now.

comment:2 by Adrian Pop, 15 years ago

fixed in revision 5470 combined with the fix in 5468. Solution 1 was implemented.

Note: See TracTickets for help on using tickets.