Commit Graph

106 Commits

Author SHA1 Message Date
d06fccf36b Add second slide concerning AST to C 2022-12-16 16:02:03 +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
dbf1583ffd Complete first slide of AST to C 2022-12-16 15:33:39 +01:00
9e96697991 First slide of AST to C 2022-12-16 15:07:46 +01:00
Antoine Grimod
aa84a07902 testing clock unification 2022-12-16 14:51:41 +01:00
Antoine Grimod
ed54fd0114 clock unification added 2022-12-16 14:51:41 +01:00
Arnaud DABY-SEESARAM
b69b6998ec [passes] linearisation: update the local variables + lienarisation of tri ops 2022-12-16 14:41:37 +01:00
73b753bec2 Merge branch 'master' of https://gitea.lemnoslife.com/Benjamin_Loison/Synchronous_reactive_systems 2022-12-16 05:57:55 +01:00
a0383dbf13 Make last equation of a node potentially not ending with a semi column be correctly parsed
Otherwise the following code:

```
-- count the number of top between two tick
node counting (tick:bool; top:bool)
returns (o: bool);
	var v: int;
	let o = if tick then v else 0 -> pre o + v;
		v = if top then 1 else 0
	tel;
```

was involving the following error:

```
Syntax error at <line 1: -- count the number of top between two tick >
```
2022-12-16 05:57:25 +01:00
530f6ddf51 Merge branch 'master' of https://gitea.lemnoslife.com/Benjamin_Loison/Synchronous_reactive_systems 2022-12-16 05:55:15 +01:00
Arnaud DABY-SEESARAM
57dd9c1aa4 [passes] linearozation: avoir duplication of variables 2022-12-16 14:16:13 +01:00
21414e6461 Make last equation of a node potentially not ending with a semi column
Otherwise the following code:

```
-- count the number of top between two tick
node counting (tick:bool; top:bool)
returns (o: bool);
	var v: int;
	let o = if tick then v else 0 -> pre o + v;
		v = if top then 1 else 0
	tel;
```

was involving the following error:

```
Syntax error at <line 1: -- count the number of top between two tick >
```
2022-12-16 05:54:41 +01:00
c37e819f1a Add a title frame to the beamer 2022-12-16 05:06:27 +01:00
ea94bb84dd Merge branch 'master' of https://gitea.lemnoslife.com/Benjamin_Loison/Synchronous_reactive_systems 2022-12-16 04:47:05 +01:00
Arnaud DABY-SEESARAM
3fa0f92233 [beamer] A few straight forward slides added 2022-12-16 10:45:20 +01:00
Arnaud DABY-SEESARAM
3417d75620 [passes] linearisation: correction (10 -> pre (20 -> 30)) works 2022-12-16 09:44:50 +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
7c2c43fe24 Precise to what extent considering integers work fine with working with floats instead 2022-12-16 01:20:42 +01:00
Arnaud DABY-SEESARAM
c7a97f3305 [passes] linearization: merge fix 2022-12-16 09:00:03 +01:00
Arnaud DABY-SEESARAM
8d6349dd3f Merge remote-tracking branch 'origin/master' into wip 2022-12-16 08:53:55 +01:00
Arnaud DABY-SEESARAM
d7f0f148e9 [pre linearization] done, not tested 2022-12-16 08:52:48 +01:00
dsac
9987922e0f [passes] linearization of pre (wip) 2022-12-16 07:47:20 +01:00
Antoine Grimod
6af9ddf394 added pass to check validity of automata and disable flattening of automaton branch because of incorrect code resulting from it 2022-12-16 01:04:09 +01:00
Antoine Grimod
1b3af051b3 adding automaton translation pass to list of executed passes 2022-12-16 00:06:51 +01:00
b4ae058bf6 Remove unused variable new_locvars in src/passes.ml 2022-12-16 00:04:57 +01:00
0c8da12afe Correct typo in verification that nodes always have arguments and make the main having such a verification too, as in Lustre 2022-12-16 00:00:11 +01:00
Antoine Grimod
21d2d0c9bb fix type error in code 2022-12-15 23:48:02 +01:00
Antoine Grimod
de294df84a Translation of automaton to lustre almost finished 2022-12-15 23:39:01 +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
dsac
74f8a3c3e1 [parser] functions other that main → args required 2022-12-15 22:14:59 +01:00
dsac
0d5e045671 [parser] foirbid calling auxiliary nodes with no arguments 2022-12-15 22:07:16 +01:00
dsac
97c6020414 [parser] avoid conflicts between local, input and output variables 2022-12-15 21:42:21 +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
dsac
eceeb3c157 [fix] identation error 2022-12-15 20:37:05 +01:00
ca271eaf66 Correct typos in src/passes.ml and src/test.node 2022-12-15 20:13:18 +01:00
72ba196142 Merge branch 'master' of https://gitea.lemnoslife.com/Benjamin_Loison/Synchronous_reactive_systems 2022-12-15 19:52:02 +01:00
1a06fc9a6a Add reset support in C 2022-12-15 19:51:46 +01:00
Arnaud DABY-SEESARAM
8582337774 [passes] pass to check the typing tags of the program / expressions 2022-12-15 18:33:04 +01:00
Arnaud DABY-SEESARAM
db5c584435 [passes] fix for the equation ordering pass 2022-12-15 17:40:15 +01:00
Arnaud DABY-SEESARAM
6459c54159 [passes] ordering equations 2022-12-15 17:11:19 +01:00
Arnaud DABY-SEESARAM
9151a6e29a [tests] adding the -test option to duplicate sanity checks 2022-12-15 17:11:19 +01:00
Arnaud DABY-SEESARAM
19fd3bc1b9 Merge remote-tracking branch 'origin/master' 2022-12-15 16:18:17 +01:00
Arnaud DABY-SEESARAM
38a7325097 [beamer] slide 7 2022-12-15 16:17:47 +01:00
342aba4426 Correct copy-pasted int and bool cases 2022-12-15 16:08:22 +01:00
dsac
e84a6e387d [beamer] proto 0 2022-12-15 11:40:29 +01:00