Skip to content

Commit

Permalink
- Removed some unused variables
Browse files Browse the repository at this point in the history
- Set LF line endings
- Updated refactoring script to contain more profanity (fuck yeah!)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12535 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 15, 2012
1 parent 57cd95b commit 989a7ca
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 95 deletions.
3 changes: 1 addition & 2 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -1827,7 +1827,6 @@ algorithm
DAE.Ident iteratorName;
DAE.Exp e,iteratorExp;
list<DAE.Exp> iteratorexps, expExpLst;
list<tuple<DAE.ComponentRef,Absyn.Info>> loopPrlVars "list of parallel variables used/referenced in a parfor loop";

case (v,_,{},_) then v;
case (v,knv,(DAE.STMT_ASSIGN(exp1 =DAE.CREF(componentRef = cr)) :: xs),true)
Expand Down Expand Up @@ -2697,7 +2696,7 @@ algorithm
DAE.Operator op;
list<BackendDAE.ZeroCrossing> newzero,zc_lst;
BackendDAE.ZeroCrossing z_c;
Integer indx,length,wc_count/*, new_idx*/;
Integer indx,length;
String str;
case ((exp as DAE.RELATION(exp1 = e1,operator = op,exp2 = e2)),index,zeroCrossings,z_c)
equation
Expand Down
1 change: 0 additions & 1 deletion Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -3800,7 +3800,6 @@ protected function varStateSelectHeuristicPrio5
output Real prio;
algorithm
prio := matchcontinue(v)
local Integer i; Real c;
case(v)
equation
true = BackendVariable.varFixed(v);
Expand Down
30 changes: 0 additions & 30 deletions Compiler/BackEnd/Matching.mo
Expand Up @@ -550,7 +550,6 @@ algorithm
String s;
BackendDAE.IncidenceMatrix m1,mt1;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
BackendDAE.StructurallySingularSystemHandlerArg arg;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
Expand Down Expand Up @@ -880,7 +879,6 @@ algorithm
list<Integer> visitedcolums;
BackendDAE.IncidenceMatrix m1,mt1;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
BackendDAE.StructurallySingularSystemHandlerArg arg;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
Expand Down Expand Up @@ -1147,7 +1145,6 @@ algorithm
list<Integer> visitedcolums,changedEqns;
BackendDAE.IncidenceMatrix m1,mt1;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
BackendDAE.StructurallySingularSystemHandlerArg arg;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
Expand Down Expand Up @@ -1512,7 +1509,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -1575,14 +1571,10 @@ algorithm
(outunmatched,outrowmarks,outlookahead,nvars,neqns,outAss1,outAss2,osyst,oshared,outArg):=
match (meqns,unmatched,changedEqns,rowmarks,lookahead,isyst,ishared,nv,ne,ass1,ass2,inMatchingOptions,sssHandler,inArg)
local
BackendDAE.IncidenceMatrix m;
Integer nv_1,ne_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg;
DAE.ElementSource source;
Absyn.Info info;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
array<Integer> ass1_1,ass2_1,rowmarks1,lookahead1;
Expand Down Expand Up @@ -1928,7 +1920,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -2297,7 +2288,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -2362,14 +2352,10 @@ algorithm
(outunmatched,outrowmarks,outcollummarks,outlevel,nvars,neqns,outAss1,outAss2,osyst,oshared,outArg):=
match (meqns,unmatched,changedEqns,rowmarks,collummarks,level,isyst,ishared,nv,ne,ass1,ass2,inMatchingOptions,sssHandler,inArg)
local
BackendDAE.IncidenceMatrix m;
Integer nv_1,ne_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg;
DAE.ElementSource source;
Absyn.Info info;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
array<Integer> ass1_1,ass2_1,rowmarks1,collummarks1,level1;
Expand Down Expand Up @@ -2418,7 +2404,6 @@ algorithm
list<Integer> unmatched;
list<tuple<Integer,Integer>> rows;
Integer i_1;
Boolean b;
case (_,{},_,_,_,_,_,_,_,_,_,_,_)
equation
// no augmenting path is found in phase
Expand Down Expand Up @@ -2962,7 +2947,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1,i_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -3021,7 +3005,6 @@ algorithm
list<tuple<Integer,Integer>> rows;
list<Integer> ur;
Integer i_1;
Boolean b;
case (_,{},_,_,_,_,_,_,_,_,_,_,_)
equation
// no augmenting path is found in phase
Expand Down Expand Up @@ -3300,7 +3283,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1,i_1,lim;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -3369,14 +3351,10 @@ algorithm
(outunmatched,outrowmarks,outcollummarks,outlevel,outrlevel,nvars,neqns,outAss1,outAss2,osyst,oshared,outArg):=
match (meqns,unmatched,changedEqns,rowmarks,collummarks,level,rlevel,isyst,ishared,nv,ne,ass1,ass2,inMatchingOptions,sssHandler,inArg)
local
BackendDAE.IncidenceMatrix m;
Integer nv_1,ne_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg;
DAE.ElementSource source;
Absyn.Info info;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
array<Integer> ass1_1,ass2_1,rowmarks1,collummarks1,level1,rlevel1;
Expand Down Expand Up @@ -3627,7 +3605,6 @@ algorithm
local
list<Integer> rest,queue1,unmatched;
Integer rc,r;
Boolean b;
case ({},_,_,_,_,_,_,_,_,_,_,_,_) then (listReverse(queue),unMatched);
case (r::rest,_,_,_,_,_,_,_,_,_,_,_,_)
equation
Expand Down Expand Up @@ -4017,7 +3994,6 @@ algorithm
local
BackendDAE.IncidenceMatrix m,mt;
Integer nv_1,ne_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1,meqns_1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg,arg1;
Expand Down Expand Up @@ -4082,14 +4058,10 @@ algorithm
(outunmatched,outl_label,outr_label,nvars,neqns,outAss1,outAss2,osyst,oshared,outArg):=
match (meqns,unmatched,changedEqns,l_label,r_label,isyst,ishared,nv,ne,ass1,ass2,inMatchingOptions,sssHandler,inArg)
local
BackendDAE.IncidenceMatrix m;
Integer nv_1,ne_1;
BackendDAE.EquationConstraints eq_cons;
list<Integer> unmatched1;
String eqn_str;
BackendDAE.StructurallySingularSystemHandlerArg arg;
DAE.ElementSource source;
Absyn.Info info;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
array<Integer> ass1_1,ass2_1,l_label1,r_label1;
Expand Down Expand Up @@ -5784,7 +5756,6 @@ algorithm
local
list<Integer> rest,queue;
Integer rc,r;
Boolean b;
case ({},_,_,_,_) then inEqns;
case (r::rest,_,_,_,_)
equation
Expand Down Expand Up @@ -5920,7 +5891,6 @@ algorithm
_ := matchcontinue (nvars,neqns,inMatchingOptions)
local
Integer esize,vars_size;
BackendDAE.EquationArray eqns;
String esize_str,vsize_str;
case (_,_,(_,BackendDAE.ALLOW_UNDERCONSTRAINED())) then ();
case (_,_,_)
Expand Down
12 changes: 2 additions & 10 deletions Compiler/BackEnd/MathematicaDump.mo
Expand Up @@ -79,7 +79,6 @@ algorithm
DAE.ComponentRef cr;
BackendDAE.Variables vars,knvars;
String s1,s2;
Integer indx;
DAE.Algorithm alg;
BackendDAE.WhenEquation whenEq;

Expand Down Expand Up @@ -145,7 +144,6 @@ algorithm
local
Expression.Ident s,s_1,s1_1,s_2,s2_1,sym,s2,s3,s3_1,s4,s_3,ifstr,thenstr,elsestr,res,fs,argstr,s_4,s_5,res2,str,crstr,dimstr,expstr,iterstr,id;
Integer p,p1,p2,ival,i,pstart,pstop,pe1;
Real rval;
DAE.ComponentRef cr;
DAE.Type tp;
DAE.Exp e1,e2,e,f,start,stop,step,dim,exp,iterexp,c,t;
Expand All @@ -155,11 +153,8 @@ algorithm
Real x,x2;
String fname,s1;
String s_11;
list<list<tuple<DAE.Exp, Boolean>>> ms;
list<list<DAE.Exp>> matrix;
list<DAE.Exp> ae1,expLst;
Boolean builtin;
DAE.InlineType inlineTp;
DAE.CallAttributes call_attr;


Expand Down Expand Up @@ -563,14 +558,14 @@ protected function relopSymbolMma "
input DAE.Operator inOperator;
output String outString;
algorithm
outString := matchcontinue (inOperator)
outString := match (inOperator)
case (DAE.LESS(ty = _)) then " < ";
case (DAE.LESSEQ(ty = _)) then " <= ";
case (DAE.GREATER(ty = _)) then " > ";
case (DAE.GREATEREQ(ty = _)) then " >= ";
case (DAE.EQUAL(ty = _)) then " == ";
case (DAE.NEQUAL(ty = _)) then " != "; // differs from Modelica which has '<>'
end matchcontinue;
end match;
end relopSymbolMma;

protected function printBuiltinMmaFunc "Translates builtin function to corresponding Mma function"
Expand Down Expand Up @@ -755,7 +750,6 @@ print variables that are top level OUTPUT's
algorithm
str := matchcontinue(param)
local
DAE.Exp exp;
BackendDAE.Var v;
DAE.ComponentRef name;
String ident;
Expand All @@ -776,7 +770,6 @@ print variables that are INPUT's
algorithm
str := matchcontinue(param)
local
DAE.Exp exp;
DAE.ComponentRef name;
String ident;
BackendDAE.Var v;
Expand All @@ -800,7 +793,6 @@ E.g. {R1R->1.0,R2R->R1R*0.5,I3I->0.1}
algorithm
(params, inputs) := match(knvars)
local
String s1;
list<BackendDAE.Var> varLst;
case(knvars) equation
varLst = BackendDAEUtil.varList(knvars);
Expand Down
1 change: 0 additions & 1 deletion Compiler/BackEnd/SimCode.mo
Expand Up @@ -5201,7 +5201,6 @@ algorithm
list<tuple<Integer, Integer, BackendDAE.Equation>> jac;
list<tuple<Integer, Integer, SimEqSystem>> simJac;
Integer linInfo;
array< .DAE.Algorithm> algorithms;
array<DAE.Constraint> constrs;
array<DAE.ClassAttributes> clsAttrs;
list<list<Real>> jacVals;
Expand Down

0 comments on commit 989a7ca

Please sign in to comment.