Skip to content

Commit

Permalink
Change := in modifications to a warning instead of error, fix MM sources
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24752 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 24, 2015
1 parent 2bd5e82 commit 4950de8
Show file tree
Hide file tree
Showing 56 changed files with 766 additions and 764 deletions.
78 changes: 39 additions & 39 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -161,29 +161,29 @@ protected function lower2
input list<DAE.Element> inElements;
input DAE.FunctionTree inFunctions;
input HashTableExpToExp.HashTable inInlineHT "Workaround to speed up inlining of array parameters.";
input list<BackendDAE.Var> inVars := {};
input list<BackendDAE.Var> inKnVars := {};
input list<BackendDAE.Var> inExVars := {};
input list<BackendDAE.Equation> inEqns := {};
input list<BackendDAE.Equation> inREqns := {};
input list<BackendDAE.Equation> inIEqns := {};
input list<DAE.Constraint> inConstraints := {};
input list<DAE.ClassAttributes> inClassAttributes := {};
input list<BackendDAE.WhenClause> inWhenClauses := {};
input list<BackendDAE.ExternalObjectClass> inExtObjClasses := {};
input list<DAE.Element> inAliasEqns := {};
output list<BackendDAE.Var> outVars := inVars "Time dependent variables.";
output list<BackendDAE.Var> outKnVars := inKnVars "Time independent variables.";
output list<BackendDAE.Var> outExVars := inExVars "External variables.";
output list<BackendDAE.Equation> outEqns := inEqns "Dynamic equations/algorithms.";
output list<BackendDAE.Equation> outREqns := inREqns "Algebraic equations.";
output list<BackendDAE.Equation> outIEqns := inIEqns "Initial equations.";
output list<DAE.Constraint> outConstraints := inConstraints;
output list<DAE.ClassAttributes> outClassAttributes := inClassAttributes;
output list<BackendDAE.WhenClause> outWhenClauses := inWhenClauses;
output list<BackendDAE.ExternalObjectClass> outExtObjClasses := inExtObjClasses;
output list<DAE.Element> outAliasEqns := inAliasEqns "List with all EqualityEquations.";
output HashTableExpToExp.HashTable outInlineHT := inInlineHT;
input list<BackendDAE.Var> inVars = {};
input list<BackendDAE.Var> inKnVars = {};
input list<BackendDAE.Var> inExVars = {};
input list<BackendDAE.Equation> inEqns = {};
input list<BackendDAE.Equation> inREqns = {};
input list<BackendDAE.Equation> inIEqns = {};
input list<DAE.Constraint> inConstraints = {};
input list<DAE.ClassAttributes> inClassAttributes = {};
input list<BackendDAE.WhenClause> inWhenClauses = {};
input list<BackendDAE.ExternalObjectClass> inExtObjClasses = {};
input list<DAE.Element> inAliasEqns = {};
output list<BackendDAE.Var> outVars = inVars "Time dependent variables.";
output list<BackendDAE.Var> outKnVars = inKnVars "Time independent variables.";
output list<BackendDAE.Var> outExVars = inExVars "External variables.";
output list<BackendDAE.Equation> outEqns = inEqns "Dynamic equations/algorithms.";
output list<BackendDAE.Equation> outREqns = inREqns "Algebraic equations.";
output list<BackendDAE.Equation> outIEqns = inIEqns "Initial equations.";
output list<DAE.Constraint> outConstraints = inConstraints;
output list<DAE.ClassAttributes> outClassAttributes = inClassAttributes;
output list<BackendDAE.WhenClause> outWhenClauses = inWhenClauses;
output list<BackendDAE.ExternalObjectClass> outExtObjClasses = inExtObjClasses;
output list<DAE.Element> outAliasEqns = inAliasEqns "List with all EqualityEquations.";
output HashTableExpToExp.HashTable outInlineHT = inInlineHT;
protected
Absyn.Path path;
DAE.ElementSource src;
Expand Down Expand Up @@ -448,20 +448,20 @@ end transformBuiltinExpression;
public function lowerVars
input list<DAE.Element> inElements;
input DAE.FunctionTree functionTree;
input list<BackendDAE.Var> inVars := {} "The time depend Variables";
input list<BackendDAE.Var> inKnVars := {} "The time independend Variables";
input list<BackendDAE.Var> inExVars := {} "The external Variables";
input list<BackendDAE.Equation> inEqns := {} "The dynamic Equations/Algoritms";
output list<BackendDAE.Var> outVars := inVars;
output list<BackendDAE.Var> outKnVars := inKnVars;
output list<BackendDAE.Var> outExVars := inExVars;
output list<BackendDAE.Equation> outEqns := inEqns;
input list<BackendDAE.Var> inVars = {} "The time depend Variables";
input list<BackendDAE.Var> inKnVars = {} "The time independend Variables";
input list<BackendDAE.Var> inExVars = {} "The external Variables";
input list<BackendDAE.Equation> inEqns = {} "The dynamic Equations/Algoritms";
output list<BackendDAE.Var> outVars = inVars;
output list<BackendDAE.Var> outKnVars = inKnVars;
output list<BackendDAE.Var> outExVars = inExVars;
output list<BackendDAE.Equation> outEqns = inEqns;
protected
DAE.ComponentRef cr;
DAE.Type arr_ty;
list<DAE.ComponentRef> crefs;
list<DAE.Element> new_vars;
HashTableExpToExp.HashTable inline_ht := HashTableExpToExp.emptyHashTable();
HashTableExpToExp.HashTable inline_ht = HashTableExpToExp.emptyHashTable();
algorithm
for el in inElements loop
try
Expand All @@ -486,11 +486,11 @@ protected function lowerVar
input list<BackendDAE.Var> inExVars;
input list<BackendDAE.Equation> inEqns;
input HashTableExpToExp.HashTable inInlineHT;
output list<BackendDAE.Var> outVars := inVars;
output list<BackendDAE.Var> outKnVars := inKnVars;
output list<BackendDAE.Var> outExVars := inExVars;
output list<BackendDAE.Equation> outEqns := inEqns;
output HashTableExpToExp.HashTable outInlineHT := inInlineHT;
output list<BackendDAE.Var> outVars = inVars;
output list<BackendDAE.Var> outKnVars = inKnVars;
output list<BackendDAE.Var> outExVars = inExVars;
output list<BackendDAE.Equation> outEqns = inEqns;
output HashTableExpToExp.HashTable outInlineHT = inInlineHT;
algorithm
_ := matchcontinue(inElement)
local
Expand Down Expand Up @@ -692,7 +692,7 @@ author:Waurich TUD 2013-10"
input list<DAE.Statement> assrtIn;
input DAE.ElementSource source;
input list<BackendDAE.Equation> eqIn;
output list<BackendDAE.Equation> eqOut := eqIn;
output list<BackendDAE.Equation> eqOut = eqIn;
protected
BackendDAE.Equation eq;
algorithm
Expand Down Expand Up @@ -3086,7 +3086,7 @@ end detectImplicitDiscreteAlgsStatemensFor;
public function extendRange
input DAE.Exp inRangeExp;
input BackendDAE.Variables inKnVariables;
output list<DAE.Exp> outExpLst := {};
output list<DAE.Exp> outExpLst = {};
protected
DAE.Exp start, stepvalue, stop;
Option<DAE.Exp> step;
Expand Down
18 changes: 9 additions & 9 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -1526,7 +1526,7 @@ protected function removeUnusedFunctionsSymJacs
input BackendDAE.SymbolicJacobians inSymJacs;
input DAE.FunctionTree inFunctions;
input DAE.FunctionTree inUsedFunctions;
output DAE.FunctionTree outUsedFunctions := inUsedFunctions;
output DAE.FunctionTree outUsedFunctions = inUsedFunctions;
algorithm
for sjac in inSymJacs loop
_ := match(sjac)
Expand Down Expand Up @@ -1563,7 +1563,7 @@ protected function checkUnusedFunctionsExp
input DAE.Exp inExp;
input DAE.FunctionTree inFunctions;
input DAE.FunctionTree inUsedFunctions;
output DAE.Exp outExp := inExp;
output DAE.Exp outExp = inExp;
output DAE.FunctionTree outUsedFunctions;
algorithm
outUsedFunctions := match(inExp)
Expand Down Expand Up @@ -1600,7 +1600,7 @@ protected function addUnusedFunction
input Absyn.Path inPath;
input DAE.FunctionTree inFunctions;
input DAE.FunctionTree inUsedFunctions;
output DAE.FunctionTree outUsedFunctions := inUsedFunctions;
output DAE.FunctionTree outUsedFunctions = inUsedFunctions;
protected
Option<DAE.Function> f;
list<DAE.Element> body;
Expand Down Expand Up @@ -1814,9 +1814,9 @@ protected function countOperations0 "author: Frenkel TUD 2011-05"
input BackendDAE.EqSystem isyst;
input BackendDAE.Shared inShared;
input Boolean inChanged;
output BackendDAE.EqSystem osyst := isyst;
output BackendDAE.Shared outShared := inShared;
output Boolean outChanged := inChanged;
output BackendDAE.EqSystem osyst = isyst;
output BackendDAE.Shared outShared = inShared;
output Boolean outChanged = inChanged;
protected
list<BackendDAE.compInfo> compInfos;
BackendDAE.StrongComponents comps;
Expand Down Expand Up @@ -3556,7 +3556,7 @@ protected function replaceEdgeChange0 "author: Frenkel TUD 2012-11"
input BackendDAE.Shared inShared;
input Boolean inChanged;
output BackendDAE.EqSystem osyst;
output BackendDAE.Shared outShared := inShared;
output BackendDAE.Shared outShared = inShared;
output Boolean outChanged;
algorithm
(osyst, outChanged) := matchcontinue (isyst)
Expand Down Expand Up @@ -4014,7 +4014,7 @@ protected function introduceDerAliasWork
input BackendDAE.EqSystem syst;
input BackendDAE.Shared shared;
output BackendDAE.EqSystem osyst;
output BackendDAE.Shared oshared := shared;
output BackendDAE.Shared oshared = shared;
protected
Option<BackendDAE.IncidenceMatrix> m, mT;
BackendDAE.Variables vars, vars1;
Expand Down Expand Up @@ -4141,7 +4141,7 @@ protected function applyRewriteRulesBackend0
input BackendDAE.Shared inShared;
input Boolean inChanged;
output BackendDAE.EqSystem osyst;
output BackendDAE.Shared outShared := inShared;
output BackendDAE.Shared outShared = inShared;
output Boolean outChanged;
algorithm
(osyst, outChanged) := matchcontinue (isyst)
Expand Down
16 changes: 8 additions & 8 deletions Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -123,7 +123,7 @@ public function eqnAssignmentNonScalar
output array<list<Integer>> outAcc;
protected
list<Integer> elst, vlst;
list<list<Integer>> acc := {};
list<list<Integer>> acc = {};
algorithm
for i in 1:arrayLength(mapEqnIncRow) loop
elst := mapEqnIncRow[i];
Expand All @@ -139,7 +139,7 @@ public function varAssignmentNonScalar
output array<Integer> outAcc;
protected
Integer e;
list<Integer> acc := {};
list<Integer> acc = {};
algorithm
for i in 1:arrayLength(ass1) loop
e := ass1[i];
Expand Down Expand Up @@ -1370,8 +1370,8 @@ protected function traverseBackendDAEExpsWhenOperator<ArgT>
input list<BackendDAE.WhenOperator> inReinitStmtLst;
input FuncExpType func;
input ArgT inArg;
output list<BackendDAE.WhenOperator> outReinitStmtLst := {};
output ArgT outArg := inArg;
output list<BackendDAE.WhenOperator> outReinitStmtLst = {};
output ArgT outArg = inArg;
partial function FuncExpType
input DAE.Exp inExp;
input ArgT inArg;
Expand Down Expand Up @@ -1420,8 +1420,8 @@ public function traverseBackendDAEExpsWhenClauseLst<ArgT>
input list<BackendDAE.WhenClause> inWhenClauseLst;
input FuncExpType func;
input ArgT inArg;
output list<BackendDAE.WhenClause> outWhenClauseLst := {};
output ArgT outArg := inArg;
output list<BackendDAE.WhenClause> outWhenClauseLst = {};
output ArgT outArg = inArg;
partial function FuncExpType
input DAE.Exp inExp;
input ArgT inArg;
Expand Down Expand Up @@ -1462,8 +1462,8 @@ public function traverseExpsOfEquationList<ArgT> "author: Frenkel TUD 2010-11
input list<BackendDAE.Equation> inEquations;
input FuncExpType func;
input ArgT inArg;
output list<BackendDAE.Equation> outEquations := {};
output ArgT outArg := inArg;
output list<BackendDAE.Equation> outEquations = {};
output ArgT outArg = inArg;

partial function FuncExpType
input DAE.Exp inExp;
Expand Down
44 changes: 22 additions & 22 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -899,7 +899,7 @@ protected function calculateValueTraverser
input FCore.Cache inCache;
input FCore.Graph inEnv;
output BackendDAE.Var outVar;
output FCore.Cache outCache := inCache;
output FCore.Cache outCache = inCache;
algorithm
if BackendVariable.isParam(inVar) then
outVar := calculateValue(inVar, inCache, inEnv);
Expand Down Expand Up @@ -2541,7 +2541,7 @@ public function incidenceMatrixDispatch
input BackendDAE.Variables inVars;
input BackendDAE.EquationArray inEqns;
input BackendDAE.IndexType inIndexType;
input Option<DAE.FunctionTree> functionTree := NONE();
input Option<DAE.FunctionTree> functionTree = NONE();
output BackendDAE.IncidenceMatrix outIncidenceArray;
output BackendDAE.IncidenceMatrixT outIncidenceArrayT;
protected
Expand Down Expand Up @@ -2573,14 +2573,14 @@ protected function incidenceMatrixDispatchScalar
input BackendDAE.IndexType inIndexType;
input Option<DAE.FunctionTree> functionTree;
output BackendDAE.IncidenceMatrix outIncidenceArray;
output BackendDAE.IncidenceMatrixT outIncidenceArrayT := outIncidenceArrayT;
output BackendDAE.IncidenceMatrixT outIncidenceArrayT = outIncidenceArrayT;
output array<list<Integer>> omapEqnIncRow;
output array<Integer> omapIncRowEqn;
protected
Integer num_eqs, num_vars, size, num_rows := 0;
Integer num_eqs, num_vars, size, num_rows = 0;
BackendDAE.Equation eq;
list<Integer> row, row_indices, imap := {};
list<BackendDAE.IncidenceMatrixElement> iarr := {};
list<Integer> row, row_indices, imap = {};
list<BackendDAE.IncidenceMatrixElement> iarr = {};
algorithm
num_eqs := equationArraySize(inEqns);
num_vars := BackendVariable.varsSize(inVars);
Expand Down Expand Up @@ -2613,7 +2613,7 @@ protected function fillincidenceMatrixT
input BackendDAE.IncidenceMatrixElement eqns;
input list<Integer> eqnsindxs;
input BackendDAE.IncidenceMatrixT inIncidenceArrayT;
output BackendDAE.IncidenceMatrixT outIncidenceArrayT := inIncidenceArrayT;
output BackendDAE.IncidenceMatrixT outIncidenceArrayT = inIncidenceArrayT;
protected
BackendDAE.IncidenceMatrixElement row;
list<Integer> ei;
Expand Down Expand Up @@ -2757,8 +2757,8 @@ protected function incidenceRowLst
input BackendDAE.IndexType inIndexType;
input Option<DAE.FunctionTree> functionTree;
input list<Integer> inIntegerLst;
output list<Integer> outIntegerLst := inIntegerLst;
output Integer rowSize := 0;
output list<Integer> outIntegerLst = inIntegerLst;
output Integer rowSize = 0;
protected
Integer size;
algorithm
Expand All @@ -2778,8 +2778,8 @@ protected function incidenceRowLstLst
input BackendDAE.IndexType inIndexType;
input Option<DAE.FunctionTree> functionTree;
input list<Integer> inIntegerLst;
output list<Integer> outIntegerLst := inIntegerLst;
output Integer rowSize := 0;
output list<Integer> outIntegerLst = inIntegerLst;
output Integer rowSize = 0;
protected
Integer size;
algorithm
Expand Down Expand Up @@ -6272,8 +6272,8 @@ public function traverseArrayNoCopy<ArrT, ElemT, ArgT>
input ElemFuncType inElemFunc;
input ArrayFuncType inArrayFunc;
input ArgT inArg;
input Integer inLength := arrayLength(inArray);
output ArgT outArg := inArg;
input Integer inLength = arrayLength(inArray);
output ArgT outArg = inArg;

partial function ElemFuncType
input ElemT inElement;
Expand Down Expand Up @@ -6303,8 +6303,8 @@ public function traverseArrayNoCopyWithStop<ArrT, ElemT, ArgT>
input ElemFuncType inElemFunc;
input ArrayFuncType inArrayFunc;
input ArgT inArg;
input Integer inLength := arrayLength(inArray);
output ArgT outArg := inArg;
input Integer inLength = arrayLength(inArray);
output ArgT outArg = inArg;

partial function ElemFuncType
input ElemT inElement;
Expand Down Expand Up @@ -6337,9 +6337,9 @@ public function traverseArrayNoCopyWithUpdate<ArrT, ElemT, ArgT>
input ElemFuncType inElemFunc;
input ArrayFuncType inArrayFunc;
input ArgT inArg;
input Integer inLength := arrayLength(inArray);
output array<ArrT> outArray := inArray;
output ArgT outArg := inArg;
input Integer inLength = arrayLength(inArray);
output array<ArrT> outArray = inArray;
output ArgT outArg = inArg;

partial function ElemFuncType
input ElemT inElement;
Expand Down Expand Up @@ -6849,10 +6849,10 @@ end traverseZeroCrossingExps;
public function getSolvedSystem "Run the equation system pipeline."
input BackendDAE.BackendDAE inDAE;
input String fileNamePrefix;
input Option<list<String>> strPreOptModules := NONE();
input Option<String> strmatchingAlgorithm := NONE();
input Option<String> strdaeHandler := NONE();
input Option<list<String>> strPostOptModules := NONE();
input Option<list<String>> strPreOptModules = NONE();
input Option<String> strmatchingAlgorithm = NONE();
input Option<String> strdaeHandler = NONE();
input Option<list<String>> strPostOptModules = NONE();
output BackendDAE.BackendDAE outSODE;
protected
BackendDAE.BackendDAE optdae, sode, sode1, optsode;
Expand Down

0 comments on commit 4950de8

Please sign in to comment.