Skip to content

Commit

Permalink
Remove short type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Nov 16, 2015
1 parent e430545 commit 44ea7be
Showing 1 changed file with 19 additions and 29 deletions.
48 changes: 19 additions & 29 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -111,16 +111,6 @@ protected import UnitCheck;
protected import Values;
protected import XMLDump;

protected
type Var = BackendDAE.Var;
type VarKind = BackendDAE.VarKind;
type VariableArray = BackendDAE.VariableArray;
type ExternalObjectClasses = BackendDAE.ExternalObjectClasses;
type BackendDAEType = BackendDAE.BackendDAEType;
type SymbolicJacobians = BackendDAE.SymbolicJacobians;
type EqSystems = BackendDAE.EqSystems;
type ZeroCrossing = BackendDAE.ZeroCrossing;

public function isInitializationDAE
input BackendDAE.Shared inShared;
output Boolean res;
Expand Down Expand Up @@ -645,7 +635,7 @@ algorithm
BackendDAE.Variables knvars;
FCore.Cache cache;
FCore.Graph graph;
EqSystems eqs;
BackendDAE.EqSystems eqs;
BackendDAE.Shared shared;

case BackendDAE.DAE(eqs, shared as BackendDAE.SHARED(knownVars=knvars, cache=cache, graph=graph))
Expand Down Expand Up @@ -682,9 +672,9 @@ protected function calculateValue
algorithm
outVar := matchcontinue(inVar)
local
Var var;
BackendDAE.Var var;
DAE.ComponentRef cr;
VarKind vk;
BackendDAE.VarKind vk;
DAE.VarDirection vd;
DAE.VarParallelism prl;
BackendDAE.Type ty;
Expand Down Expand Up @@ -772,12 +762,12 @@ algorithm
local
BackendDAE.Variables vars, knvars;
DAE.ComponentRef cr;
VarKind kind;
BackendDAE.VarKind kind;
DAE.Exp e, e1, e2;
Option<Boolean> blst;
Boolean b, b1, b2;
Boolean res;
Var backendVar;
BackendDAE.Var backendVar;
Absyn.Ident name;

case (e as DAE.CREF(componentRef=cr), (vars, knvars, blst)) equation
Expand Down Expand Up @@ -1611,7 +1601,7 @@ algorithm
BackendDAE.StrongComponent comp;
BackendDAE.StrongComponents rest;
BackendDAE.Equation eqn;
Var var;
BackendDAE.Var var;
list<BackendDAE.Equation> eqn_lst;
list<BackendDAE.Var> var_lst;
BackendDAE.EquationArray eqnsNew;
Expand Down Expand Up @@ -1784,7 +1774,7 @@ algorithm
DAE.Else algElse;
DAE.Statement stmt,ew;
DAE.ComponentRef cref;
Var v;
BackendDAE.Var v;
BackendDAE.Variables vars;
DAE.Exp e;
DAE.ElementSource source;
Expand Down Expand Up @@ -5619,10 +5609,10 @@ algorithm
end makeZeroReplacements;

protected function makeZeroReplacement "helper function to makeZeroReplacements.
Creates replacement Var-> 0"
input Var inVar;
Creates replacement BackendDAE.Var -> 0"
input BackendDAE.Var inVar;
input BackendVarTransform.VariableReplacements inRepl;
output Var var;
output BackendDAE.Var var;
output BackendVarTransform.VariableReplacements repl;
algorithm
(var,repl) := matchcontinue (inVar,inRepl)
Expand Down Expand Up @@ -5903,7 +5893,7 @@ algorithm
outTypeA:=
matchcontinue (inVariables)
local
array<Option<Var>> varOptArr;
array<Option<BackendDAE.Var>> varOptArr;
Type_a ext_arg_1;
String name;
case BackendDAE.VARIABLES(varArr = BackendDAE.VARIABLE_ARRAY(varOptArr=varOptArr))
Expand Down Expand Up @@ -5936,7 +5926,7 @@ algorithm
outTypeA:=
matchcontinue (inVariables)
local
array<Option<Var>> varOptArr;
array<Option<BackendDAE.Var>> varOptArr;
Type_a ext_arg_1;
String name;
case BackendDAE.VARIABLES(varArr = BackendDAE.VARIABLE_ARRAY(varOptArr=varOptArr))
Expand Down Expand Up @@ -6056,11 +6046,11 @@ algorithm
end traverseArrayNoCopyWithUpdate;

protected function traverseBackendDAEExpsVar "author: Frenkel TUD
Helper traverseBackendDAEExpsVar. Get all exps from a Var.
Helper traverseBackendDAEExpsVar. Get all exps from a BackendDAE.Var.
DAE.T_UNKNOWN_DEFAULT is used as type for componentref. Not important here.
We only use the exp list for finding function calls"
replaceable type Type_a subtypeof Any;
input Option<Var> inVar;
input Option<BackendDAE.Var> inVar;
input FuncExpType func;
input Type_a inTypeA;
output Type_a outTypeA;
Expand All @@ -6075,14 +6065,14 @@ algorithm
end traverseBackendDAEExpsVar;

protected function traverseBackendDAEExpsVarWithUpdate "author: Frenkel TUD
Helper traverseBackendDAEExpsVar. Get all exps from a Var.
Helper traverseBackendDAEExpsVar. Get all exps from a BackendDAE.Var.
DAE.T_UNKNOWN_DEFAULT is used as type for componentref. Not important here.
We only use the exp list for finding function calls"
replaceable type Type_a subtypeof Any;
input Option<Var> inVar;
input Option<BackendDAE.Var> inVar;
input FuncExpType func;
input Type_a inTypeA;
output Option<Var> ovar;
output Option<BackendDAE.Var> ovar;
output Type_a outTypeA;
partial function FuncExpType
input DAE.Exp inExp;
Expand All @@ -6099,7 +6089,7 @@ algorithm
Option<DAE.VariableAttributes> attr;
Option<BackendDAE.TearingSelect> ts;
Type_a ext_arg_1, ext_arg_2;
VarKind varKind;
BackendDAE.VarKind varKind;
DAE.VarDirection varDirection;
DAE.VarParallelism varParallelism;
BackendDAE.Type varType;
Expand Down Expand Up @@ -7730,7 +7720,7 @@ public function getAllVarLst "retrieve all variables of the dae by collecting th
input BackendDAE.BackendDAE dae;
output list<BackendDAE.Var> varLst;
protected
EqSystems eqs;
BackendDAE.EqSystems eqs;
BackendDAE.Variables knvars;
algorithm
BackendDAE.DAE(eqs=eqs,shared = BackendDAE.SHARED(knownVars=knvars)) := dae;
Expand Down

0 comments on commit 44ea7be

Please sign in to comment.