Commit graph

59 commits

Author SHA1 Message Date
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
8a78bc7d7d Add [external] in the signatures. fix callgraph acordingly. 2012-02-21 16:07:29 +01:00
Adrien Guatto
53de6cd915 Bug fix in extvalue inlining 2012-01-25 16:11:22 +01:00
Cédric Pasteur
2f993a602c Fixed base clock in code generation
Put the base clock inside the equation where it 
belongs.
2012-01-25 09:34:58 +01:00
Léonard Gérard
da3147151d Better check signature error message 2011-12-12 11:30:18 +01:00
Léonard Gérard
ba5f336a6f Fix antidependance calculation 2011-12-12 11:01:22 +01:00
Léonard Gérard
fe1f02402b Test to watch sampling of returned stateful exps. 2011-12-06 15:44:20 +01:00
Cédric Pasteur
f76667e042 Second part of the fix 2011-12-06 15:44:20 +01:00
Léonard Gérard
2b9d3828b1 debut de la correction du when.
test :

node f(c :bool) returns (out :int)
let
  out = (0 fby 1) when c
tel


et

node f(x :int) returns (out : int)
let
  out = 0 fby x
tel

node g(c :bool) returns (out :int)
let
  out = f(0) when c
tel
2011-12-06 15:44:20 +01:00
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