@@ -1967,16 +1967,6 @@ algorithm
19671967 then (cr1,cr2,e1,e2,false )::inTpls;
19681968 case (DAE . UNARY (DAE . UMINUS_ARR (_),e1 as DAE . CREF (componentRef = cr1)),DAE . UNARY (DAE . UMINUS_ARR (_),e2 as DAE . CREF (componentRef = cr2)),_)
19691969 then (cr1,cr2,e1,e2,false )::inTpls;
1970- // lhs = 0
1971- case (_,_,_)
1972- equation
1973- true = Expression . isZero(rhs);
1974- then aliasExpression(lhs,inTpls);
1975- // 0 = rhs
1976- case (_,_,_)
1977- equation
1978- true = Expression . isZero(lhs);
1979- then aliasExpression(rhs,inTpls);
19801970 // a = not b;
19811971 case (DAE . CREF (componentRef = cr1),DAE . LUNARY (DAE . NOT (ty),DAE . CREF (componentRef = cr2)),_)
19821972 then (cr1,cr2,DAE . LUNARY (DAE . NOT (ty),lhs),rhs,true )::inTpls;
@@ -1991,16 +1981,6 @@ algorithm
19911981 // {a1,a2,a3,..} = {b1,b2,b3,..};
19921982 case (DAE . ARRAY (array = elst1),DAE . ARRAY (array = elst2),_)
19931983 then List . threadFold(elst1,elst2,aliasEquation1,inTpls);
1994- // {a1+b1,a2+b2,a3+b3,..} = 0;
1995- case (DAE . ARRAY (array = elst1),_,_)
1996- equation
1997- true = Expression . isZero(rhs);
1998- then List . fold(elst1,aliasExpression,inTpls);
1999- // 0 = {a1+b1,a2+b2,a3+b3,..};
2000- case (_,DAE . ARRAY (array = elst2),_)
2001- equation
2002- true = Expression . isZero(lhs);
2003- then List . fold(elst2,aliasExpression,inTpls);
20041984 // a = {b1,b2,b3,..}
20051985 // case (DAE.CREF(componentRef = cr1),DAE.ARRAY(array = elst2),_)
20061986 // -a = {b1,b2,b3,..}
@@ -2044,6 +2024,26 @@ algorithm
20442024 true = Absyn . pathEqual(patha,patha1);
20452025 true = Absyn . pathEqual(pathb,pathb1);
20462026 then List . threadFold(elst1,elst2,aliasEquation1,inTpls);
2027+ // {a1+b1,a2+b2,a3+b3,..} = 0;
2028+ case (DAE . ARRAY (array = elst1),_,_)
2029+ equation
2030+ true = Expression . isZero(rhs);
2031+ then List . fold(elst1,aliasExpression,inTpls);
2032+ // 0 = {a1+b1,a2+b2,a3+b3,..};
2033+ case (_,DAE . ARRAY (array = elst2),_)
2034+ equation
2035+ true = Expression . isZero(lhs);
2036+ then List . fold(elst2,aliasExpression,inTpls);
2037+ // lhs = 0
2038+ case (_,_,_)
2039+ equation
2040+ true = Expression . isZero(rhs);
2041+ then aliasExpression(lhs,inTpls);
2042+ // 0 = rhs
2043+ case (_,_,_)
2044+ equation
2045+ true = Expression . isZero(lhs);
2046+ then aliasExpression(rhs,inTpls);
20472047 end match;
20482048end aliasEquation1;
20492049
0 commit comments