Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20164 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Apr 16, 2014
1 parent a8d62d9 commit f30c28d
Show file tree
Hide file tree
Showing 240 changed files with 6,363 additions and 6,368 deletions.
326 changes: 163 additions & 163 deletions Compiler/BackEnd/BackendDAEOptimize.mo

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions Compiler/BackEnd/BackendDAEUtil.mo

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions Compiler/BackEnd/BackendEquation.mo
Expand Up @@ -706,21 +706,21 @@ algorithm
list<list<BackendDAE.Equation>> eqnslst;
Boolean diffed;
DAE.Expand crefExpand;

case (BackendDAE.EQUATION(exp = e1,scalar = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,ext_arg_1)) = func((e1,inTypeA));
((e_2,ext_arg_2)) = func((e2,ext_arg_1));
then
(BackendDAE.EQUATION(e_1,e_2,source,diffed),ext_arg_2);

case (BackendDAE.ARRAY_EQUATION(dimSize=dimSize,left = e1,right = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,ext_arg_1)) = func((e1,inTypeA));
((e_2,ext_arg_2)) = func((e2,ext_arg_1));
then
(BackendDAE.ARRAY_EQUATION(dimSize,e_1,e_2,source,diffed),ext_arg_2);

case (BackendDAE.SOLVED_EQUATION(componentRef = cr,exp = e2,source=source,differentiated=diffed),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -729,13 +729,13 @@ algorithm
((e_2,ext_arg_2)) = func((e2,ext_arg_1));
then
(BackendDAE.SOLVED_EQUATION(cr1,e_2,source,diffed),ext_arg_2);

case (BackendDAE.RESIDUAL_EQUATION(exp = e1,source=source,differentiated=diffed),_,_)
equation
((e_1,ext_arg_1)) = func((e1,inTypeA));
then
(BackendDAE.RESIDUAL_EQUATION(e_1,source,diffed),ext_arg_1);

case (BackendDAE.WHEN_EQUATION(size=size,whenEquation = BackendDAE.WHEN_EQ(condition=cond,left = cr,right = e2,elsewhenPart=NONE()),source = source),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -745,7 +745,7 @@ algorithm
((cond,ext_arg_2)) = func((cond,ext_arg_2));
then
(BackendDAE.WHEN_EQUATION(size,BackendDAE.WHEN_EQ(cond,cr1,e_2,NONE()),source),ext_arg_2);

case (BackendDAE.WHEN_EQUATION(size=size,whenEquation = BackendDAE.WHEN_EQ(condition=cond,left=cr,right=e2,elsewhenPart=SOME(elsePart)),source = source),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -756,14 +756,14 @@ algorithm
(BackendDAE.WHEN_EQUATION(whenEquation=elsePart1),ext_arg_3) = traverseBackendDAEExpsEqn(BackendDAE.WHEN_EQUATION(size,elsePart,source),func,ext_arg_2);
then
(BackendDAE.WHEN_EQUATION(size,BackendDAE.WHEN_EQ(cond,cr1,e_2,SOME(elsePart1)),source),ext_arg_3);

case (BackendDAE.ALGORITHM(size=size,alg=alg as DAE.ALGORITHM_STMTS(statementLst = stmts),source=source,expand=crefExpand),_,_)
equation
(stmts1,ext_arg_1) = DAEUtil.traverseDAEEquationsStmts(stmts,func,inTypeA);
alg = Util.if_(referenceEq(stmts,stmts1),alg,DAE.ALGORITHM_STMTS(stmts1));
then
(BackendDAE.ALGORITHM(size,alg,source,crefExpand),ext_arg_1);

case (BackendDAE.COMPLEX_EQUATION(size=size,left = e1,right = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,ext_arg_1)) = func((e1,inTypeA));
Expand All @@ -778,7 +778,7 @@ algorithm
(eqns,ext_arg_2) = List.map1Fold(eqns,traverseBackendDAEExpsEqn,func,ext_arg_2);
then
(BackendDAE.IF_EQUATION(expl,eqnslst,eqns,source),ext_arg_2);

end match;
end traverseBackendDAEExpsEqn;

Expand Down Expand Up @@ -969,23 +969,23 @@ algorithm
list<BackendDAE.Equation> eqns,eqnsfalse,eqnsfalse1;
Boolean diffed;
DAE.Expand crefExpand;

case (BackendDAE.EQUATION(exp = e1,scalar = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,b1,ext_arg_1)) = func((e1,inTypeA));
((e_2,b2,ext_arg_2)) = func((e2,ext_arg_1));
bres = Util.boolOrList({b1,b2});
then
(BackendDAE.EQUATION(e_1,e_2,source,diffed),bres,ext_arg_2);

case (BackendDAE.ARRAY_EQUATION(dimSize=dimSize,left = e1,right = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,b1,ext_arg_1)) = func((e1,inTypeA));
((e_2,b2,ext_arg_2)) = func((e2,ext_arg_1));
bres = Util.boolOrList({b1,b2});
then
(BackendDAE.ARRAY_EQUATION(dimSize,e_1,e_2,source,diffed),bres,ext_arg_2);

case (BackendDAE.SOLVED_EQUATION(componentRef = cr,exp = e2,source=source,differentiated=diffed),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -995,13 +995,13 @@ algorithm
bres = Util.boolOrList({b1,b2});
then
(BackendDAE.SOLVED_EQUATION(cr1,e_2,source,diffed),bres,ext_arg_2);

case (BackendDAE.RESIDUAL_EQUATION(exp = e1,source=source,differentiated=diffed),_,_)
equation
((e_1,b1,ext_arg_1)) = func((e1,inTypeA));
then
(BackendDAE.RESIDUAL_EQUATION(e_1,source,diffed),b1,ext_arg_1);

case (BackendDAE.WHEN_EQUATION(size=size,whenEquation = BackendDAE.WHEN_EQ(condition=cond,left = cr,right = e2,elsewhenPart=NONE()),source = source),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -1012,7 +1012,7 @@ algorithm
bres = Util.boolOrList({b1,b2,b3});
then
(BackendDAE.WHEN_EQUATION(size,BackendDAE.WHEN_EQ(cond,cr1,e_2,NONE()),source),bres,ext_arg_2);

case (BackendDAE.WHEN_EQUATION(size=size,whenEquation = BackendDAE.WHEN_EQ(condition=cond,left=cr,right=e2,elsewhenPart=SOME(elsePart)),source = source),_,_)
equation
tp = Expression.typeof(e2);
Expand All @@ -1024,11 +1024,11 @@ algorithm
bres = Util.boolOrList({b1,b2,b3,b4});
then
(BackendDAE.WHEN_EQUATION(size,BackendDAE.WHEN_EQ(cond,cr1,e_2,SOME(elsePart1)),source),bres,ext_arg_3);

case (BackendDAE.ALGORITHM(size=size,alg=alg,source=source,expand=crefExpand),_,_)
then
(BackendDAE.ALGORITHM(size,alg,source,crefExpand),false,inTypeA);

case (BackendDAE.COMPLEX_EQUATION(size=size,left = e1,right = e2,source=source,differentiated=diffed),_,_)
equation
((e_1,b1,ext_arg_1)) = func((e1,inTypeA));
Expand Down Expand Up @@ -1565,14 +1565,14 @@ algorithm
BackendDAE.SymbolicJacobians symjacs;
BackendDAE.BackendDAEType btp;
BackendDAE.ExtraInfo ei;

case ({},_) then shared;

case (_,BackendDAE.SHARED(knvars,exobj,aliasVars,inieqns,remeqns,constrs,clsAttrs,cache,env,funcs,einfo,eoc,btp,symjacs,ei))
equation
remeqns = List.fold(inEquations,equationAdd,remeqns);
then BackendDAE.SHARED(knvars,exobj,aliasVars,inieqns,remeqns,constrs,clsAttrs,cache,env,funcs,einfo,eoc,btp,symjacs,ei);

end match;
end requationsAddDAE;

Expand Down Expand Up @@ -2246,7 +2246,7 @@ algorithm
/*
case (eq as BackendDAE.ALGORITHM(alg=_),_)
then eq;
case (eq as BackendDAE.WHEN_EQUATION(size=_),_)
then (eq);
Expand Down Expand Up @@ -2672,47 +2672,47 @@ algorithm
DAE.Algorithm alg;
Boolean diffed;
DAE.Expand crefExpand;

case (BackendDAE.EQUATION(e1,e2,source,diffed),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.EQUATION(e1,e2,source,diffed);

case (BackendDAE.ARRAY_EQUATION(ds,e1,e2,source,diffed),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.ARRAY_EQUATION(ds,e1,e2,source,diffed);

case (BackendDAE.SOLVED_EQUATION(cr1,e1,source,diffed),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.SOLVED_EQUATION(cr1,e1,source,diffed);

case (BackendDAE.RESIDUAL_EQUATION(e1,source,diffed),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.RESIDUAL_EQUATION(e1,source,diffed);

case (BackendDAE.ALGORITHM(size,alg,source,crefExpand),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.ALGORITHM(size,alg,source,crefExpand);

case (BackendDAE.WHEN_EQUATION(size,whenEquation,source),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.WHEN_EQUATION(size,whenEquation,source);

case (BackendDAE.COMPLEX_EQUATION(size,e1,e2,source,diffed),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.COMPLEX_EQUATION(size,e1,e2,source,diffed);

case (BackendDAE.IF_EQUATION(conditions,eqnstrue,eqnsfalse,source),_)
equation
source = DAEUtil.addSymbolicTransformation(source,op);
then BackendDAE.IF_EQUATION(conditions,eqnstrue,eqnsfalse,source);

else
equation
Error.addMessage(Error.INTERNAL_ERROR,{"BackendEquation.addOperation failed"});
Expand Down Expand Up @@ -2825,7 +2825,7 @@ protected function replaceDerOpInEquation
input BackendDAE.Equation inEqn;
output BackendDAE.Equation outEqn;
algorithm

outEqn := matchcontinue(inEqn)
local
DAE.Exp e1, e2;
Expand All @@ -2837,49 +2837,49 @@ algorithm
list<DAE.Statement> stmts, stmts1;
Boolean diffed;
DAE.Expand crefExpand;

case (BackendDAE.EQUATION(exp = e1, scalar = e2, source = src, differentiated = diffed))
equation
e1 = Expression.replaceDerOpInExp(e1);
e2 = Expression.replaceDerOpInExp(e2);
then
BackendDAE.EQUATION(e1, e2, src, diffed);

case (BackendDAE.ARRAY_EQUATION(dimSize=dimSize, left = e1, right = e2, source = src, differentiated = diffed))
equation
e1 = Expression.replaceDerOpInExp(e1);
e2 = Expression.replaceDerOpInExp(e2);
then
BackendDAE.ARRAY_EQUATION(dimSize, e1, e2, src, diffed);
BackendDAE.ARRAY_EQUATION(dimSize, e1, e2, src, diffed);

case (BackendDAE.COMPLEX_EQUATION(size=size, left = e1, right = e2, source = src, differentiated = diffed))
equation
e1 = Expression.replaceDerOpInExp(e1);
e2 = Expression.replaceDerOpInExp(e2);
then
BackendDAE.COMPLEX_EQUATION(size, e1, e2, src, diffed);

case (BackendDAE.RESIDUAL_EQUATION(exp = e1, source = src, differentiated = diffed))
equation
e1 = Expression.replaceDerOpInExp(e1);
then
BackendDAE.RESIDUAL_EQUATION(e1, src, diffed);

case (BackendDAE.SOLVED_EQUATION(componentRef=cr, exp = e1, source = src, differentiated = diffed))
equation
e1 = Expression.replaceDerOpInExp(e1);
then
BackendDAE.SOLVED_EQUATION(cr, e1, src, diffed);

case (BackendDAE.ALGORITHM(size=size, alg=alg as DAE.ALGORITHM_STMTS(statementLst = stmts), source=src, expand = crefExpand))
equation
(stmts1, _) = DAEUtil.traverseDAEEquationsStmts(stmts, Expression.replaceDerOpInExpTraverser, NONE());
alg = Util.if_(referenceEq(stmts, stmts1), alg, DAE.ALGORITHM_STMTS(stmts1));
then
BackendDAE.ALGORITHM(size, alg, src, crefExpand);

case (_) then inEqn;

end matchcontinue;
end replaceDerOpInEquation;

Expand Down
6 changes: 3 additions & 3 deletions Compiler/BackEnd/BackendQSS.mo
Expand Up @@ -138,7 +138,7 @@ algorithm
list<BackendDAE.Var> knownVarsList;
BackendDAE.BackendDAE dae;
BackendDAE.Variables v,kn;

case (BackendDAE.DAE(eqs=BackendDAE.EQSYSTEM(orderedVars = v)::{},shared=BackendDAE.SHARED(knownVars = kn)))
equation
orderedVarsList = BackendVariable.varList(v);
Expand Down Expand Up @@ -408,7 +408,7 @@ end replaceVars;
// list<SimCode.SimEqSystem> tail;
// Integer p;
// list<list<Integer>> acc_1;
//
//
// case (_,{},_) then acc;
// case (_,((SimCode.SES_SIMPLE_ASSIGN(cref=cref))::tail),_)
// equation
Expand Down Expand Up @@ -1013,7 +1013,7 @@ algorithm
list<BackendDAE.TimeEvent> timeEvents;
Option<HpcOmScheduler.ScheduleSimCode> hpcOmSchedule;
Option<SimCode.BackendMapping> backendMapping;

case (SimCode.SIMCODE(modelInfo,literals,recordDecls,externalFunctionIncludes,allEquations,odeEquations,
algebraicEquations,residualEquations,useSymbolicInitialization,useHomotopy,initialEquations,startValueEquations,nominalValueEquations,minValueEquations,maxValueEquations,
parameterEquations,removedEquations,algorithmAndEquationAsserts,equationsForZeroCrossings,jacobianEquations,stateSets,constraints,classAttributes,zeroCrossings,relations,
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendVarTransform.mo
Expand Up @@ -136,7 +136,7 @@ algorithm
String s;
Option<HashTable2.HashTable> derConst;
case (_,_,_)
equation
equation
REPLACEMENTS(ht,invHt,eht,iv,derConst) = repl;
false = BaseHashTable.hasKey(inSrc,ht);
then
Expand Down

0 comments on commit f30c28d

Please sign in to comment.