Skip to content

Commit

Permalink
+ Added support for local/shared variables for ParModelica.
Browse files Browse the repository at this point in the history
+ Added parallelism to function arguments.
+ More checks on scope to determine parallelism.
+ Allow assignment to inputs in ParModelica.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17945 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
mahge committed Oct 31, 2013
1 parent 89eb97f commit 10f3ed2
Show file tree
Hide file tree
Showing 25 changed files with 1,298 additions and 972 deletions.
6 changes: 3 additions & 3 deletions Compiler/BackEnd/Derive.mo
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,8 @@ algorithm
(falst1,_) = List.splitOnBoolList(falst,blst);
falst2 = listAppend(falst,falst1);
// compare with derivative function inputs
tlst = List.map(falst2,Util.tuple42);
dtlst = List.map(dfalst,Util.tuple42);
tlst = List.map(falst2,Util.tuple52);
dtlst = List.map(dfalst,Util.tuple52);
ret = List.isEqualOnTrue(tlst,dtlst,Types.equivtypes);
then
(ret,tlst);
Expand Down Expand Up @@ -971,7 +971,7 @@ algorithm
case (_,DAE.FUNCTION_DER_MAPPER(derivativeFunction=inDFuncName,derivativeOrder=derivativeOrder,conditionRefs=cr),DAE.T_FUNCTION(funcArg=funcArg),_,_)
equation
true = intEq(1,derivativeOrder);
tplst = List.map(funcArg,Util.tuple42);
tplst = List.map(funcArg,Util.tuple52);
bl = List.map(tplst,Types.isRealOrSubTypeReal);
bl1 = checkDerFunctionConds(bl,cr,expl,inVarsandFuncs);
then
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/PartFn.mo
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ protected function isNotFunctionType
output Boolean outBoolean;
algorithm
outBoolean := matchcontinue(inFuncArg)
case((_,DAE.T_FUNCTION(funcArg = _),_,_)) then false;
case((_,DAE.T_FUNCTION(funcArg = _),_,_,_)) then false;
case(_) then true;
end matchcontinue;
end isNotFunctionType;
Expand Down
15 changes: 8 additions & 7 deletions Compiler/BackEnd/SimCodeUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -905,33 +905,34 @@ algorithm
DAE.Type res_ty;
list<SimCode.Variable> var_args;
list<DAE.Type> tys;
DAE.VarParallelism prl;

case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = DAE.T_TUPLE(tupleType = tys)), _, _))
case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = DAE.T_TUPLE(tupleType = tys)), _, _, _))
equation
var_args = List.map(args, typesSimFunctionArg);
tys = List.map(tys, Types.simplifyType);
then
SimCode.FUNCTION_PTR(name, tys, var_args);

case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = DAE.T_NORETCALL(source = _)), _, _))
case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = DAE.T_NORETCALL(source = _)), _, _, _))
equation
var_args = List.map(args, typesSimFunctionArg);
then
SimCode.FUNCTION_PTR(name, {}, var_args);

case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = res_ty), _, _))
case ((name, tty as DAE.T_FUNCTION(funcArg = args, funcResultType = res_ty), _, _, _))
equation
res_ty = Types.simplifyType(res_ty);
var_args = List.map(args, typesSimFunctionArg);
then
SimCode.FUNCTION_PTR(name, {res_ty}, var_args);

case ((name, tty, _, _))
case ((name, tty, _, prl, _))
equation
tty = Types.simplifyType(tty);
cref_ = ComponentReference.makeCrefIdent(name, tty, {});
then
SimCode.VARIABLE(cref_, tty, NONE(), {}, DAE.NON_PARALLEL());
SimCode.VARIABLE(cref_, tty, NONE(), {}, prl);
end matchcontinue;
end typesSimFunctionArg;

Expand All @@ -949,9 +950,9 @@ algorithm
list<DAE.Exp> inst_dims_exp;
Option<DAE.Exp> binding;
SimCode.Variable var;
case (DAE.VAR(componentRef = DAE.CREF_IDENT(ident=name), ty = daeType as DAE.T_FUNCTION(funcArg=_)))
case (DAE.VAR(componentRef = DAE.CREF_IDENT(ident=name), ty = daeType as DAE.T_FUNCTION(funcArg=_), parallelism = prl))
equation
var = typesSimFunctionArg((name, daeType, DAE.C_VAR(), NONE()));
var = typesSimFunctionArg((name, daeType, DAE.C_VAR(), prl, NONE()));
then var;

case (DAE.VAR(componentRef = id,
Expand Down
80 changes: 40 additions & 40 deletions Compiler/FrontEnd/Builtin.mo
Original file line number Diff line number Diff line change
Expand Up @@ -299,171 +299,171 @@ protected constant DAE.Var objectiveVar = DAE.TYPES_VAR("objective",
protected constant DAE.Type stringIntInt2string =
DAE.T_FUNCTION(
{
("x",DAE.T_STRING_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE()),
("z",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())
("x",DAE.T_STRING_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("z",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())
},
DAE.T_STRING_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type real2real =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_REAL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type realReal2real =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_REAL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type int2int =
DAE.T_FUNCTION(
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type int2bool =
DAE.T_FUNCTION(
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_BOOL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type enumeration2int =
DAE.T_FUNCTION(
{("x",DAE.T_ENUMERATION(NONE(), Absyn.IDENT(""), {}, {}, {}, DAE.emptyTypeSource),DAE.C_VAR(),NONE())},
{("x",DAE.T_ENUMERATION(NONE(), Absyn.IDENT(""), {}, {}, {}, DAE.emptyTypeSource),DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type intInt2int =
DAE.T_FUNCTION(
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type intInt2bool =
DAE.T_FUNCTION(
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_BOOL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type bool2bool =
DAE.T_FUNCTION(
{("x",DAE.T_BOOL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_BOOL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_BOOL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type real2bool =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_BOOL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type realReal2bool =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_BOOL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type realRealReal2Real =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("z",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("z",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_REAL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type anyNonExpandableConnector2int =
DAE.T_FUNCTION(
{("x", DAE.T_ANYTYPE(SOME(ClassInf.CONNECTOR(Absyn.IDENT("$dummy$"),false)),DAE.emptyTypeSource),DAE.C_VAR(),NONE())},
{("x", DAE.T_ANYTYPE(SOME(ClassInf.CONNECTOR(Absyn.IDENT("$dummy$"),false)),DAE.emptyTypeSource),DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type anyExpandableConnector2int =
DAE.T_FUNCTION(
{("x",DAE.T_ANYTYPE(SOME(ClassInf.CONNECTOR(Absyn.IDENT("$dummy$"),true)),DAE.emptyTypeSource),DAE.C_VAR(),NONE())},
{("x",DAE.T_ANYTYPE(SOME(ClassInf.CONNECTOR(Absyn.IDENT("$dummy$"),true)),DAE.emptyTypeSource),DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type vectorVector2int =
DAE.T_FUNCTION(
{("x",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE()),
("y",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE())},
{("x",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type vectorVector2real =
DAE.T_FUNCTION(
{("x", T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE()),
("y", T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE())},
{("x", T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y", T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_REAL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type intInt2vectorreal =
DAE.T_FUNCTION(
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
T_REAL_ARRAY_1_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type realRealInt2vectorreal =
DAE.T_FUNCTION(
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("n",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("n",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
T_REAL_ARRAY_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type array2real =
DAE.T_FUNCTION(
{("x",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE())},
{("x",T_INT_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource) "T_ARRAY is appearently not constant. To bad!" ;

protected constant DAE.Type int2boxed =
DAE.T_FUNCTION(
{("index",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),NONE())},
{("index",DAE.T_INTEGER_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_METABOXED_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type string2string =
DAE.T_FUNCTION(
{("x",DAE.T_STRING_DEFAULT,DAE.C_VAR(),NONE())},
{("x",DAE.T_STRING_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_STRING_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
DAE.emptyTypeSource);

protected constant DAE.Type array1dimrealarray1dimrealarray1dimreal2array1dimreal =
DAE.T_FUNCTION(
{
("x",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE()),
("y",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE()),
("z",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),NONE())
("x",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("z",T_REAL_ARRAY_1_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())
},
T_REAL_ARRAY_1_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
Expand All @@ -472,9 +472,9 @@ protected constant DAE.Type array1dimrealarray1dimrealarray1dimreal2array1dimrea
protected constant DAE.Type realrealreal2real =
DAE.T_FUNCTION(
{
("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE()),
("z",DAE.T_REAL_DEFAULT,DAE.C_VAR(),NONE())
("x",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("y",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE()),
("z",DAE.T_REAL_DEFAULT,DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())
},
DAE.T_REAL_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_BUILTIN,
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/DAE.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ public uniontype DimensionBinding
end DimensionBinding;

public
type FuncArg = tuple<Ident, Type, Const, Option<Exp>> "Function Argument; name, type, variability and default binding (should probably be constant)" ;
type FuncArg = tuple<Ident, Type, Const, VarParallelism, Option<Exp>> "Function Argument; name, type, variability parallelism, and default binding (should probably be constant)" ;

public
uniontype Const "The degree of constantness of an expression is determined by the Const
Expand Down
11 changes: 11 additions & 0 deletions Compiler/FrontEnd/DAEUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ algorithm
end match;
end constStrFriendly;

public function dumpVarParallelismStr "Dump VarParallelism to a string"
input DAE.VarParallelism inVarParallelism;
output String outString;
algorithm
outString := match (inVarParallelism)
case DAE.NON_PARALLEL() then "";
case DAE.PARGLOBAL() then "parglobal ";
case DAE.PARLOCAL() then "parlocal ";
end match;
end dumpVarParallelismStr;

public function expTypeSimple "returns true if type is simple type"
input DAE.Type tp;
output Boolean isSimple;
Expand Down
1 change: 1 addition & 0 deletions Compiler/FrontEnd/Env.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3120,6 +3120,7 @@ algorithm
list<Frame> fl;
case ({}) then false;
case (FRAME(scopeType = SOME(FUNCTION_SCOPE())) :: _) then true;
case (FRAME(scopeType = SOME(PARALLEL_SCOPE())) :: _) then true;
case (FRAME(scopeType = SOME(CLASS_SCOPE())) :: _) then false;
case (_ :: fl) then inFunctionScope(fl);
end matchcontinue;
Expand Down
8 changes: 4 additions & 4 deletions Compiler/FrontEnd/Lookup.mo
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ algorithm
// Special handling for Connections.isRoot
case (cache,env,Absyn.QUALIFIED("Connections", Absyn.IDENT("isRoot")),_)
equation
t = DAE.T_FUNCTION({("x", DAE.T_ANYTYPE_DEFAULT, DAE.C_VAR(), NONE())}, DAE.T_BOOL_DEFAULT, DAE.FUNCTION_ATTRIBUTES_DEFAULT, DAE.emptyTypeSource);
t = DAE.T_FUNCTION({("x", DAE.T_ANYTYPE_DEFAULT, DAE.C_VAR(), DAE.NON_PARALLEL(), NONE())}, DAE.T_BOOL_DEFAULT, DAE.FUNCTION_ATTRIBUTES_DEFAULT, DAE.emptyTypeSource);
then
(cache, t, env);

// Special handling for MultiBody 3.x rooted() operator
case (cache,env,Absyn.IDENT("rooted"),_)
equation
t = DAE.T_FUNCTION({("x", DAE.T_ANYTYPE_DEFAULT, DAE.C_VAR(), NONE())}, DAE.T_BOOL_DEFAULT, DAE.FUNCTION_ATTRIBUTES_DEFAULT, DAE.emptyTypeSource);
t = DAE.T_FUNCTION({("x", DAE.T_ANYTYPE_DEFAULT, DAE.C_VAR(), DAE.NON_PARALLEL(), NONE())}, DAE.T_BOOL_DEFAULT, DAE.FUNCTION_ATTRIBUTES_DEFAULT, DAE.emptyTypeSource);
then
(cache, t, env);

Expand Down Expand Up @@ -1743,12 +1743,12 @@ algorithm
// function_name cardinality
case (env,"cardinality")
then {DAE.T_FUNCTION(
{("x",DAE.T_COMPLEX(ClassInf.CONNECTOR(Absyn.IDENT("$$"),false),{},NONE(),DAE.emptyTypeSource),DAE.C_VAR(),NONE())},
{("x",DAE.T_COMPLEX(ClassInf.CONNECTOR(Absyn.IDENT("$$"),false),{},NONE(),DAE.emptyTypeSource),DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_DEFAULT,
DAE.emptyTypeSource),
DAE.T_FUNCTION(
{("x",DAE.T_COMPLEX(ClassInf.CONNECTOR(Absyn.IDENT("$$"),true),{},NONE(),DAE.emptyTypeSource),DAE.C_VAR(),NONE())},
{("x",DAE.T_COMPLEX(ClassInf.CONNECTOR(Absyn.IDENT("$$"),true),{},NONE(),DAE.emptyTypeSource),DAE.C_VAR(),DAE.NON_PARALLEL(),NONE())},
DAE.T_INTEGER_DEFAULT,
DAE.FUNCTION_ATTRIBUTES_DEFAULT,
DAE.emptyTypeSource)};
Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/MetaUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ algorithm

case (DAE.T_FUNCTION(funcArg = fargs,funcResultType = DAE.T_COMPLEX(complexClassType = ClassInf.RECORD(_))))
equation
names = List.map(fargs, Util.tuple41);
types = List.map(fargs, Util.tuple42);
names = List.map(fargs, Util.tuple51);
types = List.map(fargs, Util.tuple52);
then (names,types);
end matchcontinue;
end constructorCallTypeToNamesAndTypes;
Expand Down

0 comments on commit 10f3ed2

Please sign in to comment.