Skip to content

Console Output

[nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA] Running shell script
+ make -C testsuite/special/MatlabTranslator/ test
make: Entering directory '/var/lib/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/testsuite/special/MatlabTranslator'
Running MatlabTranslator
true
""
{"Types.mo","AbsynMat.mo","../../../OMCompiler/Compiler/FrontEnd/Absyn.mo","../../../OMCompiler/Compiler/Util/Error.mo","../../../OMCompiler/Compiler/Util/ErrorExt.mo","../../../OMCompiler/Compiler/Util/Print.mo","../../../OMCompiler/Compiler/Util/StringUtil.mo","../../../OMCompiler/Compiler/Util/Flags.mo","../../../OMCompiler/Compiler/Global/Global.mo","../../../OMCompiler/Compiler/Util/Config.mo","../../../OMCompiler/Compiler/Util/Debug.mo","../../../OMCompiler/Compiler/Util/List.mo","../../../OMCompiler/Compiler/Util/Settings.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/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/build",
    OPENMODELICALIBRARY = "/var/lib/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/build/lib/omlibrary://.openmodelica/libraries/",
    OMC_PATH = "/var/lib/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/build/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/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/testsuite/special/MatlabTranslator",
    CREATE_FILE_WORKS = true,
    REMOVE_FILE_WORKS = true,
    OS = "linux",
    SYSTEM_INFO = "Linux 38a6969e2434 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
",
    RTLIBS = " -lOpenModelicaRuntimeC  -llapack -lblas   -lm -lomcgc -lpthread -rdynamic",
    C_COMPILER = "clang",
    C_COMPILER_VERSION = "clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
",
    C_COMPILER_RESPONDING = true,
    HAVE_CORBA = true,
    CONFIGURE_CMDLINE = "Configured 2018-09-11 22:07:57 using arguments: '--disable-option-checking --prefix=/var/lib/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/build CC=clang CXX=clang++ FC=gfortran CFLAGS=-Os --with-cppruntime --without-omc --without-omlibrary --with-omniORB --enable-modelica3d --with-ombuilddir=/var/lib/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/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.019607ms
Tokens processed:130, time: 0.349014ms
starting parser
Parser done in time: 0.560791ms

 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/jenkins/workspace/nModelica_maintenance_v1.13-HMG5V7BHVQ22JC73UUCSD5Y6XHWR6I6UZ2NNAWBWCPQSGKA3RGPA/testsuite/special/MatlabTranslator'