Léonard Gérard
e174151d37
Unclutter ident printing.
2010-12-15 11:27:19 +01:00
Léonard Gérard
ac6dab15ee
Switch removing.
2010-12-15 11:26:29 +01:00
Léonard Gérard
2ae809c971
Fresh vars, and ident refactoring.
...
Idents.enter_node should be called when entering a node, it is done automagically by the mapfold unless you call directly Hept_mapfold.node_dec.
2010-12-15 11:26:29 +01:00
Léonard Gérard
e39a0484ff
Add 'block' to Heptagon.
2010-12-10 00:42:49 +01:00
Léonard Gérard
9a69c30dc5
Clock annotation in Hept AST
2010-12-10 00:39:25 +01:00
Gwenal Delaval
ed2642f847
Added controllables in every pass
2010-12-08 17:32:24 +01:00
Gwenal Delaval
b7cba3315a
Compiler option -nocaus
...
Added a compiler option de-activating causality analysis
2010-12-08 17:31:16 +01:00
Cédric Pasteur
0bb84532b9
Added a new static scoping pass
...
This pass transforms exps that should be static
to Econst se. The regular scoping then only has
to check this case.
The conversion is done in a single traversal of
the AST (unlike the old solution).
2010-11-20 17:39:24 +01:00
Léonard Gérard
684f3337f8
Removed unused arguments in mls2obc
2010-11-05 16:27:45 +01:00
Léonard Gérard
3e2fb0b4b1
Rename [lhs] to [pattern] in obc
...
lhs was verrrry bad.
2010-11-05 16:27:44 +01:00
Léonard Gérard
a22f7216f2
Added when and merge to heptagon. Need tests !
...
Clocking is still done in minils since it is way simpler.
2010-11-01 01:05:37 +01:00
Adrien Guatto
6ff8ed993f
Switched back to plain strings for some compiler options.
...
To be consistent or to be convenient, that is the question.
2010-10-04 00:35:12 +02:00
Adrien Guatto
412fd1f81b
New operator: modulo (written (%))!
2010-10-02 13:01:35 +02:00
Adrien Guatto
4044d8a0a2
Automata minimization.
2010-09-30 21:52:32 +02:00
Adrien Guatto
a4c3d9e856
Relevant command-line options are now stored as qualnames.
2010-09-30 21:40:04 +02:00
Cédric Pasteur
db732621a1
Re enabled iterator fusion
...
Added an option to enable it (off by default)
2010-09-15 09:53:20 +02:00
Cédric Pasteur
df12e081ae
Refactored Misc
...
Created two new files:
- utilities/global/compiler_options.ml: contains
the options that can be set using the cli
- utilities/global/errors.ml: contains global
errors definition
Misc now only contains helper functions that have
nothing to do with the ast or the compiler.
2010-09-15 09:38:52 +02:00
Cédric Pasteur
cae8d39f3d
Renamed exp_ty label to ty for consistency
2010-09-14 17:14:27 +02:00
Léonard Gérard
02db2ad6b4
Changed compile flags, and cleaned a bit.
...
Warn as error for partial match.
Warn for unused variables : added some TODO to check.
PS : I'll deal with callgraph which is doing things that Modules does.
2010-09-14 09:39:02 +02:00
Cédric Pasteur
0b12e6a4ae
Enum in Obc should also be qualnames
2010-09-13 15:19:52 +02:00
Cédric Pasteur
3d02b85bd6
Fixed some non exhaustive pattern matchings
...
Added assert_n functions to decompose to get a
tuple from a list of known size, and assert_nmin
when the list has at least n elements.
2010-09-13 15:19:40 +02:00
Léonard Gérard
412425301a
Added Sfield to differentiate from Sconstructor.
2010-09-13 12:05:10 +02:00
Cédric Pasteur
cba5f4893e
Move cases for arrays operators
...
Only functions that modify si or j needs to be
in translate_equation. The others should be in
translate_act.
2010-09-13 11:23:52 +02:00
Cédric Pasteur
cb521c9b68
Fix the (commented) code that prints an exp
2010-09-13 10:20:24 +02:00
Cédric Pasteur
36addab3cc
Use qualnames in Obc too
2010-09-13 09:03:15 +02:00
Cédric Pasteur
cc039ac42d
Make heptc compile
2010-09-10 14:29:13 +02:00
Léonard Gérard
a54e570d0f
Hept Scoping should be ok and documented,
...
Hept Parsing too,
all the reset to review carefully,
Typing to cut from all the scoping.
2010-09-09 19:48:20 +02:00
Léonard Gérard
15448fdff9
mlsc and mls_parsetree etc.
2010-09-07 16:32:08 +02:00
Cédric Pasteur
ffff23b675
Remove Elambda
...
Replace Elambda with a central repository of
anonymous nodes. It made the AST unnecessarily
complex.
2010-09-06 14:03:47 +02:00
Léonard Gérard
9eaafe9736
replaced mapfold with callgraph_mapfold. And the fixes to compile.
2010-08-26 13:55:29 +02:00
Léonard Gérard
9df4f625a2
Fixed location to use formatter instead of out_channel.
2010-08-24 17:29:00 +02:00
Adrien Guatto
6b87bb5ac0
Fixed confusion in mls2obc: concatenation should be handled at the
...
action level.
2010-08-04 15:36:20 +02:00
Léonard Gérard
4b3c3ba8b5
Revert "Fixed problem in clocking" e3676d1e3c
...
Fixing the actual bug :
* static_exp should not be created without type
after or during the typing pass.
2010-08-03 22:38:42 +02:00
Léonard Gérard
418b961293
Small fixes to the compilation processes.
...
*Locations should be pretty damn good now.
*Mlsc is up to date, still need a scoping pass (to be posted soon)
2010-08-02 16:31:57 +02:00
Cédric Pasteur
8f4220e08d
Made Eupdate dynamic
...
Modifying an array with
[ a with [i] = v ]
should expected a dynamic (not static) value
for i (nothing happens if i is in the wrong range).
This is the same behaviour as in Scade and it is
useful eg to modify an array in a foldi.
2010-07-28 12:34:07 +02:00
Adrien Guatto
d4f441ae19
Fixed missing control in node apps with resets.
2010-07-27 17:56:15 +02:00
Cédric Pasteur
627979534a
Generate correct call for operators
2010-07-27 17:48:21 +02:00
Cédric Pasteur
221eea1644
Added polymorphic (=) and (<>) operators
...
These two operators really need to be polymorphic,
so they cannot be in Pervasives. a <> b is translated
to not (a = b>) at parsing.
2010-07-27 17:16:49 +02:00
Cédric Pasteur
2e44402b03
Two fixes in heptc
...
- Add the directory of the file as an include
- write interfaces with uncapitalized filenames,
as expected by modules.
2010-07-27 14:00:15 +02:00
Cédric Pasteur
02dd7fa124
Added alias for types (aka typedef)
...
For instance:
type metres = int
type metres = MyLib.longueur
type matrice = metres^10^100
Code generation in C (with typedef) included. The
code uses the aliases for traceability.
2010-07-27 09:23:16 +02:00
Cédric Pasteur
a081f2dacf
Added foldi iterator
...
Same as fold but the iterated function takes an
integer as the last but one argument.
This is not something that is necessarily
important to have in trunk but the patch is so
small that it doesn't hurt.
2010-07-26 09:33:22 +02:00
Léonard Gérard
dc9bec28bf
Clock refactoring.
2010-07-23 22:13:03 +02:00
Léonard Gérard
f124bb4fd7
Refactoring Ident -> Idents ( uniform with Names etc )
2010-07-23 19:45:19 +02:00
Adrien Guatto
7f91ffab53
Output MiniLS code before clocking when in verbose mode.
2010-07-22 11:12:58 +02:00
Cédric Pasteur
75774cc685
Refactoring
...
Directly create a obj_dec instead of storing a tuple.
2010-07-22 10:15:11 +02:00
Cédric Pasteur
c12f1add0c
Keep params in Obc
...
Remember the parameters of the called node in the
parametrized version of Obc.
2010-07-22 09:44:57 +02:00
Cédric Pasteur
1be9f1c789
Fixed code generation for Elambda
...
- Added block notion in Obc
- Correct translation to C
2010-07-22 09:36:22 +02:00
Cédric Pasteur
dd660f4424
Added anonymous functions in Minils
...
- Added Elamba(inp, outp, eq_list) constructor. This
is necessary for iterator fusion.
- Refactored Mls2obc to allow to generate code
for anonymous functions (basically we have to
remember if we are within an iterator, as there is
no nesting of iterators)
There is a known problem with the local vars defined in
the anonymous function that needs to be declared.
2010-07-21 17:15:19 +02:00
Léonard Gérard
5e737d0094
location change. Heptc works with menhir.
2010-07-21 15:15:57 +02:00
Cédric Pasteur
b2c88810c5
Make Heptagon API more uniform
...
Use a block instead of variable list + equation list
for contract and node.
The new program transformations based on the
mapfold iterator are now enabled by default.
2010-07-20 09:31:29 +02:00