Commit graph

48 commits

Author SHA1 Message Date
Léonard Gérard
b49c37f7bf Add ways to declare unsafe functions + unsafe fix 2011-11-21 03:26:26 +01:00
Cédric Pasteur
1a28ed96e8 Improvement for normalize memories
Only create necessary copies (for outputs
and recursive registers).
2011-11-16 16:07:36 +01:00
Adrien Guatto
d0ed09c3e5 Ext-value inlining pass. 2011-10-04 15:14:02 +02:00
Cédric Pasteur
81947eca40 Made linearity field not optional
This helped solve a few bugs with linear types,
for instance when using automata.
The intermediate code is not well-typed (wrt to
linear types only), after the encoding of automata.
2011-09-07 17:51:31 +02:00
Cédric Pasteur
caa43f163f Added dependency from a read to a linear read
This got lost along the way when porting memalloc
to the new branch
2011-09-07 14:14:59 +02:00
Cédric Pasteur
7ac567cc35 Update the signature instead of recreating it
This avoids losing additional info in the
signature (such as linearity)
2011-09-07 11:32:16 +02:00
Cédric Pasteur
7d95b95ed7 Merge branch 'memalloc' into decade
Conflicts:
	compiler/global/signature.ml
	compiler/heptagon/analysis/typing.ml
	compiler/heptagon/hept_printer.ml
	compiler/heptagon/hept_utils.ml
	compiler/heptagon/heptagon.ml
	compiler/heptagon/parsing/hept_parser.mly
	compiler/heptagon/parsing/hept_parsetree.ml
	compiler/heptagon/parsing/hept_scoping.ml
	compiler/heptagon/transformations/switch.ml
	compiler/main/hept2mls.ml
	compiler/minils/minils.ml
	compiler/minils/mls_printer.ml
	compiler/obc/c/cgen.ml
	compiler/obc/control.ml
	compiler/utilities/misc.mli
2011-07-21 08:50:45 +02:00
Léonard Gérard
108981c0eb Static constraints in the source. Equal removed
( = ) in pervasives is a stub, it will be typed in a polymorphic way.
This is necessary to have a simple way to transform exp into a static_exp
even when there is the = operator.
2011-06-09 14:53:40 +02:00
Léonard Gérard
2a2b363bf7 Real asynchronous resets. 2011-05-26 15:56:59 +02:00
Léonard Gérard
fbfa6eda1a Add Ewhen to the minils ast, And clocking of iterators.
Ewhen is now the only case of possible recursion for minils exps.
This add was motivated by equations like :
(y,z) = f(x) when c
This equation to be correctly normalized in minils before needed :
y',z' = f(x)
y = y' when c
z = z' when c
But this new variables where needless since the final translation of when c
is the identity.
2011-05-26 15:56:59 +02:00
Léonard Gérard
9a17648516 good clocks in signatures 2011-05-26 15:56:59 +02:00
Leonard Gerard
a8215c8083 compile ! nearly all tests passed. 2011-05-26 15:56:58 +02:00
Cédric Pasteur
7787428f34 Compile fixes 2011-05-25 09:12:10 +02:00
Cédric Pasteur
3ee0e5e7b4 First version of interference.ml 2011-05-25 09:12:10 +02:00
Léonard Gérard
b8ee46d58f fix normalize_mem 2011-04-27 14:29:21 +02:00
Léonard Gérard
6b86b86e9d really fix normalize_mem.
in the old fix was missing the renaming, and there was wrong equations
order :
f () returns x
[here rename x by mem_x]
mem_x = fby ...
x = mem_x

so the simplest was :
f () returns out_x
var x;
[ nothing to do]
out_x = x
x = fby ...

pay attention to the order of equations since we are after the
scheduling..
probably it should be done before the scheduling anyway ?
2011-04-20 20:47:06 +02:00
Leonard Gerard
c0602c6df6 etuple removed 2011-04-18 16:09:07 +02:00
Cédric Pasteur
c6aa63b444 Heptc compiles again
AFor now expects expressions instead of static exps
2011-04-18 15:38:42 +02:00
Léonard Gérard
5d2f7dfa85 jeudi soir. still on mls2obc. 2011-04-14 20:14:21 +02:00
Cédric Pasteur
6adb45c3ad Normalize in Heptagon compiles 2011-04-13 16:21:28 +02:00
Cédric Pasteur
b1b8e103f2 Added partial application for iterators
For instance:
  ... = map<<n>> (f<<se>>)((t1, t1'))(t2, t3)

is translated to:
  for(int i =...)
    ... = f(t1, t1', t2[i], t3[i])
2011-03-21 17:22:03 +01:00
Léonard Gérard
8f4411e145 Recursives Qualnames.
In order to have a correct handling of inner classes in Java, and to prepare for modules inside modules.
2011-02-07 14:24:17 +01:00
Léonard Gérard
09419a77a5 again 2011-01-24 16:09:28 +01:00
Léonard Gérard
9e431c0cc7 remove TODO. 2010-12-15 18:35:45 +01:00
Adrien Guatto
4044d8a0a2 Automata minimization. 2010-09-30 21:52:32 +02:00
Léonard Gérard
8f0f0598de Small comments. 2010-09-18 22:30:43 +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
Léonard Gérard
eda43043d5 bug fix in is_struct 2010-09-10 11:47:11 +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
5c09abeb18 Revet last commit a5f89876c2 and gives the right fix.
Plus remove all the forbidden '\n', replaced with '@.' or '@\n' depending on context.
2010-09-01 14:40:31 +02:00
Léonard Gérard
9df4f625a2 Fixed location to use formatter instead of out_channel. 2010-08-24 17:29:00 +02:00
Cédric Pasteur
c99e29ef74 Make sure to unalias type when checking for arrays 2010-07-28 09:53:16 +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
Cédric Pasteur
336b6eac00 Simplify a little Mls2obc
We don't need to return the memory vars as they
are already computed
2010-07-16 09:58:56 +02:00
Cédric Pasteur
66078effbd Added support for tuples in normalize
- (v1, v2, ... ) fby (e1, e2, ...) is translated to
(v1 fby e1, v2 fby e2, ...)

This has made the code even more complex. This will
need to be refactored at some point.
2010-07-15 17:58:32 +02:00
Cédric Pasteur
f8ecf3d76c Fixed Vars read function
When is_left is true, the variables to the right
of the fby should be ignored.
2010-07-15 11:57:47 +02:00
Léonard Gérard
57751992c0 Rebase done : Mls re-ported. Mls_mapfold and mls_utils updated. 2010-07-14 02:58:08 +02:00
Cédric Pasteur
769cb1d881 Updated ast for Static
- Static are used for consts in Heptagon and Minils.
For now, node static parameters remain int only
(ie they are type parameters). Do we need more ?
- Also updated Parsetree AST to the recent changes
in API
2010-07-08 15:16:27 +02:00
Léonard Gérard
d58e83a985 Proposition 1. 2010-07-08 15:04:57 +02:00
Léonard Gérard
65c12884bd SConst -> Sconst 2010-07-06 11:12:14 +02:00
Léonard Gérard
0ae39e8698 Good static Constructors names.
Conflicts:

	compiler/global/static.ml
	compiler/heptagon/analysis/typing.ml
	compiler/heptagon/heptagon.ml
	compiler/heptagon/parsing/scoping.ml
	compiler/minils/mls_utils.ml
2010-07-01 20:00:46 +02:00
Cédric Pasteur
01d0cd02c3 Remove bounds hack in Eselect_dyn
We no longer need to store the bounds as the 
bounds check expression is generated from MiniLS
code where the type is directly available.
2010-06-30 13:46:46 +02:00
Cédric Pasteur
b4419a6760 Better deal with memory less nodes
There are now 3 kinds of nodes: Eprim : primitive 
nodes, Enode: nodes with memory, Efun: nodes 
without memory.

Typing now sets correct eq_statefull and b_statefull
for equations and blocks. Resets are only added 
when a node with memory is called.

The calling convention is the generated code needs
to be modified so that we can remove the context 
for nodes without memory.
2010-06-30 13:37:54 +02:00
Adrien Guatto
f35bf95458 Indentation fixes! 2010-06-29 11:18:50 +02:00
Léonard Gérard
0f2d046d59 Gros blop pour que Mlsc compile.
-* Séparation du fichier minils avec création de mls_utils
-* Lexer et Parser qui fonctionnent (pas complets encore)
-* Use of menhir with --explain pour debug du parser
-* Quelques refactoring (ident/name...)
2010-06-28 18:06:39 +02:00