You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)))
then Expression.traverseExp(e2, expandDerExp, (vars, shared, b));
7326
7326
// case for records
7327
7327
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)))
Copy file name to clipboardExpand all lines: Compiler/BackEnd/BackendEquation.mo
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2593,7 +2593,7 @@ public function derivativeEquation
2593
2593
algorithm
2594
2594
(cr,dcr,e,de,negate) := match (eqn)
2595
2595
local
2596
-
DAE.Exp ne;
2596
+
DAE.Exp ne,ne2;
2597
2597
// a = der(b);
2598
2598
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)})))
2599
2599
then (cr,dcr,e,de,false);
@@ -2640,24 +2640,24 @@ algorithm
2640
2640
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)}))))
2641
2641
equation
2642
2642
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);
2645
2645
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)}))))
2646
2646
equation
2647
2647
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);
2650
2650
// -der(a) = -b;
2651
2651
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))))
2652
2652
equation
2653
2653
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);
2656
2656
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))))
0 commit comments