Opened 6 years ago
Last modified 6 years ago
#4633 new enhancement
[MetaModelica] skip cases for partial matches
Reported by: | hkiel | Owned by: | sjoelund.se |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | MetaModelica | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: | sjoelund.se |
Description
There are many match expressions with multiple arguments in OMCompiler.
Take ExpressionSimplify.simplifyBinary2() as an example: the second argument is the operator of a binary expression. There are many cases with DAE.ADD, DAE.SUB, DAE.MUL, DAE.DIV, etc. cluttered in the cases. If this first expression matches, the match-iterator could be advanced to the next case that matches this part as well.
I guess a partial match on the first argument only would even be better (given that some match arguments are re-ordered) than the full match.