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@25803 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Apr 29, 2015
1 parent ad1232f commit 5165884
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions Compiler/BackEnd/BackendVarTransform.mo
Expand Up @@ -2635,12 +2635,12 @@ protected function replaceEquationAttributes
algorithm
eqAttrOut := matchcontinue(eqAttrIn,repl)
local
Boolean differentiated;
BackendDAE.EquationKind kind;
Integer subPartitionIndex;
BackendDAE.LoopInfo loopInfo;
DAE.Exp startIt, endIt;
list<BackendDAE.IterCref> crefs;
Boolean differentiated;
BackendDAE.EquationKind kind;
Integer subPartitionIndex;
BackendDAE.LoopInfo loopInfo;
DAE.Exp startIt, endIt;
list<BackendDAE.IterCref> crefs;
case(BackendDAE.EQUATION_ATTRIBUTES(differentiated=differentiated, kind=kind,subPartitionIndex=subPartitionIndex, loopInfo=BackendDAE.LOOP(startIt=startIt,endIt=endIt,crefs=crefs)),_)
equation
crefs = List.map1(crefs,replaceIterationCrefs,repl);
Expand Down
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -4939,7 +4939,7 @@ algorithm
case DAE.PATTERN() equation
(e, ext_arg) = inFunc(inExp, inExtArg);
then (e, ext_arg);

// SUM expressions
case DAE.SUM(ty=tp, iterator=e1, startIt=e2, endIt=e3, body=e4) equation
(e1_1, ext_arg) = traverseExpBottomUp(e1, inFunc, inExtArg);
Expand All @@ -4949,7 +4949,7 @@ algorithm
e = if referenceEq(e1, e1_1) and referenceEq(e2, e2_1) and referenceEq(e3, e3_1) and referenceEq(e4, e4_1)then inExp else DAE.SUM(tp,e1_1, e2_1, e3_1,e4_1);
(e, ext_arg) = inFunc(e, ext_arg);
then (e, ext_arg);

// Why don't we call inFunc() for these expressions?
case DAE.CODE() then (inExp, inExtArg);

Expand Down Expand Up @@ -5373,7 +5373,7 @@ algorithm
(e3_1,ext_arg_3) = traverseExpTopDown(e3, rel, ext_arg_2);
(e4_1,ext_arg_4) = traverseExpTopDown(e4, rel, ext_arg_3);
then (DAE.SUM(tp,e1_1,e2_1,e3_1,e4_1),ext_arg_3);

else
equation
str = ExpressionDump.printExpStr(inExp);
Expand Down
4 changes: 2 additions & 2 deletions Compiler/SimCode/SerializeModelInfo.mo
Expand Up @@ -681,8 +681,8 @@ algorithm
File.write(file, "\"],\"source\":");
serializeSource(file,eq.source,withOperations);
File.write(file, "}");
then true;
then true;

else
equation
Error.addInternalError("serializeEquation failed: " + anyString(eq), sourceInfo());
Expand Down
4 changes: 2 additions & 2 deletions Compiler/SimCode/SimCode.mo
Expand Up @@ -426,7 +426,7 @@ uniontype SimEqSystem
Option<SimEqSystem> elseWhen;
DAE.ElementSource source;
end SES_WHEN;

record SES_FOR_LOOP
Integer index;
DAE.Exp iter;
Expand All @@ -436,7 +436,7 @@ uniontype SimEqSystem
DAE.Exp exp;
DAE.ElementSource source;
end SES_FOR_LOOP;

end SimEqSystem;

uniontype StateSet
Expand Down
10 changes: 5 additions & 5 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -1634,7 +1634,7 @@ algorithm
if Flags.isSet(Flags.VECTORIZE) then
dlow = BackendDAEUtil.mapEqSystem(dlow, Vectorization.rollOutArrays);
end if;

modelInfo = createModelInfo(class_, dlow, functions, {}, numStateSets, fileDir);
modelInfo = addTempVars(tempvars, modelInfo);

Expand Down Expand Up @@ -3930,15 +3930,15 @@ algorithm
//print("rhsExp 2:"+ExpressionDump.printExpStr(rhsExp)+"\n");
ses = SimCode.SES_SIMPLE_ASSIGN(iuniqueEqIndex,lhsCrefIn,rhsExp,source);
then (ses,iuniqueEqIndex+1);

case(BackendDAE.EQUATION(source=source,attr=BackendDAE.EQUATION_ATTRIBUTES(loopInfo=BackendDAE.LOOP(startIt=startIt,endIt=endIt,crefs=iterCrefs))),_,_,_)
equation
// is a for equation
iterator = DAE.CREF(ComponentReference.makeCrefIdent("i",DAE.T_INTEGER_DEFAULT,{}),DAE.T_INTEGER_DEFAULT);
(DAE.CREF(componentRef=cref),(_,iterCrefs)) = Expression.traverseExpTopDown(Expression.crefExp(lhsCrefIn),Vectorization.setIteratedSubscriptInCref,(iterator,iterCrefs));
(rhsExp,(_,iterCrefs)) = Expression.traverseExpTopDown(rhs,Vectorization.setIteratedSubscriptInCref,(iterator,iterCrefs));
then (SimCode.SES_FOR_LOOP(iuniqueEqIndex,iterator,startIt,endIt,cref,rhsExp,source),iuniqueEqIndex+1);

else
equation
print("makeSolvedSES_FOR_LOOP failed\n");
Expand Down Expand Up @@ -7916,7 +7916,7 @@ algorithm
s = s+ ComponentReference.printComponentRefStr(cref) + "=" + ExpressionDump.printExpStr(exp)+"[" +DAEDump.daeTypeStr(Expression.typeof(exp))+ "]\n";
s = s+"end for;";
then s;

else
equation
then "SOMETHING DIFFERENT\n";
Expand Down Expand Up @@ -12370,7 +12370,7 @@ algorithm
case (SimCode.SES_WHEN(index, conditions, initialCall, left, right, elseWhen, source), _, a)
/* TODO: Me */
then (SimCode.SES_WHEN(index, conditions, initialCall, left, right, elseWhen, source), a);

case (SimCode.SES_FOR_LOOP(), _, a)
/* TODO: Me */
then (eq, a);
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Template/DAEDumpTV.mo
Expand Up @@ -1369,15 +1369,15 @@ package DAE
record PATTERN "(x,1,ROOT(a as _,false,_)) := rhs; MetaModelica extension"
Pattern pattern;
end PATTERN;

record SUM //i.e. accumulated sum over a range of array vars
Type ty;
Exp iterator;
Exp startIt;
Exp endIt;
Exp body;
end SUM;

end Exp;
end DAE;

Expand Down
12 changes: 6 additions & 6 deletions Compiler/Template/ExpressionDumpTV.mo
Expand Up @@ -416,13 +416,13 @@ package DAE
record PATTERN
Pattern pattern;
end PATTERN;

record SUM
Type ty;
Exp iterator;
Exp startIt;
Exp endIt;
Exp body;
Type ty;
Exp iterator;
Exp startIt;
Exp endIt;
Exp body;
end SUM;
end Exp;

Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/ExpressionDumpTpl.tpl
Expand Up @@ -145,7 +145,7 @@ match exp
let startStr = dumpExp(startIt,stringDelimiter)
let endStr = dumpExp(endIt,stringDelimiter)
'SIGMA[<%iterStr%>:<%startStr%>to<%endStr%>](<%bodyStr%>)'
else errorMsg("ExpressionDumpTpl.dumpExp: Unknown expression.")
end dumpExp;
Expand Down
14 changes: 7 additions & 7 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -1377,13 +1377,13 @@ package DAE
record PATTERN
Pattern pattern;
end PATTERN;
record SUM
Type ty;
DAE.Exp iterator;
DAE.Exp startIt;
DAE.Exp endIt;
DAE.Exp body;
end SUM;
record SUM
Type ty;
DAE.Exp iterator;
DAE.Exp startIt;
DAE.Exp endIt;
DAE.Exp body;
end SUM;
end Exp;

uniontype CallAttributes
Expand Down

0 comments on commit 5165884

Please sign in to comment.