Skip to content

Commit f97adf5

Browse files
committed
Introduce new MetaModelica language feature: dot-access of as-bound records
- See new testcase testsuite/metamodelica/meta/MatchDotNotation.mos - Some compiler sources were updated because you may no longer update some as-bound variables (like: `case x as REAL(_); equation x = INT(1);`) ''If you are still using rml-mmc, you will need to update to mm:r272'' git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19633 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent ee6618f commit f97adf5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+672
-550
lines changed

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -520,18 +520,18 @@ algorithm
520520
matchcontinue (inElements, functionTree, inVars, inKnVars, inExVars, inEqnsLst)
521521
local
522522
list<DAE.Element> rest, newVars;
523-
DAE.Element elem;
523+
DAE.Element elem,var;
524524
DAE.Type tp, arrtp;
525525
DAE.ComponentRef cref;
526526
list<DAE.ComponentRef> crefs;
527527
BackendDAE.Variables vars, knvars, exvars;
528528
list<BackendDAE.Equation> eqns;
529529
String str;
530530
case ({}, _, _, _, _, _) then (inVars, inKnVars, inExVars, inEqnsLst);
531-
case ((elem as DAE.VAR(componentRef = cref, ty = tp as DAE.T_ARRAY(ty = arrtp)))::rest, _, _, _, _, _)
531+
case ((var as DAE.VAR(componentRef = cref, ty = tp as DAE.T_ARRAY(ty = arrtp)))::rest, _, _, _, _, _)
532532
equation
533533
crefs = ComponentReference.expandCref(cref, false);
534-
elem = DAEUtil.replaceTypeInVar(arrtp, elem);
534+
elem = DAEUtil.replaceTypeInVar(arrtp, var);
535535
newVars = List.map1(crefs, DAEUtil.replaceCrefInVar, elem);
536536
(vars, knvars, exvars, eqns) = lowerVars(newVars, functionTree, inVars, inKnVars, inExVars, inEqnsLst);
537537
//(vars, knvars, exvars, eqns, _) = lowerVar(elem, functionTree, vars, knvars, exvars, eqns, HashTableExpToExp.emptyHashTable());
@@ -1168,7 +1168,7 @@ protected function lowerEqn
11681168
algorithm
11691169
(outEquations,outREquations,outIEquations) := match (inElement,functionTree,inEquations,inREquations,inIEquations)
11701170
local
1171-
DAE.Exp e1, e2, cond, msg, level;
1171+
DAE.Exp e1, e1_1, e2, e2_1, cond, msg, level;
11721172
DAE.ComponentRef cr1, cr2;
11731173
DAE.ElementSource source;
11741174
Boolean b1;
@@ -1198,30 +1198,30 @@ algorithm
11981198

11991199
case(DAE.EQUATION(DAE.TUPLE(explst),e2 as DAE.CALL(path =_),source),_,_,_,_)
12001200
equation
1201-
(DAE.EQUALITY_EXPS(e1,e2), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1202-
eqns = lowerExtendedRecordEqn(DAE.TUPLE(explst),e2,source,functionTree,inEquations);
1201+
(DAE.EQUALITY_EXPS(e1,e2_1), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1202+
eqns = lowerExtendedRecordEqn(DAE.TUPLE(explst),e2_1,source,functionTree,inEquations);
12031203
then
12041204
(eqns,inREquations,inIEquations);
12051205

12061206
case(DAE.EQUATION(e2 as DAE.CALL(path =_),DAE.TUPLE(explst),source),_,_,_,_)
12071207
equation
1208-
(DAE.EQUALITY_EXPS(e1,e2), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1209-
eqns = lowerExtendedRecordEqn(e1,e2,source,functionTree,inEquations);
1208+
(DAE.EQUALITY_EXPS(e1,e2_1), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1209+
eqns = lowerExtendedRecordEqn(e1,e2_1,source,functionTree,inEquations);
12101210
then
12111211
(eqns,inREquations,inIEquations);
12121212

12131213
// Only succeds for initial tuple equations, i.e. (a,b,c) = foo(x,y,z) or foo(x,y,z) = (a,b,c)
12141214
case(DAE.INITIALEQUATION(DAE.TUPLE(explst),e2 as DAE.CALL(path =_),source),_,_,_,_)
12151215
equation
1216-
(DAE.EQUALITY_EXPS(e1,e2), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1217-
eqns = lowerExtendedRecordEqn(e1,e2,source,functionTree,inIEquations);
1216+
(DAE.EQUALITY_EXPS(e1,e2_1), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1217+
eqns = lowerExtendedRecordEqn(e1,e2_1,source,functionTree,inIEquations);
12181218
then
12191219
(inEquations,inREquations,eqns);
12201220

12211221
case(DAE.INITIALEQUATION(e2 as DAE.CALL(path =_),DAE.TUPLE(explst),source),_,_,_,_)
12221222
equation
1223-
(DAE.EQUALITY_EXPS(e1,e2), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1224-
eqns = lowerExtendedRecordEqn(e1,e2,source,functionTree,inIEquations);
1223+
(DAE.EQUALITY_EXPS(e1,e2_1), source) = Inline.simplifyAndForceInlineEquationExp(DAE.EQUALITY_EXPS(DAE.TUPLE(explst),e2), (SOME(functionTree), {DAE.NORM_INLINE(), DAE.NO_INLINE()}), source);
1224+
eqns = lowerExtendedRecordEqn(e1,e2_1,source,functionTree,inIEquations);
12251225
then
12261226
(inEquations,inREquations,eqns);
12271227

@@ -1277,9 +1277,9 @@ algorithm
12771277
case (DAE.ARRAY_EQUATION(dimension=dims, exp = e1 as DAE.ARRAY(array={}),array = e2 as DAE.CALL(path=path),source = source),_,_,_,_)
12781278
equation
12791279
b1 = stringEq(Absyn.pathLastIdent(path),"equalityConstraint");
1280-
(DAE.EQUALITY_EXPS(e1,e2), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(e1,e2), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1280+
(DAE.EQUALITY_EXPS(e1_1,e2_1), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(e1,e2), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
12811281
eqns = Util.if_(b1,inREquations,inEquations);
1282-
eqns = lowerArrayEqn(dims,e1,e2,source,eqns);
1282+
eqns = lowerArrayEqn(dims,e1_1,e2_1,source,eqns);
12831283
((eqns,reqns)) = Util.if_(b1,(inEquations,eqns),(eqns,inREquations));
12841284
then
12851285
(eqns,inREquations,inIEquations);
@@ -1857,30 +1857,30 @@ algorithm
18571857

18581858
case (DAE.EQUATION(exp = cre as DAE.TUPLE(PR=expl), scalar = e, source = source)::xs, _, _, _, _)
18591859
equation
1860-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1860+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
18611861
eqnl = lowerWhenTupleEqn(expl, inCond, e, source, 1, iEquationLst);
18621862
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, eqnl, iReinitStatementLst);
18631863
then
18641864
(eqnl, reinit);
18651865

18661866
case (DAE.EQUATION(exp = (cre as DAE.CREF(componentRef = cr)), scalar = e, source = source)::xs, _, _, _, _)
18671867
equation
1868-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1868+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
18691869
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, BackendDAE.WHEN_EQUATION(1, BackendDAE.WHEN_EQ(inCond, cr, e, NONE()), source)::iEquationLst, iReinitStatementLst);
18701870
then
18711871
(eqnl, reinit);
18721872

18731873
case (DAE.COMPLEX_EQUATION(lhs = (cre as DAE.CREF(componentRef = cr)), rhs = e, source = source)::xs, _, _, _, _)
18741874
equation
18751875
size = Expression.sizeOf(Expression.typeof(cre));
1876-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1876+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
18771877
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, BackendDAE.WHEN_EQUATION(size, BackendDAE.WHEN_EQ(inCond, cr, e, NONE()), source)::iEquationLst, iReinitStatementLst);
18781878
then
18791879
(eqnl, reinit);
18801880

18811881
case (DAE.COMPLEX_EQUATION(lhs = cre as DAE.TUPLE(PR=expl), rhs = e, source = source)::xs, _, _, _, _)
18821882
equation
1883-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1883+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
18841884
eqnl = lowerWhenTupleEqn(expl, inCond, e, source, 1, iEquationLst);
18851885
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, eqnl, iReinitStatementLst);
18861886
then
@@ -1905,14 +1905,14 @@ algorithm
19051905
case (DAE.ARRAY_EQUATION(dimension=ds, exp = (cre as DAE.CREF(componentRef = cr)), array = e, source = source)::xs, _, _, _, _)
19061906
equation
19071907
size = List.fold(Expression.dimensionsSizes(ds), intMul, 1);
1908-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1908+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
19091909
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, BackendDAE.WHEN_EQUATION(size, BackendDAE.WHEN_EQ(inCond, cr, e, NONE()), source)::iEquationLst, iReinitStatementLst);
19101910
then
19111911
(eqnl, reinit);
19121912

19131913
case (DAE.ARRAY_EQUATION(exp = cre as DAE.TUPLE(PR=expl), array = e, source = source)::xs, _, _, _, _)
19141914
equation
1915-
(DAE.EQUALITY_EXPS(cre,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
1915+
(DAE.EQUALITY_EXPS(_,e), source) = Inline.simplifyAndInlineEquationExp(DAE.EQUALITY_EXPS(cre,e), (SOME(functionTree), {DAE.NORM_INLINE()}), source);
19161916
eqnl = lowerWhenTupleEqn(expl, inCond, e, source, 1, iEquationLst);
19171917
(eqnl, reinit) = lowerWhenEqn2(xs, inCond, functionTree, eqnl, iReinitStatementLst);
19181918
then

Compiler/BackEnd/BackendDAEOptimize.mo

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,16 +5197,16 @@ algorithm
51975197
tpl2 := matchcontinue(tpl1)
51985198
local
51995199
BackendDAE.Variables knvars;
5200-
DAE.Exp e,cond,expThen,expElse;
5200+
DAE.Exp e1,e2,cond,expThen,expElse;
52015201
Boolean b,b1;
5202-
case ((e as DAE.IFEXP(expCond=cond, expThen=expThen, expElse=expElse),(knvars,b)))
5202+
case ((e1 as DAE.IFEXP(expCond=cond, expThen=expThen, expElse=expElse),(knvars,b)))
52035203
equation
52045204
((cond,(_,b1))) = Expression.traverseExp(cond, simplifyevaluatedParamter, (knvars,false));
5205-
e = Util.if_(b1,DAE.IFEXP(cond,expThen,expElse),e);
5206-
(e,_) = ExpressionSimplify.condsimplify(b1,e);
5205+
e2 = Util.if_(b1,DAE.IFEXP(cond,expThen,expElse),e1);
5206+
(e2,_) = ExpressionSimplify.condsimplify(b1,e2);
52075207
then
5208-
((e,(knvars,b or b1)));
5209-
case _ then tpl1;
5208+
((e2,(knvars,b or b1)));
5209+
else tpl1;
52105210
end matchcontinue;
52115211
end simplifyIfExpevaluatedParamter;
52125212

@@ -7321,13 +7321,13 @@ algorithm
73217321
// case for arrays
73227322
case((e1 as DAE.CALL(path=Absyn.IDENT(name = "der"), expLst={DAE.CREF(componentRef=cr, ty = DAE.T_ARRAY(dims=_))}), (vars, shared as BackendDAE.SHARED(functionTree=funcs), b)))
73237323
equation
7324-
((e1, (_, true))) = BackendDAEUtil.extendArrExp((e1, (SOME(funcs), false)));
7325-
then Expression.traverseExp(e1, expandDerExp, (vars, shared, b));
7324+
((e2, (_, true))) = BackendDAEUtil.extendArrExp((e1, (SOME(funcs), false)));
7325+
then Expression.traverseExp(e2, expandDerExp, (vars, shared, b));
73267326
// case for records
73277327
case((e1 as DAE.CALL(path=Absyn.IDENT(name = "der"), expLst={DAE.CREF(componentRef=cr, ty = DAE.T_COMPLEX(complexClassType=ClassInf.RECORD(_)))}), (vars, shared as BackendDAE.SHARED(functionTree=funcs), b)))
73287328
equation
7329-
((e1, (_, true))) = BackendDAEUtil.extendArrExp((e1, (SOME(funcs), false)));
7330-
then Expression.traverseExp(e1, expandDerExp, (vars, shared, b));
7329+
((e2, (_, true))) = BackendDAEUtil.extendArrExp((e1, (SOME(funcs), false)));
7330+
then Expression.traverseExp(e2, expandDerExp, (vars, shared, b));
73317331
case((e1 as DAE.CALL(path=Absyn.IDENT(name = "der"), expLst={DAE.CREF(componentRef=cr)}), (vars, shared, _)))
73327332
equation
73337333
({v}, _) = BackendVariable.getVar(cr, vars);
@@ -7911,20 +7911,20 @@ algorithm
79117911
DAE.Statement alg;
79127912
DAE.Type typ;
79137913
list<DAE.Statement> stmts1, stmts2;
7914-
case(alg as DAE.STMT_ASSIGN(type_=typ, exp1=exp1, exp=exp2, source=source),(funcTree,replIn))
7914+
case (DAE.STMT_ASSIGN(type_=typ, exp1=exp1, exp=exp2, source=source),(funcTree,replIn))
79157915
equation
7916-
//print("the STMT_ASSIGN before: "+&DAEDump.ppStatementStr(alg));
7916+
//print("the STMT_ASSIGN before: "+&DAEDump.ppStatementStr(alg));
79177917
cref = Expression.expCref(exp1);
79187918
(exp2,changed) = BackendVarTransform.replaceExp(exp2,replIn,NONE());
79197919
(exp2,changed) = Debug.bcallret1_2(changed,ExpressionSimplify.simplify,exp2,exp2,changed);
79207920
(exp2,_) = ExpressionSimplify.simplify(exp2);
79217921
isCon = Expression.isConst(exp2);
79227922
repl = Debug.bcallret4(isCon,BackendVarTransform.addReplacement,replIn,cref,exp2,NONE(),replIn);
7923-
alg = Util.if_(isCon,DAE.STMT_ASSIGN(typ,exp1,exp2,source),alg);
7924-
//print("the STMT_ASSIGN after : "+&DAEDump.ppStatementStr(alg)+&"\n");
7923+
alg = Util.if_(isCon,DAE.STMT_ASSIGN(typ,exp1,exp2,source),algIn);
7924+
//print("the STMT_ASSIGN after : "+&DAEDump.ppStatementStr(alg)+&"\n");
79257925
then
79267926
(alg,(funcTree,repl));
7927-
case(alg as DAE.STMT_ASSIGN_ARR(type_=typ, componentRef=cref, exp=exp1, source=source),(funcTree,replIn))
7927+
case (alg as DAE.STMT_ASSIGN_ARR(type_=typ, componentRef=cref, exp=exp1, source=source),(funcTree,replIn))
79287928
equation
79297929
//print("STMT_ASSIGN_ARR");
79307930
//print("the STMT_ASSIGN_ARR: "+&DAEDump.ppStatementStr(alg)+&"\n");

Compiler/BackEnd/BackendDAEUtil.mo

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5594,15 +5594,15 @@ algorithm
55945594
BackendDAE.Var v;
55955595
DAE.Exp e;
55965596

5597-
case((e as DAE.CREF(componentRef=cr),vars))
5597+
case ((DAE.CREF(componentRef=cr),vars))
55985598
equation
55995599
(v::_,_) = BackendVariable.getVar(cr,vars);
56005600
e = BackendVariable.varBindExp(v);
56015601
((e,_)) = Expression.traverseExp(e, replaceVartraverser, vars);
56025602
then
56035603
((e, vars ));
56045604

5605-
case _ then inExp;
5605+
else inExp;
56065606

56075607
end matchcontinue;
56085608
end replaceVartraverser;
@@ -6909,7 +6909,7 @@ protected function getEqnsysRhsExp1
69096909
algorithm
69106910
outTplExpBoolTypeA := match(inTplExpTypeA)
69116911
local
6912-
DAE.Exp cond,t,f,e, e1, e2, zero;
6912+
DAE.Exp cond,t,f,e, e1, e2, zero,exp;
69136913
DAE.Type tp;
69146914
BackendVarTransform.VariableReplacements repl;
69156915
BackendDAE.Variables vars;
@@ -6943,10 +6943,10 @@ algorithm
69436943
(zero, _) = Expression.makeZeroExpression(Expression.arrayDimension(tp));
69446944
e1 = Expression.expMul(cond,t);
69456945
e2 = Expression.expMul(cond,f);
6946-
e = DAE.IFEXP(DAE.RELATION(cond, DAE.GREATEREQ(tp), zero, -1, NONE()), e1, e2);
6947-
((e, (_, _, _, b))) = Expression.traverseExpTopDown(e, getEqnsysRhsExp1, (repl, vars, funcs, b));
6946+
exp = DAE.IFEXP(DAE.RELATION(cond, DAE.GREATEREQ(tp), zero, -1, NONE()), e1, e2);
6947+
((exp, (_, _, _, b))) = Expression.traverseExpTopDown(exp, getEqnsysRhsExp1, (repl, vars, funcs, b));
69486948
then
6949-
((e,false,(repl,vars,funcs,b)));
6949+
((exp,false,(repl,vars,funcs,b)));
69506950
case ((e as DAE.CALL(expLst=expLst),(repl,vars,funcs,b)))
69516951
equation
69526952
// check if vars not in expList

Compiler/BackEnd/BackendEquation.mo

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ public function derivativeEquation
25932593
algorithm
25942594
(cr,dcr,e,de,negate) := match (eqn)
25952595
local
2596-
DAE.Exp ne;
2596+
DAE.Exp ne,ne2;
25972597
// a = der(b);
25982598
case (BackendDAE.EQUATION(exp=e as DAE.CREF(componentRef = dcr),scalar=de as DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = {DAE.CREF(componentRef = cr)})))
25992599
then (cr,dcr,e,de,false);
@@ -2640,24 +2640,24 @@ algorithm
26402640
case (BackendDAE.EQUATION(exp=e as DAE.UNARY(DAE.UMINUS(_),DAE.CREF(componentRef = dcr)),scalar=de as DAE.UNARY(DAE.UMINUS(_),DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = {DAE.CREF(componentRef = cr)}))))
26412641
equation
26422642
ne = Expression.negate(e);
2643-
de = Expression.negate(de);
2644-
then (cr,dcr,ne,de,false);
2643+
ne2 = Expression.negate(de);
2644+
then (cr,dcr,ne,ne2,false);
26452645
case (BackendDAE.EQUATION(exp=e as DAE.UNARY(DAE.UMINUS_ARR(_),DAE.CREF(componentRef = dcr)),scalar=de as DAE.UNARY(DAE.UMINUS_ARR(_),DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = {DAE.CREF(componentRef = cr)}))))
26462646
equation
26472647
ne = Expression.negate(e);
2648-
de = Expression.negate(de);
2649-
then (cr,dcr,ne,de,false);
2648+
ne2 = Expression.negate(de);
2649+
then (cr,dcr,ne,ne2,false);
26502650
// -der(a) = -b;
26512651
case (BackendDAE.EQUATION(exp=de as DAE.UNARY(DAE.UMINUS(_),DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = {DAE.CREF(componentRef = cr)})),scalar=e as DAE.UNARY(DAE.UMINUS(_),DAE.CREF(componentRef = dcr))))
26522652
equation
26532653
ne = Expression.negate(e);
2654-
de = Expression.negate(de);
2655-
then (cr,dcr,ne,de,false);
2654+
ne2 = Expression.negate(de);
2655+
then (cr,dcr,ne,ne2,false);
26562656
case (BackendDAE.EQUATION(exp=de as DAE.UNARY(DAE.UMINUS_ARR(_),DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = {DAE.CREF(componentRef = cr)})),scalar=e as DAE.UNARY(DAE.UMINUS_ARR(_),DAE.CREF(componentRef = dcr))))
26572657
equation
26582658
ne = Expression.negate(e);
2659-
de = Expression.negate(de);
2660-
then (cr,dcr,ne,de,false);
2659+
ne2 = Expression.negate(de);
2660+
then (cr,dcr,ne,ne2,false);
26612661
end match;
26622662
end derivativeEquation;
26632663

0 commit comments

Comments
 (0)