@@ -130,6 +130,7 @@ protected import Inst;
130130protected import Interactive;
131131protected import System;
132132protected import Error;
133+ protected import DAEUtil;
133134
134135public constant CFunction cEmptyFunction= CFUNCTION("" ,"" ,{},{},{},{},{},{}) " empty function " ;
135136
@@ -981,8 +982,8 @@ protected function generateFunctionsElist
981982algorithm
982983 Debug.fprintln("cgtr" , "generate_functions_elist" );
983984 Debug.fprintln("cgtrdumpdae" , "Dumping DAE:" );
984- Debug.fcall("cgtrdumpdae" , DAE .dump2, DAE.DAE(els));
985- fns := Util.listFilter(els, DAE .isFunction);
985+ Debug.fcall("cgtrdumpdae" , DAEUtil .dump2, DAE.DAE(els));
986+ fns := Util.listFilter(els, DAEUtil .isFunction);
986987 (cfns,rt_1) := generateFunctionsElist2(fns,rt);
987988end generateFunctionsElist;
988989
@@ -1058,14 +1059,14 @@ algorithm
10581059 fn_name_str = stringAppend("_" , fn_name_str);
10591060 Debug.fprintl("cgtr" , {"generating function " ,fn_name_str,"\n " });
10601061 Debug.fprintln("cgtrdumpdae3" , "Dumping DAE:" );
1061- Debug.fcall("cgtrdumpdae3" , DAE .dump2, DAE.DAE(dae));
1062- outvars = DAE .getOutputVars(dae);
1063- invars = DAE .getInputVars(dae);
1062+ Debug.fcall("cgtrdumpdae3" , DAEUtil .dump2, DAE.DAE(dae));
1063+ outvars = DAEUtil .getOutputVars(dae);
1064+ invars = DAEUtil .getInputVars(dae);
10641065 (struct_strs,rt_1) = generateStructsForRecords(dae, rt);
10651066 struct_strs_1 = generateResultStruct(outvars, fpath);
10661067 struct_strs = listAppend(struct_strs, struct_strs_1);
10671068 /*-- MetaModelica Partial Function. sjoelund --*/
1068- funrefs = Util.listSelect(invars, DAE .isFunctionRefVar);
1069+ funrefs = Util.listSelect(invars, DAEUtil .isFunctionRefVar);
10691070 struct_funrefs = Util.listFlatten(Util.listMap(funrefs, generateFunctionRefReturnStruct));
10701071 /*-- --*/
10711072 retstr = generateReturnType(fpath);
@@ -1139,9 +1140,9 @@ algorithm
11391140 fn_name_str = stringAppend("_" , fn_name_str);
11401141 DAE.EXTERNALDECL(ident = extfnname, external_ = extargs,parameters = extretarg, returnType = lang, language = ann) = extdecl;
11411142 dae = Inst.initVarsModelicaOutput(orgdae);
1142- outvars = DAE .getOutputVars(dae);
1143- invars = DAE .getInputVars(dae);
1144- bivars = DAE .getBidirVars(dae);
1143+ outvars = DAEUtil .getOutputVars(dae);
1144+ invars = DAEUtil .getInputVars(dae);
1145+ bivars = DAEUtil .getBidirVars(dae);
11451146 (struct_strs,rt_1) = generateStructsForRecords(dae,rt);
11461147 struct_strs_1 = generateResultStruct(outvars, fpath);
11471148 struct_strs = listAppend(struct_strs, struct_strs_1);
@@ -1166,13 +1167,13 @@ algorithm
11661167 Debug.fprintl("cgtr" , {"generating external function " ,fn_name_str,"\n " });
11671168 DAE.EXTERNALDECL(ident = extfnname,external_ = extargs,parameters = extretarg,returnType = lang,language = ann) = extdecl;
11681169 Debug.fprintln("cgtrdumpdae1" , "Dumping DAE:" );
1169- Debug.fcall("cgtrdumpdae1" , DAE .dump2, DAE.DAE(orgdae));
1170+ Debug.fcall("cgtrdumpdae1" , DAEUtil .dump2, DAE.DAE(orgdae));
11701171 dae = Inst.initVarsModelicaOutput(orgdae);
11711172 Debug.fprintln("cgtrdumpdae2" , "Dumping DAE:" );
1172- Debug.fcall("cgtrdumpdae2" , DAE .dump2, DAE.DAE(dae));
1173- outvars = DAE .getOutputVars(dae);
1174- invars = DAE .getInputVars(dae);
1175- bivars = DAE .getBidirVars(dae);
1173+ Debug.fcall("cgtrdumpdae2" , DAEUtil .dump2, DAE.DAE(dae));
1174+ outvars = DAEUtil .getOutputVars(dae);
1175+ invars = DAEUtil .getInputVars(dae);
1176+ bivars = DAEUtil .getBidirVars(dae);
11761177 (struct_strs,rt_1) = generateStructsForRecords(dae, rt);
11771178 struct_strs_1 = generateResultStruct(outvars, fpath);
11781179 struct_strs = listAppend(struct_strs, struct_strs_1);
@@ -1782,7 +1783,7 @@ algorithm
17821783 absynCommentOption = comment)))
17831784
17841785 equation
1785- Debug.fcall(" isarrdb", DAE .dump2, DAE.DAE({el}));
1786+ Debug.fcall(" isarrdb", DAEUtil .dump2, DAE.DAE({el}));
17861787 then
17871788 false;
17881789
@@ -1797,13 +1798,13 @@ algorithm
17971798 variableAttributesOption = dae_var_attr,
17981799 absynCommentOption = comment)))
17991800 equation
1800- Debug.fcall(" isarrdb", DAE .dump2, DAE.DAE({el}));
1801+ Debug.fcall(" isarrdb", DAEUtil .dump2, DAE.DAE({el}));
18011802 then
18021803 true;
18031804
18041805 case el
18051806 equation
1806- Debug.fprint(" failtrace", " - Codegen.isArray failed\n");
1807+ Debug.fprint(" failtrace", " - Codegen.isArray failed\n");
18071808 then
18081809 fail();
18091810 end matchcontinue;
@@ -2530,7 +2531,7 @@ algorithm
25302531 ret_type_str := generateReturnType(fpath);
25312532 (ret_decl,ret_var,tnr_ret_1) := generateTempDecl(ret_type_str, tnr);
25322533 ret_stmt := Util.stringAppendList({"return " ,ret_var,";" });
2533- outvars := DAE .getOutputVars(dae);
2534+ outvars := DAEUtil .getOutputVars(dae);
25342535 (out_fn,tnr_ret) := generateAllocOutvars(outvars, ret_decl, ret_var, 1 ,tnr_ret_1, funContext);
25352536 (mem_decl,mem_var,tnr_mem) := generateTempDecl("state" , tnr_ret);
25362537 mem_stmt1 := Util.stringAppendList({mem_var," = get_memory_state();" });
@@ -2787,7 +2788,7 @@ algorithm
27872788 case (e,_,_,tnr,context)
27882789 local DAE.Element e;
27892790 equation
2790- failure(DAE .isVar(e));
2791+ failure(DAEUtil .isVar(e));
27912792 then
27922793 (cEmptyFunction,tnr);
27932794
@@ -2940,7 +2941,7 @@ algorithm
29402941 case (e,_,_,tnr)
29412942 local DAE.Element e;
29422943 equation
2943- failure(DAE .isVar(e));
2944+ failure(DAEUtil .isVar(e));
29442945 then
29452946 (cEmptyFunction,tnr);
29462947
@@ -3047,7 +3048,7 @@ algorithm
30473048 Context context;
30483049 case (els,tnr,context)
30493050 equation
3050- algs = Util.listFilter(els, DAE .isAlgorithm);
3051+ algs = Util.listFilter(els, DAEUtil .isAlgorithm);
30513052 (cfn,tnr_1) = generateAlgorithms2(algs, tnr, context);
30523053 then
30533054 (cfn,tnr_1);
@@ -7185,8 +7186,8 @@ algorithm
71857186 Option<Absyn.Annotation> ann;
71867187 case (vars,(extdecl as DAE.EXTERNALDECL(ident = n,external_ = arglist,parameters = retarg,returnType = lang,language = ann)),tnr)
71877188 equation
7188- Debug.fcall(" cgtrdumpdaeextcall", DAE .dump2, DAE.DAE(vars));
7189- extdeclstr = DAE .dumpExtDeclStr(extdecl);
7189+ Debug.fcall(" cgtrdumpdaeextcall", DAEUtil .dump2, DAE.DAE(vars));
7190+ extdeclstr = DAEUtil .dumpExtDeclStr(extdecl);
71907191 Debug.fprintln(" cgtrdumpdaeextcall", extdeclstr);
71917192 (argdecls,arglist_1,tnr_1) = generateExtcallVardecls(vars, arglist, retarg, lang, 1,tnr);
71927193 lang2 = getJavaCallMappingFromAnn(lang, ann);
@@ -7296,7 +7297,7 @@ algorithm
72967297 case ((var :: rest),i,tnr)
72977298 equation
72987299 Debug.fprint(" cgtr", " #-- Ignoring: ");
7299- Debug.fcall(" cgtr", DAE .dump2, DAE.DAE({var}));
7300+ Debug.fcall(" cgtr", DAEUtil .dump2, DAE.DAE({var}));
73007301 Debug.fprintln(" cgtr", "");
73017302 (fn,tnr_1) = generateExtcallCopydeclsF77(rest,i, tnr);
73027303 then
@@ -8992,7 +8993,7 @@ algorithm
89928993 local
89938994 DAE.Element el;
89948995 equation
8995- failure(DAE .isVar(el));
8996+ failure(DAEUtil .isVar(el));
89968997 cfn = generateWriteOutvars(r,i);
89978998 then
89988999 cfn;
@@ -9009,7 +9010,7 @@ protected function isOutput "Returns true if variable is output"
90099010algorithm
90109011 isOutput := matchcontinue(e)
90119012 case(e) equation
9012- DAE .isOutputVar(e);
9013+ DAEUtil .isOutputVar(e);
90139014 then true ;
90149015 case(_) then false ;
90159016 end matchcontinue;
@@ -9020,26 +9021,26 @@ protected function isRcwOutput "function: isRcwOutput
90209021"
90219022 input DAE.Element e;
90229023algorithm
9023- DAE .isVar(e);
9024- DAE .isOutputVar(e);
9024+ DAEUtil .isVar(e);
9025+ DAEUtil .isOutputVar(e);
90259026end isRcwOutput;
90269027
90279028protected function isRcwInput "function: isRcwInput
90289029
90299030"
90309031 input DAE.Element e;
90319032algorithm
9032- DAE .isVar(e);
9033- DAE .isInputVar(e);
9033+ DAEUtil .isVar(e);
9034+ DAEUtil .isInputVar(e);
90349035end isRcwInput;
90359036
90369037protected function isRcwBidir "function: isRcwBidir
90379038
90389039"
90399040 input DAE.Element e;
90409041algorithm
9041- DAE .isVar(e);
9042- DAE .isBidirVar(e);
9042+ DAEUtil .isVar(e);
9043+ DAEUtil .isBidirVar(e);
90439044end isRcwBidir;
90449045
90459046protected function generateJavaSignature
@@ -9704,7 +9705,7 @@ algorithm
97049705 ld2 = Convert.fromExpElemsToDAEElems(ld,{});
97059706 body2 = Convert.fromExpElemToDAEElem(body);
97069707 ld2 = body2 :: ld2;
9707- exps = DAE .getAllExps(ld2);
9708+ exps = DAEUtil .getAllExps(ld2);
97089709 res = getMatchingExpsList(resE::exps,matchValueblock);
97099710 then e::res;
97109711 end matchcontinue;
@@ -9893,7 +9894,7 @@ algorithm
98939894 ld2 = Convert.fromExpElemsToDAEElems(ld,{});
98949895 body2 = Convert.fromExpElemToDAEElem(body);
98959896 ld2 = body2 :: ld2;
9896- exps = DAE .getAllExps(ld2);
9897+ exps = DAEUtil .getAllExps(ld2);
98979898 res = getMatchingExpsList(e::exps,fn);
98989899 then res;
98999900
@@ -9929,7 +9930,7 @@ algorithm
99299930 equation
99309931 true = RTOpts.acceptMetaModelicaGrammar();
99319932 paths1 = getUniontypePaths2(elements);
9932- exps = DAE .getAllExps(elements);
9933+ exps = DAEUtil .getAllExps(elements);
99339934 exps = getMatchingExpsList(exps, matchValueblock);
99349935 els = getDAEDeclsFromValueblocks(exps);
99359936 paths2 = getUniontypePaths2(els);
0 commit comments