Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1827 closed defect (fixed)

BackendDAE cannot represent NORETCALL equations

Reported by: sjoelund.se Owned by: somebody
Priority: high Milestone: 1.9.0
Component: Backend Version:
Keywords: Cc: jfrenkel, wbraun, sjoelund.se

Description

From: https://openmodelica.org/index.php?option=com_agora&task=topic&id=716&Itemid=87

BackendDAE cannot represent NORETCALL equations, which means I have no easy way to make the following code run :( We seem to store assert, terminate, etc on the side of the assertion. That might be possible here as well, I don't know these things...

model M
  Integer i;
equation
  when sample(0,0.1) then
    Modelica.Utilities.Streams.print("printing at time: " + String(time));
    i = pre(i) + 1;
  end when;
end M;

Change History (3)

comment:1 Changed 12 years ago by jfrenkel

added support for it in r13351 with example testsuite/mosfiles/WhenNoRetCall

Example does not work because

undefined reference to `Modelica_Utilities_Streams_print'

comment:2 Changed 12 years ago by jfrenkel

  • Cc sjoelund.se added
  • Resolution set to fixed
  • Status changed from new to closed
  • works in r13361, maybe EQ_NORETCALL needs information about buildin function

comment:3 Changed 12 years ago by sjoelund.se

Like this:

record STMT_NORETCALL
  Exp exp;
  ElementSource source "the origin of the component/equation/algorithm";
end STMT_NORETCALL;

Then you can inline it, too :p

Note: See TracTickets for help on using tickets.