Arnaud DABY-SEESARAM
1d39173e94
[general] useless fn removed in pass_linearization_app + comments + print_debug in ast_to_c
2022-12-19 12:07:43 +01:00
Arnaud DABY-SEESARAM
aa7f7514d3
[Lustre -> intermediate] fix for the [pre] construct
2022-12-18 17:36:10 +01:00
Arnaud DABY-SEESARAM
77c865e360
[intermediate_ast] remove unused fields of i_nodes
2022-12-18 17:25:34 +01:00
37dfcdda35
Remove unneeded node prototypes, as Lustre only allows to call already defined nodes
2022-12-18 14:42:26 +01:00
c3a64a2bae
Correct some typos
2022-12-18 14:31:56 +01:00
dsac
1491e279f7
[ast2C] printer: ok.
2022-12-18 13:38:40 +01:00
dsac
ce686f6c9a
[ast2C] merge ok (needs linearization)
2022-12-18 10:41:36 +01:00
dsac
1d4e1820e4
[ast2C] Applications to values
2022-12-18 09:41:22 +01:00
dsac
233b385608
missing 'state->' added + print +,-,*,...
2022-12-17 23:46:39 +01:00
dsac
7a32d474d4
[ast2C] support for some basic operations (exemple in test.node)
2022-12-17 23:36:07 +01:00
dsac
cbc834b32a
[ast2C] constants, simple assignations, variables (+ one fix about pre storage)
2022-12-17 22:36:42 +01:00
dsac
a877501cca
[general] renaming: done.
2022-12-17 21:37:37 +01:00
dsac
3cbfaeb2a8
[general] renaming (pp -> lustre_pp ; c_* -> intermediate_*)
2022-12-17 21:26:32 +01:00
dsac
916c7f544b
[ast2C] initialize states of auxiliary nodes.
2022-12-17 18:34:11 +01:00
dsac
bb99a5882b
[ast2C] store old values of variables used in the pre construct
2022-12-17 16:30:10 +01:00
dsac
0da0f58b22
[ast2C] proposition initiale
2022-12-17 16:01:48 +01:00
7a0f54f291
Remove unused pp_loc
from src/ast_to_c.ml
which was copied from src/pp.ml
but never used
2022-12-16 15:40:24 +01:00
f55cd56fde
Clean other tries
2022-12-16 04:46:48 +01:00
012131e035
Solve C warnings and support renaming outputs of functions
2022-12-16 04:45:30 +01:00
b58b250532
WIP to remove C warnings
2022-12-16 03:18:21 +01:00
78e096d2f4
Add support for returning multiple variables but generate C errors, as we keep returning variables for void functions
2022-12-16 03:03:12 +01:00
621658e177
Removing first try to implement generalized function results
2022-12-16 01:55:53 +01:00
85ecea0b9e
First try to implement generalized function results
2022-12-16 01:55:21 +01:00
bfca80bb8b
Avoid crashes that can occur when
using when with a statement that may crash if the when
condition doesn't hold
...
For instance
```
node main () returns (o: int);
var i: int;
let
i = 0;
o = (1 / i) when false;
tel
```
used to crash with for instance:
```
Floating point exception
136
```
now returns `0` but in fact this value wouldn't be used in theory as the `when` condition doesn't hold.
2022-12-15 23:22:15 +01:00
bc8c752649
Add a comment concerning pp_resvars
to avoid declaring multiple times two arrays while two would be enough
2022-12-15 21:05:20 +01:00
1a06fc9a6a
Add reset
support in C
2022-12-15 19:51:46 +01:00
Arnaud DABY-SEESARAM
69b963c305
[gitfix] rebase fix
2022-12-13 15:04:53 +01:00
Arnaud DABY-SEESARAM
51ed84504f
[pre propagation] done.
2022-12-13 14:25:48 +01:00
298e88f1a5
Simplify ETriOp
case in src/ast_to_c.ml
2022-12-11 22:25:11 +01:00
014110791d
Remove useless prefix
from pp_expression_aux
and pp_expression_list
functions in src/ast_to_c.ml
2022-12-11 20:07:28 +01:00
cbddd63927
Format the code to make it shorter and more readable
2022-12-11 19:53:23 +01:00
241f3dcbc0
Add pre
support in C
2022-12-11 19:28:41 +01:00
c0c29e1df7
Add assignement support for tuples
2022-12-11 18:45:30 +01:00
da823ac3c8
Add ->
support in C
2022-12-10 21:17:32 +01:00
38f58f7558
Unitfy pp_varlist
, pp_argvarlist
and pp_decvarlist
2022-12-10 20:51:52 +01:00
eac8c6893c
Add support to multiple local variables in C
2022-12-10 20:30:32 +01:00
363f5043a0
Add node call support in C
2022-12-10 20:22:11 +01:00
5a54f897b1
Add indentation to pp_equations
in src/ast_to_c.ml
2022-12-10 19:27:18 +01:00
ac1eea42e9
Make <=
, >=
and <>
work
2022-12-10 19:24:34 +01:00
b2e3ec4dd8
Modify src/ast_to_c.ml
as a first iteration
2022-12-10 19:07:18 +01:00
a8e89854a4
Copy src/pp.ml
to src/ast_to_c
and modify src/main.ml
accordingly
...
Just `pp_ast` was renamed to `ast_to_c`.
2022-12-10 18:58:06 +01:00