Skip to content

Commit

Permalink
- Removed 1213 unused variables (automatically, using testsuite/boots…
Browse files Browse the repository at this point in the history
…trapping/refactor-mc-to-m.sh)

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7654 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jan 6, 2011
1 parent 2ba0e58 commit bd8db46
Show file tree
Hide file tree
Showing 57 changed files with 834 additions and 834 deletions.
32 changes: 16 additions & 16 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -233,8 +233,8 @@ algorithm
DAE.Element daeEl;
list<DAE.Element> daeLstRest;
BackendDAE.BinTree states;
BackendDAE.Equation backendEq, backendEq1, backendEq2;
DAE.Exp e1,e2,c;
BackendDAE.Equation backendEq2;
DAE.Exp c;
list<BackendDAE.Value> ds;
BackendDAE.Value count,count_1;
DAE.Algorithm a,a1,a2;
Expand All @@ -246,8 +246,8 @@ algorithm
DAE.FunctionTree funcs;
list<DAE.Element> daeElts;
DAE.ElementSource eq_source;
DAE.Exp e_11,e_21;
list<DAE.Exp> ea1,ea2;
DAE.Exp e_21;
list<DAE.Exp> ea2;
list<tuple<DAE.Exp,DAE.Exp>> ealst;
BackendDAE.MultiDimEquation backendMultiDimEq;
list<Option<BackendDAE.Equation>> opteqlst;
Expand All @@ -258,7 +258,7 @@ algorithm
Absyn.Path func_name;
list<DAE.Exp> args;
DAE.Statement s;
Boolean b1, b2, b;
Boolean b;
String str;
DAE.Element ddl;
String s3;
Expand Down Expand Up @@ -318,7 +318,7 @@ algorithm
matchcontinue (inElement,functionTree,inVariables,inKnownVariables,inExternalVariables,inEquationLst3,inEquationLst4,inEquationLst5,
inMultiDimEquationLst6,inMultiDimEquationLst7,inAlgorithmAlgorithmLst8,inAlgorithmAlgorithmLst9,inWhenClauseLst10,inExtObjClasses,inStatesBinTree)
local
BackendDAE.Variables v1,v2,v3,vars,knvars,extVars,extVars1,extVars2,vars_1,knvars_1,vars1,vars2,knvars1,knvars2,kv;
BackendDAE.Variables vars,knvars,extVars,extVars1,extVars2,vars_1,knvars_1,vars1,vars2,knvars1,knvars2,kv;
list<BackendDAE.WhenClause> whenclauses,whenclauses_1,whenclauses_2;
list<BackendDAE.Equation> eqns,reqns,ieqns,eqns1,eqns2,reqns1,ieqns1,reqns2,ieqns2,re,ie,eqsComplex;
list<BackendDAE.MultiDimEquation> aeqns,aeqns1,aeqns2,ae,iaeqns,iaeqns1,iaeqns2,iae;
Expand All @@ -328,7 +328,7 @@ algorithm
DAE.Element daeEl;
list<DAE.Element> daeLstRest;
BackendDAE.BinTree states;
BackendDAE.Equation backendEq, backendEq1, backendEq2;
BackendDAE.Equation backendEq1, backendEq2;
DAE.Exp e1,e2,c;
list<BackendDAE.Value> ds;
BackendDAE.Value count,count_1;
Expand Down Expand Up @@ -1226,8 +1226,8 @@ algorithm
BackendDAE.Value i;
list<BackendDAE.Equation> eqnl;
list<BackendDAE.WhenOperator> reinit;
DAE.Exp e_2,cre,e,cond;
DAE.ComponentRef cr_1,cr,cref_;
DAE.Exp cre,e,cond;
DAE.ComponentRef cr,cref_;
list<DAE.Element> xs;
DAE.Element el;
DAE.ElementSource source "the element source";
Expand Down Expand Up @@ -1327,7 +1327,7 @@ algorithm
alg := match(eqn)
local
DAE.ElementSource source;
DAE.Exp e1,e2;
DAE.Exp e2;
list<DAE.Exp> expl;
/* Only succeds for tuple equations, i.e. (a,b,c) = foo(x,y,z) or foo(x,y,z) = (a,b,c) */
case(DAE.EQUATION(DAE.TUPLE(expl),e2 as DAE.CALL(path =_),source))
Expand Down Expand Up @@ -1872,7 +1872,7 @@ algorithm
matchcontinue (inElems,inBinTree)
local
BackendDAE.BinTree bt;
DAE.Exp e1,e2;
DAE.Exp e2;
list<DAE.Element> xs;
DAE.DAElist dae;
DAE.FunctionTree funcs;
Expand Down Expand Up @@ -2859,10 +2859,10 @@ public function traverseAlgStmts "function: traverseAlgStmts
algorithm
zeroCrossings := matchcontinue(inStmts,vars,knvars)
local
DAE.Exp e_1,e_2,e,e2,iteratorExp;
DAE.Exp e,e2,iteratorExp;
list<DAE.Exp> expl1,expl2,zcl,zcl1,zcl2,zcl3,zcl4,iteratorexps;
DAE.ComponentRef cr_1,cr;
list<DAE.Statement> xs_1,xs,stmts,stmts2;
DAE.ComponentRef cr;
list<DAE.Statement> xs,stmts,stmts2;
DAE.ExpType tp,tt;
DAE.Statement x,ew,ew_1;
Boolean b1;
Expand Down Expand Up @@ -3345,10 +3345,10 @@ algorithm
outTuplEqnLst := matchcontinue(inExp,Source,inFuncs)
local
DAE.Exp e1,e2,e1_1,e2_1,e2_2;
list<DAE.Exp> e1lst, e2lst;
list<DAE.Exp> e2lst;
DAE.ElementSource source;
DAE.ComponentRef cr1,cr2;
list<DAE.ComponentRef> crlst1,crlst2;
list<DAE.ComponentRef> crlst2;
BackendDAE.Equation eqn;
Expression.Type tp;
list<DAE.Dimension> ad;
Expand Down
14 changes: 7 additions & 7 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -114,7 +114,7 @@ algorithm
list<BackendDAE.MultiDimEquation> arreqns,arreqns1,arreqns2;
BackendDAE.BinTree movedvars_1,states,outputs;
BackendDAE.Variables vars_1,knvars_1,vars,knvars,knvars_2;
list<DAE.Exp> crlst,elst;
list<DAE.Exp> elst;
list<DAE.Algorithm> algs,algs_1;
list<tuple<list<DAE.Exp>,list<DAE.Exp>>> inputsoutputs;
BackendDAE.AliasVariables varsAliases;
Expand Down Expand Up @@ -1580,7 +1580,7 @@ algorithm
DAE.ElementSource source;
DAE.ExpType identType;
list<DAE.Subscript> subscriptLst;
Integer replace,replace1;
Integer replace1;

case (dlow,dlow1,m,mT,v1,v2,comp,vars,exclude,residualeqn,residualeqns,tearingvars,tearingeqns,crlst)
equation
Expand Down Expand Up @@ -2110,7 +2110,7 @@ algorithm
list<Integer> rest;
list<list<Integer>> vars;
Integer var;
list<Integer> intlst,ilst2;
list<Integer> ilst2;
Integer i;
array<Integer> arr,arr1;
list<String> s,s1;
Expand Down Expand Up @@ -2463,9 +2463,9 @@ algorithm
list<DAE.ComponentRef> restVars;
Integer algNum;

list<BackendDAE.Var> currDerivedVariables, restDerivedVariables, derivedVariables;
list<BackendDAE.Var> derivedVariables;
list<BackendDAE.Equation> currDerivedEquations, restDerivedEquations, derivedEquations;
list<DAE.Algorithm> currDerivedAlgorithms, restDerivedAlgorithms, derivedAlgorithms;
list<DAE.Algorithm> derivedAlgorithms;

list<BackendDAE.Var> inputVars, paramVars, stateVars;
list<tuple<Integer, DAE.ComponentRef>> algorithmsLookUp;
Expand Down Expand Up @@ -2514,7 +2514,7 @@ algorithm
list<BackendDAE.Var> inputVars, paramVars, stateVars;
Integer index;
list<DAE.Exp> in_, derivedIn_,out, derivedOut;
DAE.Algorithm singleAlgorithm, derivedAlgorithm;
DAE.Algorithm derivedAlgorithm;
list<tuple<Integer, DAE.ComponentRef>> algorithmsLookUp;
Integer newAlgIndex;
case(currEquation as BackendDAE.EQUATION(exp=lhs, scalar=rhs, source=source), var, functions, inputVars, paramVars, stateVars, _) equation
Expand Down Expand Up @@ -2942,7 +2942,7 @@ protected function partialAnalyticalDifferentiation
algorithm
outExp := match(varExpList, derVarExpList, functionCall, derFname, nDerArgs)
local
DAE.Exp e, currVar, currDerVar, derFun, delta, absCurr;
DAE.Exp e, currVar, currDerVar, derFun, absCurr;
list<DAE.Exp> restVar, restDerVar, varExpList1Added, varExpListTotal;
DAE.ExpType et;
Boolean tuple_, builtin;
Expand Down
10 changes: 5 additions & 5 deletions Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -1298,7 +1298,7 @@ algorithm
array<DAE.Algorithm> al;
BackendDAE.EventInfo wc;
BackendDAE.ExternalObjectClasses eoc;
BackendDAE.BackendDAE daelow, daelow_1;
BackendDAE.BackendDAE daelow_1;

case (BackendDAE.DAE(vars,kv,ev,av,e,se,ie,ae,al,wc,eoc),cr)
equation
Expand Down Expand Up @@ -1549,7 +1549,7 @@ protected function traverseBackendDAEExpsEqn
algorithm
(outEquation,outAlgs,outMultiDimEquationArray,outWhenClauseLst,outTypeA) := matchcontinue (inEquation,inAlgs,inMultiDimEquationArray,inWhenClauseLst,func,inTypeA)
local
DAE.Exp dercall,e1_1,e2_1,e1,e2;
DAE.Exp e1_1,e2_1,e1,e2;
DAE.ComponentRef cr,cr1;
BackendDAE.Value ds,indx,i;
list<DAE.Exp> expl,expl1,in_,in_1,out,out1;
Expand Down Expand Up @@ -2131,7 +2131,7 @@ algorithm
outTpl := matchcontinue(inTpl)
local
DAE.ComponentRef cr,cr2;
DAE.Ident id1,id2;
DAE.Ident id2;
BackendDAE.Var v;
Integer i;
case((v,(cr,i)))
Expand All @@ -2153,7 +2153,7 @@ protected function varStateSelectHeuristicPrio2
algorithm
prio := matchcontinue(cr,vars)
local
list<BackendDAE.Var> varLst,sameCompVarLst;
list<BackendDAE.Var> sameCompVarLst;
case(cr,vars)
equation
((_,true)) = BackendVariable.traverseBackendDAEVars(vars,varInSameComponent,(cr,false));
Expand Down Expand Up @@ -2354,7 +2354,7 @@ algorithm
local
list<BackendDAE.Key> res1,res11,res1_1;
list<BackendDAE.Value> res2,vars2,res22,res2_1,rest;
BackendDAE.Value e_1,e;
BackendDAE.Value e;
BackendDAE.Equation eqn;
BackendDAE.Variables vars;
BackendDAE.EquationArray eqns;
Expand Down
12 changes: 6 additions & 6 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -2611,9 +2611,9 @@ algorithm
local
String rkeystr,keystr;
DAE.ComponentRef rkey;
BackendDAE.Value rval,cmpval,res;
Option<BackendDAE.BinTree> optLeft,optRight;
BackendDAE.BinTree right, left;
BackendDAE.Value cmpval,res;
Option<BackendDAE.BinTree> optRight;
BackendDAE.BinTree left;

// found it
case (BackendDAE.TREENODE(value = SOME(BackendDAE.TREEVALUE(key=rkey))),keystr)
Expand All @@ -2632,10 +2632,10 @@ protected function treeGet3
algorithm
outValue := match (inBinTree,inString,compResult)
local
String rkeystr,keystr;
String keystr;
DAE.ComponentRef rkey;
BackendDAE.Value rval,cmpval,res;
Option<BackendDAE.BinTree> optLeft,optRight;
Option<BackendDAE.BinTree> optRight;
BackendDAE.BinTree right, left;

// found it
Expand Down Expand Up @@ -2967,7 +2967,7 @@ algorithm outExp := matchcontinue(inExp)
Integer i,j;
list<list<DAE.Subscript>> subslst,subslst1;
list<DAE.Exp> expl;
DAE.Exp e,e_new;
DAE.Exp e_new;
list<DAE.ExpVar> varLst;
Absyn.Path name;
tuple<DAE.Exp, Option<DAE.FunctionTree> > restpl;
Expand Down
10 changes: 5 additions & 5 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -102,7 +102,7 @@ algorithm
Expression.Ident s,s_1,s_2,fs,argstr;
Absyn.Path fcn;
list<DAE.Exp> args;
DAE.Exp e,e1,e2;
DAE.Exp e1,e2;
Expression.Type ty;
case( DAE.CALL(path = Absyn.IDENT("DIVISION"), expLst = {e1,e2,DAE.SCONST(_)}, tuple_ = false,builtin = true,ty = ty,inlineType = DAE.NO_INLINE()), _, _)
equation
Expand Down Expand Up @@ -737,9 +737,9 @@ algorithm
outString := match (inWhenEqn)
local
String s1,s2,res,indx_str,is,var_str,intsStr,outsStr;
DAE.Exp e1,e2,e;
BackendDAE.Value indx,i;
list<DAE.Exp> expl,inps,outs;
DAE.Exp e2,e;
BackendDAE.Value i;
list<DAE.Exp> outs;
DAE.ComponentRef cr;
BackendDAE.WhenEquation weqn;
case (BackendDAE.WHEN_EQ(index = i,left = cr,right = e2, elsewhenPart = SOME(weqn)))
Expand Down Expand Up @@ -1220,7 +1220,7 @@ algorithm
match (inBackendDAE,inIntegerLst)
local
String s1,s2,res,s3;
BackendDAE.Value v_1,v;
BackendDAE.Value v;
DAE.ComponentRef cr;
BackendDAE.BackendDAE dae;
BackendDAE.Variables vars;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendVarTransform.mo
Expand Up @@ -604,7 +604,7 @@ algorithm
VarTransform.VariableReplacements repl;
list<DAE.Statement> statementLst,statementLst_1;
DAE.Exp e1,e1_1,e1_2;
list<DAE.Exp> expExpLst,expExpLst_1;
list<DAE.Exp> expExpLst_1;
DAE.Else else_,else_1;
case (DAE.NOELSE(),_) then DAE.NOELSE();
case (DAE.ELSEIF(exp=e1,statementLst=statementLst,else_=else_),repl)
Expand Down
8 changes: 4 additions & 4 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -1249,7 +1249,7 @@ algorithm
BackendDAE.Var v;
BackendDAE.Value n,pos,len;
array<Option<BackendDAE.Var>> arr;
String ps,lens,ns;
String lens,ns;
case (BackendDAE.VARIABLE_ARRAY(numberOfElements = n,varOptArr = arr),pos)
equation
(pos < n) = true;
Expand Down Expand Up @@ -1413,7 +1413,7 @@ algorithm
outTypeALst := matchcontinue (inTypeALst,inPlace)
local
list<tuple<Type_a,Integer>> itemlst,rest;
Type_a item,outitem;
Type_a outitem;
Integer place,itemplace;
list<Type_a> out_lst,val_lst;
case ({},place) then {};
Expand Down Expand Up @@ -1710,7 +1710,7 @@ algorithm
outval:=
matchcontinue (invar1,invar2)
local
DAE.Ident origName1,origName2;
DAE.Ident origName2;
DAE.ComponentRef varName1, varName2,c1,c2;
list<DAE.Subscript> arryDim, arryDim1;
list<DAE.Subscript> subscriptLst, subscriptLst1;
Expand Down Expand Up @@ -1810,7 +1810,7 @@ algorithm
dimlist:=
match (inarryDim)
local
list<DAE.Subscript> arryDim_lst,rest;
list<DAE.Subscript> rest;
DAE.Subscript arryDim;
list<Integer> dim_lst,dim_lst1;
Integer dim;
Expand Down
4 changes: 2 additions & 2 deletions Compiler/BackEnd/DAEQuery.mo
Expand Up @@ -234,7 +234,7 @@ algorithm
strRow :=
matchcontinue (inStringLst)
local
String s, s1, s2, x;
String s, s2, x;
list<String> xs;
case ({}) then "";
case ((x :: {})) then x;
Expand Down Expand Up @@ -370,7 +370,7 @@ algorithm
matchcontinue (inVarLst,inInteger)
local
String varnostr,dirstr,str,path_str,comment_str,s,indx_str,str1,str2;
list<String> paths_lst,path_strs;
list<String> path_strs;
Integer varno_1,indx,varno;
BackendDAE.Var v;
DAE.ComponentRef cr,old_name;
Expand Down
8 changes: 4 additions & 4 deletions Compiler/BackEnd/Derive.mo
Expand Up @@ -98,7 +98,7 @@ algorithm
list<tuple<Integer,Integer,Integer>> derivedAlgs,derivedMultiEqn;
Boolean add;
array<BackendDAE.MultiDimEquation> ae,ae1;
list<BackendDAE.MultiDimEquation> listae,listae1;
list<BackendDAE.MultiDimEquation> listae1;
list<DAE.Exp> crefOrDerCref,crefOrDerCref1,crefOrDerCref11,crefOrDerCref2,crefOrDerCref21,crefOrDerCref3,derCref1,derCref2;
list<Integer> dimSize;
String msg;
Expand Down Expand Up @@ -342,7 +342,7 @@ algorithm
list<list<DAE.ComponentRef>> crefslstls;
list<DAE.ComponentRef> crefs;
list<Boolean> blst;
String cr_str,cr_str_1,e_str,str,s1;
String e_str,str,s1;
DAE.Exp e,e_1,e1_1,e2_1,e1,e2,e3_1,e3,d_e1,exp,e0,zero;
BackendDAE.Variables timevars;
DAE.Operator op,rel;
Expand Down Expand Up @@ -813,7 +813,7 @@ algorithm
Integer derivativeOrder;
DAE.Type tp,dtp;
list<DAE.Type> tlst,tlst1,tlst2;
list<DAE.Exp> explst,dexplst,dexplst1,dexplst_1,dexplst1_1;
list<DAE.Exp> dexplst,dexplst1,dexplst_1,dexplst1_1;
list<Boolean> blst,blst1;
list<String> typlststring;
String typstring,dastring;
Expand Down Expand Up @@ -922,7 +922,7 @@ algorithm
(outExp) := matchcontinue (inExp,inVarsandFuncs)
local
list<DAE.Exp> expl,expl1,dexpl;
DAE.Exp e,e1;
DAE.Exp e1;
BackendDAE.Variables timevars;
Absyn.Path a,da;
Boolean b,c;
Expand Down

0 comments on commit bd8db46

Please sign in to comment.