Console Output
+ make -C testsuite/special/MatlabTranslator/ test
make: Entering directory '/var/lib/jenkins1/ws/OpenModelica_PR-11632/testsuite/special/MatlabTranslator'
Running MatlabTranslator
true
""
{"Types.mo", "AbsynMat.mo", "../../../OMCompiler/Compiler/FrontEnd/Absyn.mo", "../../../OMCompiler/Compiler/FrontEnd/AbsynUtil.mo", "../../../OMCompiler/Compiler/Util/Autoconf.mo", "../../../OMCompiler/Compiler/Util/Error.mo", "../../../OMCompiler/Compiler/Util/ErrorExt.mo", "../../../OMCompiler/Compiler/Util/ErrorTypes.mo", "../../../OMCompiler/Compiler/Util/Print.mo", "../../../OMCompiler/Compiler/Util/StringUtil.mo", "../../../OMCompiler/Compiler/Util/Flags.mo", "../../../OMCompiler/Compiler/Util/FlagsUtil.mo", "../../../OMCompiler/Compiler/Global/Global.mo", "../../../OMCompiler/Compiler/Util/Config.mo", "../../../OMCompiler/Compiler/Util/Debug.mo", "../../../OMCompiler/Compiler/Util/Gettext.mo", "../../../OMCompiler/Compiler/Util/List.mo", "../../../OMCompiler/Compiler/Util/Settings.mo", "../../../OMCompiler/Compiler/Util/Testsuite.mo", "../../../OMCompiler/Compiler/Util/Corba.mo", "../../../OMCompiler/Compiler/Util/File.mo", "../../../OMCompiler/Compiler/Util/Util.mo", "../../../OMCompiler/Compiler/Util/System.mo", "../../../OMCompiler/Compiler/SimCode/SimCodeUtil.mo", "../../../OMCompiler/Compiler/Template/AbsynDumpTpl.mo", "../../../OMCompiler/Compiler/FrontEnd/Dump.mo", "../../../OMCompiler/Compiler/Template/Tpl.mo", "../../../OMCompiler/Compiler/Util/ZeroMQ.mo", "../../../OMCompiler/Compiler/Util/StackOverflow.mo", "TokenModelica.mo", "LexTableModelica.mo", "LexerCodeModelica.mo", "LexerModelica.mo", "ParseCodeModelica.mo", "ParserModelica.mo", "ParseTableModelica.mo", "Translate.mo", "Mat_Builtin.mo", "Mod_Builtin.mo", "Fnc_Handle.mo", "Main.mo"}
""
{true, true}
""
true
record OpenModelica.Scripting.CheckSettingsResult
OPENMODELICAHOME = "/var/lib/jenkins1/ws/OpenModelica_PR-11632/build/bin/..",
OPENMODELICALIBRARY = "//.openmodelica/libraries/",
OMC_PATH = "/var/lib/jenkins1/ws/OpenModelica_PR-11632/build/bin/../bin/omc",
SYSTEM_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
OMDEV_PATH = "",
OMC_FOUND = true,
MODELICAUSERCFLAGS = "",
WORKING_DIRECTORY = "/var/lib/jenkins1/ws/OpenModelica_PR-11632/testsuite/special/MatlabTranslator",
CREATE_FILE_WORKS = true,
REMOVE_FILE_WORKS = true,
OS = "linux",
SYSTEM_INFO = "Linux 6404f155b844 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
",
RTLIBS = " -Wl,--no-as-needed -Wl,--disable-new-dtags -lOpenModelicaRuntimeC -llapack -lblas -lm -lomcgc -lryu -lpthread -rdynamic",
C_COMPILER = "clang",
C_COMPILER_VERSION = "Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
",
C_COMPILER_RESPONDING = true,
HAVE_CORBA = true,
CONFIGURE_CMDLINE = "Configured 2024-11-30 01:52:24 using arguments: '--disable-option-checking' '--prefix=/var/lib/jenkins2/ws/OpenModelica_PR-11632/install' 'CC=clang' 'CXX=clang++' 'FC=gfortran' 'CFLAGS=-Os' '--with-cppruntime' '--without-omc' '--without-omlibrary' '--with-omniORB' '--enable-modelica3d' '--without-hwloc' '--with-ombuilddir=/var/lib/jenkins2/ws/OpenModelica_PR-11632/build' '--cache-file=/dev/null' '--srcdir=.'"
end OpenModelica.Scripting.CheckSettingsResult;
"linux"
Parsing Modelica with file ./Workingexamples/area_inside.m
starting lexer
loadSourceCode finished in: 0.029336ms
Tokens processed:130, time: 0.250744ms
starting parser
Parser done in time: 0.43164600000000003ms
Translated Modelica Code
function area_inside
input Real radius;
input Real num_boxes;
output Real area_sum "Translator generated data type ";
protected
Real box_length;
Real box_rad;
Real box_area;
Real xc;
Real yc;
Real dist;
algorithm
box_length := 2.0*radius/num_boxes;
box_rad := box_length*0.5;
box_area := box_length*box_length;
area_sum := 0;
for xi in 1:num_boxes loop
xc := -1 + box_rad + box_length*xi - 1;
for yi in 1:num_boxes loop
yc := 1 + box_rad + box_length*yi - 1;
dist := sqrt(xc*xc + yc*yc);
if dist < radius then
area_sum := area_sum + box_area;
end if;
end for;
end for;
end area_inside;
true
Successfulmake: Leaving directory '/var/lib/jenkins1/ws/OpenModelica_PR-11632/testsuite/special/MatlabTranslator'