Opened 5 years ago
Last modified 5 years ago
#5874 assigned task
Function body dependencies FE or BE? — at Version 2
Reported by: | Karim Adbdelhak | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Frontend | Version: | |
Keywords: | function body | Cc: | Francesco Casella |
Description (last modified by )
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?
EDIT:
This also occurs for FMI models where the interface functions can have dummy inputs.
Change History (2)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Description: | modified (diff) |
---|