55 Commits (da3147151dfaa2a79fb4bf56b836e8798bc19ead)

Author SHA1 Message Date
Léonard Gérard da3147151d Better check signature error message 13 years ago
Cédric Pasteur 04b8853a1d Added a new reinit operator
It has type:
reinit: t at r * t -> t at r

It can be used to put a constant value in a 
location.
13 years ago
Gwenaël Delaval c57b71b6aa Merge branch 'bzr' into decade
- Added Boolean module (enum types to boolean vectors)
- Added Hept_clocking analysis, called before Boolean
- Added z3z target from minils (sigali format)
- Bug corrections in Normalize, Normalize_mem

Conflicts:
	compiler/heptagon/analysis/typing.ml
	compiler/heptagon/heptagon.ml
	compiler/heptagon/parsing/hept_parser.mly
	compiler/heptagon/parsing/hept_parsetree.ml
	compiler/heptagon/parsing/hept_scoping.ml
	compiler/main/hept2mls.ml
	compiler/main/heptc.ml
	compiler/main/mls2seq.ml
	compiler/minils/minils.ml
	compiler/minils/transformations/normalize_mem.ml
	test/check
13 years ago
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
13 years ago
Brice Gelineau c70d34ec06 Preliminary version of multidimensional iterators. 13 years ago
Léonard Gérard 83b0182874 Merge branch 'clocked_inputs' into decade
Conflicts:
	compiler/heptagon/analysis/typing.ml
	compiler/heptagon/parsing/hept_scoping.ml
	compiler/heptagon/parsing/hept_static_scoping.ml
	compiler/main/mls2obc.ml
	compiler/obc/c/cmain.ml
13 years ago
Brice Gelineau 938e8897b2 n-ary Sarray_power Earray_fill 13 years ago
Léonard Gérard d7d7552be4 Fix printing and parsing of clocks 13 years ago
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.
13 years ago
Léonard Gérard 74cc367a0e correct base_clock and signature. 13 years ago
Leonard Gerard a8215c8083 compile ! nearly all tests passed. 13 years ago
Cédric Pasteur 6c9d9e90d1 Linearity annotations in the AST 13 years ago
Léonard Gérard d6240e1c67 100 and java scalarized 13 years ago
Leonard Gerard 8da5ce4648 no order in declarations 13 years ago
Leonard Gerard c0602c6df6 etuple removed 13 years ago
Léonard Gérard 5d2f7dfa85 jeudi soir. still on mls2obc. 13 years ago
Cédric Pasteur 2fdf2855d3 Added a new truncated select operator
a[>e<] returns the element in the array at index
e, a[0] if e < 0 and a[n-1] if e >= n
13 years ago
Cédric Pasteur 99eeacbceb Added mapi iterator
The last argument of the iterated function is the
index of the element in the array.
13 years ago
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])
13 years ago
Léonard Gérard cab8bb706e backport from async. 13 years ago
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.
14 years ago
Léonard Gérard 315527231c Async in Heptagon Minils Obc. 14 years ago
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.
14 years ago
gwenael delaval 4d5cc091d7 Add "with" syntax
Add with syntax on AST, parsetrees, parsers and printers
14 years ago
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.
14 years ago
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.
14 years ago
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.
14 years ago
Léonard Gérard 1e5697b29a Removed Interface since it's job is now done during the scoping.
Moved printing stuff to Global_printer.
14 years ago
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.
14 years ago
Cédric Pasteur ffff23b675 Remove Elambda
Replace Elambda with a central repository of 
anonymous nodes. It made the AST unnecessarily 
complex.
14 years ago
Léonard Gérard 30c786c06e Some more clean up with formatter and so on. 14 years ago
Léonard Gérard 64c44efad5 Cosmetic mls_printer changes. 14 years ago
Léonard Gérard d5e9358315 Small mls_printer fixes : empty args should print "()". 14 years ago
Léonard Gérard 74faffa423 Mls printing order fix ( const at top of program ) 14 years ago
Adrien Guatto 744565250e Missing new-line for const pretty-printing in Mls_printer 14 years ago
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)
14 years ago
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.
14 years ago
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.
14 years ago
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.
14 years ago
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.
14 years ago
Léonard Gérard dc9bec28bf Clock refactoring. 14 years ago
Léonard Gérard f124bb4fd7 Refactoring Ident -> Idents ( uniform with Names etc ) 14 years ago
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.
14 years ago
Léonard Gérard 57751992c0 Rebase done : Mls re-ported. Mls_mapfold and mls_utils updated. 14 years ago
Léonard Gérard be7bdc7f27 Mls printer ported. 14 years ago
Cédric Pasteur ee767064b1 Instantiation of parametrized nodes (v2)
- Many changes to make Hept2mls, mls2obc, etc
compile with the api changes
- Added Callgraph_mapfold: starting from a main
program, generates the list of instances of each
node necessary and creates them.
- Mls2seq deals with giving to the code generators
the correct source (mls or obc, wit or without
static parameters)

It is now possible to use parametrized nodes that 
are defined in other files. For that to work, the 
first file has to be compiled to an object file:
	heptc -c mylib.ept
which creates a mylib.epo file. Compiling the main
file will then generate all the instances of 
parametrized nodes from the lib (only the called 
nodes will be compiled, but all the nodes in the 
main file are compiled).
14 years ago
Cédric Pasteur b0a5a7f13e Heptcheck compiles !! 14 years ago
Léonard Gérard d58e83a985 Proposition 1. 14 years ago
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.
14 years ago
Léonard Gérard 2af3686af2 Mls printer fix. 14 years ago