Adrien Guatto
54cbec9190
C backend: generate A_types.{h,c} when compiling A.epi
...
Before this commit, the C backend would put the translated definitions
of an interface file A.epi into A.{h,c}. This is inconsistent with the
C code generated for source files, which expects to find A_types.{h,c}.
2019-10-13 13:27:52 +02:00
Adrien Guatto
0435a2420d
Fix miscompilation of Pervasives.xor to C
2018-10-12 16:56:01 +02:00
Gwenaël Delaval
7d6106d0aa
Passes optimization
...
Translation to tail-recursive versions of functions
for handling of (very) big nodes.
2017-05-23 22:13:32 +02:00
Gwenaël Delaval
028c564a31
Clean-up of verbose output
...
Leave only comments about compilation passes.
Remove output of intermediate code on standard output: added
generation of <module>.log containing all intermediate code.
2017-05-23 11:37:30 +02:00
Gwenaël Delaval
e4f51fea68
Switch to non-deprecated String functions
...
Use of String.*_ascii non-deprecated versions.
NB: Heptagon becomes available only for Ocaml versions >= 4.03.0.
2017-03-14 12:24:29 +01:00
Gwenaël Delaval
2f18926bf4
Clean up documentation comments
2017-03-03 11:41:57 +01:00
Gwenaël Delaval
69b8cc5a18
Added operator (=>) in Pervasives module
...
Operator (=>) for implication added in Pervasives module.
"a => b" is translated into "not a or b" at code generation.
2016-06-25 08:37:47 +02:00
Gwenaël Delaval
83905f9039
Remove traces and warnings
2016-06-02 01:33:02 +02:00
Gwenaël Delaval
d8d24ffd95
Handle modularity/several controllers by module
...
* Several controllers by module : added option "-m <Module>" in ctrl2ept
Generate controllers for each node of one module in <module>_controller.ept
* Types of <Module> no longer moved to <Module>_controller
* Added "_types" suffix for type dependencies for C target
2016-06-02 01:33:02 +02:00
Gwenaël Delaval
05150f2078
[ctrl-n] Suppression of type declarations in Heptagon controller
...
TODO : move type declarations in separated module.
2016-06-02 01:33:02 +02:00
Gwenaël Delaval
2aed0f6537
Deadcode removal improvement
...
Deadcode removal in Obc :
- suppression of switch unused cases :
switch(true) {
case false: ...
}
- activation with -deadcode option
2016-01-18 14:32:54 +01:00
Gwenaël Delaval
64b8c0592a
Pretty-printing class parameters in obc
2016-01-18 14:31:04 +01:00
Gwenaël Delaval
e8ec3e012c
Merge branch 'ctrl-n' into decade
2015-12-15 09:33:25 +01:00
Adrien Guatto
dc47767ba4
Print an empty default statement at the end of all C switches
...
This prevents modern compilers from emitting warnings when the generated C code
contains switch statements with (intentionally) missing cases.
2015-06-12 17:49:59 +02:00
Gwenaël Delaval
0d1aef8c78
Bug correction: support of enumerated types as input for simulation
...
- use of a buffer to translate enumerated types from string to enum value
- hepts : correct interface with main
2015-02-27 15:39:39 +01:00
Nicolas Berthier
cbcf8b9ac0
Using unqualified names for string representation of constructors in C backend.
...
+ minor modifications in various places.
2014-11-13 09:45:15 +01:00
Nicolas Berthier
d4fe017864
Bug correction in names of C functions for converting constructors to string.
2014-10-31 15:40:05 +01:00
Nicolas Berthier
5506690de5
Merge branch 'decade' into ctrl-n
2014-10-03 10:58:41 +02:00
Valentin Perrelle
1f2e084e6e
Fixed a bug where loops were not generated for copying arrays.
2014-06-25 18:53:34 +02:00
Nicolas Berthier
99ab12aa13
Fixed warnings.
2014-03-18 11:01:56 +01:00
Nicolas Berthier
216550c0d1
Fixed warnings & documentation comments.
...
- gitignore: ignore files generated by `configure' script.
2013-11-08 18:51:06 +01:00
Gwenal Delaval
ee7ef158e7
Bug correction: java code generation for "~-."
...
Bug correction: handling of unary float "~-."
2013-08-02 14:14:13 +02:00
Cédric Pasteur
a00620ca19
Fixed interference of fast memories
...
A fast memory should be considered alive during
the whole step function when its clock is false.
2013-05-06 11:47:05 +02:00
Nicolas Berthier
899d33afb6
Corrected a bug in generation of C records.
...
Corrected a somewhat unnoticeable but ugly bug in the generation of C
records, that could mess up the field names when they were not
assigned in the same order as in the declaration of the type.
2013-03-15 09:31:19 +01:00
Gwenal Delaval
9b3ba83bb1
Bug correction in java generation
2013-03-11 16:04:12 +01:00
Gwenaël Delaval
3e8af67e07
Added Java 1.4 target (experimental)
...
Experimental : remains some bugs on arrays
2012-11-17 23:29:19 +01:00
Gwenaël Delaval
6dd1c743d6
Records in Java
...
Added support of records in Java
2012-09-30 01:40:18 +02:00
Gwenal Delaval
6a21e5d701
Iostream for Java
...
Added support of Iostream.printf (not fprintf)
for Java code gen.
2012-09-28 15:26:01 +02:00
Gwenal Delaval
b176384952
Java code generation: lexicography
...
Handling of weird lexical elements (e.g., idents with ', infix names...)
2012-09-28 13:04:08 +02:00
Gwenal Delaval
41fccc66fb
Bugs corrections
...
- callgraph: add idents used for instantiated nodes
- cgen : added Idents.enter_node
- cmain : removed error when simulated node does not exist (existence
of simulated node was tested for every program, comprising loaded ones)
2012-08-01 17:08:58 +02:00
Gwenal Delaval
b858f0e987
Reads and writes of records in main simulation
2012-07-31 16:58:22 +02:00
Gwenal Delaval
70cb94d0bd
Unroll correction
...
Order of statement was incorrect
2012-07-23 17:35:20 +02:00
Gwenal Delaval
7e90dccc0a
Cleared java simulation output
2012-07-16 11:37:50 +02:00
Gwenaël Delaval
a15e17c02d
Cleared simulation output
2012-07-16 00:58:40 +02:00
Gwenaël Delaval
bf03077cd9
Correct output toward hepts
2012-06-29 02:01:49 +02:00
Gwenaël Delaval
ef00823cf7
Added Marc as co-author
2012-06-29 01:43:15 +02:00
Gwenaël Delaval
58086190eb
Headers and license file for GPL
...
Headers for every source file (excluding examples), mentioning
authors, copyright and license (GPL)
COPYING file with GPLv3 content.
2012-06-27 18:14:29 +02:00
Cédric Pasteur
8815a2cd03
Better handling of clocks in memalloc
...
- We can do a better allocation if we take into
account 'when' in extvalues
(test/good/memalloc_clocks.ept shows the
improvement)
- Fixed a bug with memalloc on records: if we
translate:
o = { a with .f = u }
to
o = a; o.f = u
then we cannot share u and o.f
2012-06-20 09:17:13 +02:00
Léonard Gérard
c1b8e47ffb
Fixed escape of string in java
2012-02-21 14:39:35 +01:00
Adrien Guatto
f43fcb78f6
Only inline integer extvalues when unrolling
2012-02-08 18:31:51 +01:00
Adrien Guatto
ec0274cc82
C backend: do not inline consts by default.
2012-02-08 17:49:21 +01:00
Adrien Guatto
fa09d86dc1
Unrolling in C backend.
2012-02-08 17:47:28 +01:00
Adrien Guatto
76ae2f4518
Loop unrolling.
2012-02-08 16:16:41 +01:00
Adrien Guatto
998b3b0b89
Generate C89
2012-01-25 12:42:14 +01:00
Léonard Gérard
b86555e013
global env misc
2011-12-12 11:08:47 +01:00
Cédric Pasteur
54cde301f6
C code generation for printf
2011-12-12 10:36:24 +01:00
Adrien Guatto
0f71dbe145
Bitwise or.
2011-12-06 17:46:35 +01:00
Adrien Guatto
8d772e20e2
Bitwise and.
2011-12-06 15:44:21 +01:00
Adrien Guatto
1ec15b9409
Bitwise operators on integers.
2011-12-06 15:44:21 +01:00
Adrien Guatto
5097c62449
C backend: put memory of the main node in a global variable.
2011-12-05 10:18:50 +01:00