Opened 6 years ago
Last modified 6 years ago
#5601 new defect
Analyse impact: removeEqualFunctionCalls and avoid as tearing variable — at Version 1
| Reported by: | Vitalij Ruge | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | Future |
| Component: | Backend | Version: | |
| Keywords: | Cc: | Karim Adbdelhak, Andreas Heuermann, Francesco Casella |
Description (last modified by )
removeEqualFunctionCalls can replace
f(x,y) with a where f(x,y) is a expression depending from x,y (if a=f(x,y)).
In some cases x,y can have start values. but a doesn't.
One idea is to avoid a in tearing select, like start-attribute is used to prefer a variable (see #5458).
Maybe this should be done only for initialization.
Change History (1)
comment:1 by , 6 years ago
| Description: | modified (diff) |
|---|---|
| Summary: | Analayse impact: removeEqualFunctionCalls and avoid as tearing variable → Analyse impact: removeEqualFunctionCalls and avoid as tearing variable |
Note:
See TracTickets
for help on using tickets.

Replying to vitalij:
Sounds like a good idea.
In fact, I wonder if this additional strategy is actually bringing some advantage. If there is one equation
a=expr(x,y), wherexandyhave start attributes andadoesn't, ifxandyget selected as tearing variables, I guess any sensible tearing heuristics will selectaas torn variable.However, it may be the case that, e.g.,
xis finally selected as tearing variable, butyis not, so it will be computed by some torn equation. In this case, I understand it would be a good idea to avoid selectingaas tearing variable, so that it will also by the torn equationa := expr(x,y), avoiding issues due to the missing start attribute.In principle I agree, since initialization issues are mostly relevant during initialization, though they can also arise after discontinuities generated at events. I'm not sure if there are cases where avoiding this rule for regular equations brings any other significant advantage.