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@22960 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Oct 26, 2014
1 parent d8ea3a0 commit 194a5d1
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -384,7 +384,7 @@ algorithm
BackendDAE.VAR(values = attr) := inVar;
outHasStartValue := DAEUtil.hasStartAttr(attr);
end varHasStartValue;

public function varStartOrigin
"author: Frenkel TUD
Returns the StartOrigin of a variable."
Expand Down Expand Up @@ -616,7 +616,7 @@ protected
Option<SCode.Comment> s;
DAE.ConnectorType ct;
algorithm
if isSome(inMin) or isSome(inMax) then
if isSome(inMin) or isSome(inMax) then
BackendDAE.VAR(a, b, c, prl, d, e, f, g, source, oattr, s, ct) := inVar;
oattr := if isSome(oattr) then oattr else SOME(getVariableAttributefromType(d));
oattr := DAEUtil.setMinMax(oattr, inMin, inMax);
Expand Down
12 changes: 6 additions & 6 deletions Compiler/BackEnd/SynchronousFeatures.mo
Expand Up @@ -114,9 +114,9 @@ algorithm
i := partitionIndependentBlocks0(m, mT, ixs);

outSysts := if i > 1 then
partitionIndependentBlocksSplitBlocks(i, syst, ixs, mT, false)
else
{syst};
partitionIndependentBlocksSplitBlocks(i, syst, ixs, mT, false)
else
{syst};

// analyze partition kind
outSysts := List.map1(outSysts, analyzePartitionKind, inShared);
Expand All @@ -131,7 +131,7 @@ public function partitionIndependentBlocks0
output Integer on := 0;
algorithm
for i in arrayLength(m):-1:1 loop
on := if partitionIndependentBlocks1(i, on + 1, m, mT, ixs) then on + 1 else on;
on := if partitionIndependentBlocks1(i, on + 1, m, mT, ixs) then on + 1 else on;
end for;
end partitionIndependentBlocks0;

Expand Down Expand Up @@ -468,7 +468,7 @@ algorithm
else
algorithm
(_, (outContinuousTimeVars, outClockedVars)) :=
BackendEquation.traverseBackendDAEExpsEqn(eq, getVariableLists,
BackendEquation.traverseBackendDAEExpsEqn(eq, getVariableLists,
(outContinuousTimeVars, outClockedVars));
then
();
Expand All @@ -490,7 +490,7 @@ algorithm
DAE.ComponentRef cr;

// y = sample(u) or sample(u) = y
case ("sample", _ :: DAE.CREF(componentRef = cr) :: _)
case ("sample", _ :: DAE.CREF(componentRef = cr) :: _)
then (cr :: inContinuousTimeVars, inVarCref :: inClockedVars);

// y = hold(...) or hold(...) = y
Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/DAEUtil.mo
Expand Up @@ -1719,13 +1719,13 @@ algorithm
end match;
end isNotVar;

public function isVar
public function isVar
"Returns true if the element is a variable, otherwise false."
input DAE.Element inElement;
output Boolean outMatch;
algorithm
outMatch := match inElement
case DAE.VAR(__) then true;
case DAE.VAR(__) then true;
else false;
end match;
end isVar;
Expand Down
12 changes: 6 additions & 6 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -5280,7 +5280,7 @@ algorithm
case DAE.CREF_IDENT(id, ty, subs)
equation
(new_ty, arg) = traverseExpTypeDims(ty, inFunc, inArg);
cr = if referenceEq(new_ty, ty)
cr = if referenceEq(new_ty, ty)
then inCref else DAE.CREF_IDENT(id, new_ty, subs);
then
(cr, arg);
Expand Down Expand Up @@ -5335,7 +5335,7 @@ algorithm
ty = if referenceEq(new_ty, ty) then inType else DAE.T_SUBTYPE_BASIC(state, vars, ty, ec, src);
then
(ty, arg);

else (inType, inArg);
end match;
end traverseExpTypeDims;
Expand Down Expand Up @@ -5367,7 +5367,7 @@ algorithm
outChanged = outChanged or changed;
then
if changed then DAE.DIM_EXP(exp) else dim;

else dim;
end match;

Expand Down Expand Up @@ -6014,7 +6014,7 @@ algorithm
case DAE.MATRIX(ty = ty, integer = dim, matrix = mat_expl)
equation
(mat_expl, arg) = List.map2Fold(mat_expl, traverseExpListBidir,
inEnterFunc, inExitFunc, inArg);
inEnterFunc, inExitFunc, inArg);
then
(DAE.MATRIX(ty, dim, mat_expl), arg);

Expand Down Expand Up @@ -8972,7 +8972,7 @@ algorithm
equation
(exp, arg) = traverseExpBidir(exp, inEnterFunc, inExitFunc, inArg);
(gexp, arg) = traverseExpOptBidir(gexp, inEnterFunc, inExitFunc, arg);
then
then
(DAE.REDUCTIONITER(id, exp, gexp, ty), arg);

end match;
Expand Down Expand Up @@ -10848,7 +10848,7 @@ public function makeVectorCall
algorithm
outExp := makePureBuiltinCall("vector",{exp},tp);
end makeVectorCall;

public function extendArrExp "author: Frenkel TUD 2010-07
alternative name: vectorizeExp"
input DAE.Exp inExp;
Expand Down
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -3287,7 +3287,7 @@ algorithm
ErrorExt.setCheckpoint("instElement2");
(outCache, outEnv, outIH, {elt}) := updateCompeltsMods(inCache, outEnv,
outIH, inPrefix, {inElement}, outState, inImplicit);
(outCache, outEnv, outIH, outStore, DAE.DAE(outDae), outSets, outState, outVars, outGraph) :=
(outCache, outEnv, outIH, outStore, DAE.DAE(outDae), outSets, outState, outVars, outGraph) :=
instElement(outCache, outEnv, outIH, outStore, inMod, inPrefix, outState, elt, inInstDims,
inImplicit, inCallingScope, outGraph, inSets);
Error.updateCurrentComponent("", Absyn.dummyInfo);
Expand All @@ -3303,7 +3303,7 @@ algorithm
outIH := inIH;
return;
end if;
end try;
end try;
end instElement2;

protected function isDeletedComponent
Expand Down Expand Up @@ -3358,7 +3358,7 @@ algorithm
outCache := inCache;
end if;
end isDeletedComponent;

public function instElement "
This monster function instantiates an element of a class definition. An
element is either a class definition, a variable, or an import clause."
Expand Down
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/InstUtil.mo
Expand Up @@ -7754,7 +7754,7 @@ algorithm
// Elaborate the conditional expression.
(outCache, e, DAE.PROP(type_ = t, constFlag = c), _) :=
Static.elabExp(inCache, inEnv, inCondition, false, NONE(), false, inPrefix, inInfo);

// The expression must be of boolean type.
if not Types.isBoolean(t) then
Error.addSourceMessageAndFail(Error.IF_CONDITION_TYPE_ERROR,
Expand All @@ -7770,7 +7770,7 @@ algorithm
// If it is a boolean parameter expression, try to evaluate it.
(outCache, val, _) := Ceval.ceval(outCache, inEnv, e, false, NONE(), Absyn.MSG(inInfo), 0);

outIsConditional := match(val)
outIsConditional := match(val)
case Values.BOOL(b) then b;
case Values.EMPTY(__) // Print an error if the expression has no value.
equation
Expand All @@ -7784,7 +7784,7 @@ algorithm
ValuesUtil.valString(val));
then
fail();
end match;
end match;
end instConditionalDeclaration;

public function propagateClassPrefix
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Lookup.mo
Expand Up @@ -1982,7 +1982,7 @@ algorithm
FCore.Graph env;

// MetaModelica partial functions.
case _
case _
algorithm
DAE.TYPES_VAR(ty = ty as DAE.T_FUNCTION(__)) := FNode.refInstVar(r);
ty := Types.setTypeSource(ty, Types.mkTypeSource(SOME(Absyn.IDENT(inFuncName))));
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Types.mo
Expand Up @@ -6146,7 +6146,7 @@ algorithm
// Add the type to the result list if the match function return true.
if inFunc(t) then
outTypes := t :: outTypes;
end if;
end if;

// Get the inner types of the type.
tys := match(t)
Expand Down
18 changes: 9 additions & 9 deletions Compiler/Util/Array.mo
Expand Up @@ -52,7 +52,7 @@ public function mapNoCopy<T>
end FuncType;
algorithm
for i in 1:arrayLength(inArray) loop
arrayUpdate(inArray, i,
arrayUpdate(inArray, i,
inFunc(MetaModelica.Dangerous.arrayGetNoBoundsChecking(inArray, i)));
end for;
end mapNoCopy;
Expand All @@ -74,7 +74,7 @@ protected
T e;
algorithm
for i in 1:arrayLength(inArray) loop
(e, outArg) :=
(e, outArg) :=
inFunc((MetaModelica.Dangerous.arrayGetNoBoundsChecking(inArray, i), outArg));
arrayUpdate(inArray, i, e);
end for;
Expand All @@ -84,7 +84,7 @@ public function findFirstOnTrue<T>
input array<T> inArray;
input FuncType inPredicate;
output Option<T> outElement;

partial function FuncType
input T inElement;
output Boolean outMatch;
Expand All @@ -108,7 +108,7 @@ protected
Integer i := 1;
algorithm
outArray := arrayCreate(listLength(inIndices), inArray[1]);

for e in inIndices loop
arrayUpdate(outArray, i, arrayGet(inArray, e));
i := i + 1;
Expand Down Expand Up @@ -388,7 +388,7 @@ public function getIndexFirst<T>
input array<T> inArray;
output T outElement := arrayGet(inArray, inIndex);
end getIndexFirst;

public function updatewithArrayIndexFirst<T>
"Replaces the element with the given index in the second array with the value
of the corresponding element in the first array."
Expand Down Expand Up @@ -417,7 +417,7 @@ public function updateElementListAppend<T>
algorithm
arrayUpdate(inArray, inIndex, listAppend(inArray[inIndex], inValue));
end updateElementListAppend;

public function replaceAtWithFill<T>
"Takes
- an element,
Expand Down Expand Up @@ -471,7 +471,7 @@ algorithm
copy(inArray, outArray);
end if;
end expand;

public function expandOnDemand<T>
"Resizes an array with the given factor if the array is smaller than the
requested size."
Expand All @@ -491,7 +491,7 @@ algorithm
copy(inArray, outArray);
end if;
end expandOnDemand;

public function append<T>
input array<T> inArray1;
input array<T> inArray2;
Expand Down Expand Up @@ -588,7 +588,7 @@ algorithm
end if;
end for;
outIndex := 0;
end position;
end position;

public function getMemberOnTrue<VT, ET>
"Takes a value and returns the first element for which the comparison
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Util/BaseHashSet.mo
Expand Up @@ -397,8 +397,8 @@ protected
Integer size;
Key e;
algorithm
(size, _, arr) := inValueArray;
(size, _, arr) := inValueArray;

for i in 1:size loop
if isSome(arr[i]) then
SOME(e) := arr[i];
Expand Down

0 comments on commit 194a5d1

Please sign in to comment.