Opened 5 years ago

Last modified 5 years ago

#5874 assigned task

Function body dependencies FE or BE? — at Initial Version

Reported by: Karim Adbdelhak Owned by: somebody
Priority: high Milestone: Future
Component: Frontend Version:
Keywords: function body Cc: Francesco Casella

Description

Consider following function and its derivative:

function f
  input x;
  input dx;
  output y;
algorithm
  y := x;
annotation (
    derivative = fd,
    Inline=false);
end f;
function df
  input x;
  input dx;
  output y;
algorithm
  y := dx;
end df;

The function call has following structure in the Frontend:

  record CALL
    Absyn.Path path;
    list<Exp> expLst;
    CallAttributes attr;
  end CALL;

And the expLst contains all inputs such that they will be used for any dependency analysis needed. As we see both functions have inputs they do not actually depend on so that leads to different problems, such as thae one mentioned in #5770. In the Backend we would need to get the actual function body from the function tree and traverse it, i would like to have them collected once and always available.

Can that information be provided by the Frontend when the function tree is built?

Change History (0)

Note: See TracTickets for help on using tickets.