diff --git a/packages/math.mo b/packages/math.mo index 856473ec..791af076 100644 --- a/packages/math.mo +++ b/packages/math.mo @@ -1,5 +1,11 @@ package math +function fabs + input Real x; + output Real y; + external "C" y = fabs(x); + end fabs; + function random input Real x; output Real y; diff --git a/src/mmoc/tests/system/gt_data/packages/math.mo b/src/mmoc/tests/system/gt_data/packages/math.mo index 856473ec..791af076 100644 --- a/src/mmoc/tests/system/gt_data/packages/math.mo +++ b/src/mmoc/tests/system/gt_data/packages/math.mo @@ -1,5 +1,11 @@ package math +function fabs + input Real x; + output Real y; + external "C" y = fabs(x); + end fabs; + function random input Real x; output Real y; diff --git a/src/mmoc/tests/system/gt_data/packages/pkg_math.c b/src/mmoc/tests/system/gt_data/packages/pkg_math.c index a104eb2b..6bc08126 100644 --- a/src/mmoc/tests/system/gt_data/packages/pkg_math.c +++ b/src/mmoc/tests/system/gt_data/packages/pkg_math.c @@ -1,6 +1,6 @@ #include #include -#include "./system/test_data/packages/pkg_math.h" +#include "/home/joaquin/work/qss-solver/packages/pkg_math.h" #include double __math__exponential(double x) { @@ -10,6 +10,14 @@ y = mmo_exponential(x); return y; } +double __math__fabs(double x) +{ +double y; + +y = fabs(x); +return y; +} + double __math__getRandomMarkedValue(double x) { double y; diff --git a/src/mmoc/tests/system/gt_data/packages/pkg_math.h b/src/mmoc/tests/system/gt_data/packages/pkg_math.h index ed138110..9e78ce95 100644 --- a/src/mmoc/tests/system/gt_data/packages/pkg_math.h +++ b/src/mmoc/tests/system/gt_data/packages/pkg_math.h @@ -3,6 +3,9 @@ double __math__exponential(double x); +double __math__fabs(double x); + + double __math__getRandomMarkedValue(double x); diff --git a/src/mmoc/tests/system/gt_data/packages/pkg_math.moo b/src/mmoc/tests/system/gt_data/packages/pkg_math.moo index de029c3b..7e61ac17 100644 --- a/src/mmoc/tests/system/gt_data/packages/pkg_math.moo +++ b/src/mmoc/tests/system/gt_data/packages/pkg_math.moo @@ -14,6 +14,17 @@ ENDLIBRARIES ENDDEFINITION DEFINITION FUNCTION +fabs +ENDFUNCTION +INCLUDEDIRECTORY +/home/joaquin/work/qss-solver/src/usr/include +ENDINCLUDEDIRECTORY +LIBRARYDIRECTORY +/home/joaquin/work/qss-solver/lib +ENDLIBRARYDIRECTORY +ENDDEFINITION +DEFINITION +FUNCTION getRandomMarkedValue ENDFUNCTION INCLUDEDIRECTORY