From 8a456dbb08948c1c24076cea6b87dc938276263b Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 15 May 2019 13:13:46 +0200 Subject: example from Lustre v4 compiled with ONERA's lustrec compiler --- .../heater_control.h | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 test/monniaux/lustrev4_lustrec_heater_control/heater_control.h (limited to 'test/monniaux/lustrev4_lustrec_heater_control/heater_control.h') diff --git a/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h b/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h new file mode 100644 index 00000000..d25a7d52 --- /dev/null +++ b/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h @@ -0,0 +1,96 @@ +/* C code generated by lustrec + Version number 1.6-@GITBRANCH@ + Code is C99 compliant + Using (double) floating-point numbers */ + +#ifndef _HEATER_CONTROL +#define _HEATER_CONTROL + +/* Imports standard library */ +#include +#include "/opt/lustrec/1.6/include/lustrec/arrow.h" + + +/* Import dependencies */ + +/* Types definitions */ + +/* Global constant (declarations, definitions are in C file) */ +extern double FAILURE; +extern double TMIN; +extern double TMAX; +extern double DELTA; + +/* Structs declarations */ +struct not_a_sauna2_mem; +struct heater_control_mem; +struct not_a_sauna_mem; + +/* Nodes declarations */ +extern void not_a_sauna2_reset (struct not_a_sauna2_mem *self); + +extern void not_a_sauna2_init (struct not_a_sauna2_mem *self); + +extern void not_a_sauna2_clear (struct not_a_sauna2_mem *self); + +extern void not_a_sauna2_step (double T, double T1, double T2, double T3, + _Bool Heat_on, + _Bool (*ok), + struct not_a_sauna2_mem *self); + +extern void heater_control_reset (struct heater_control_mem *self); + +extern void heater_control_init (struct heater_control_mem *self); + +extern void heater_control_clear (struct heater_control_mem *self); + +extern void heater_control_step (double T, double T1, double T2, double T3, + _Bool (*Heat_on), + struct heater_control_mem *self); + +extern void not_a_sauna_reset (struct not_a_sauna_mem *self); + +extern void not_a_sauna_init (struct not_a_sauna_mem *self); + +extern void not_a_sauna_clear (struct not_a_sauna_mem *self); + +extern void not_a_sauna_step (double T, double T1, double T2, double T3, + _Bool Heat_on, + _Bool (*ok), + struct not_a_sauna_mem *self); + +extern void oneoftree_step (_Bool f1, _Bool f2, _Bool f3, + _Bool (*r) + ); + +extern void noneoftree_step (_Bool f1, _Bool f2, _Bool f3, + _Bool (*r) + ); + +extern void alloftree_step (_Bool f1, _Bool f2, _Bool f3, + _Bool (*r) + ); + +extern void abs_step (double v, + double (*a) + ); + +extern void Median_step (double a, double b, double c, + double (*z) + ); + +extern void Average_step (double a, double b, + double (*z) + ); + +extern void min2_step (double one, double two, + double (*m) + ); + +extern void max2_step (double one, double two, + double (*m) + ); + + +#endif + -- cgit From c1af49a809efe593317c2b836be115e24e7b8f18 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 19 Jun 2019 11:31:04 +0200 Subject: add arrow.h from LustreC --- test/monniaux/lustrev4_lustrec_heater_control/heater_control.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/monniaux/lustrev4_lustrec_heater_control/heater_control.h') diff --git a/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h b/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h index d25a7d52..405f9a74 100644 --- a/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h +++ b/test/monniaux/lustrev4_lustrec_heater_control/heater_control.h @@ -8,7 +8,7 @@ /* Imports standard library */ #include -#include "/opt/lustrec/1.6/include/lustrec/arrow.h" +#include "arrow.h" /* Import dependencies */ -- cgit