Commit graph

133 commits

Author SHA1 Message Date
Léonard Gérard ffe2b23a82 new sheduler by default 2011-10-23 17:42:26 +02:00
Cédric Pasteur 4f9a91eebd Fixed dependency issue with linear splits 2011-10-17 15:25:52 +02:00
Léonard Gérard ef4478e37e removed some stupid warnings. 2011-10-14 13:33:34 +02:00
Cédric Pasteur 4d912e9349 Added more options for memalloc
There is now three options for memory allocation:
  - -only-linear activates only the linear 
annotations (with typing and code generation)
  - -only-memalloc does only memory allocation
  - -memalloc does both

When linear typing is not activated, linearity 
annotations are ignored (the signature in the .epi
does not contain the annotations)
2011-09-09 16:05:44 +02:00
Cédric Pasteur 29a6721121 Fix for dep when using linear types and automata 2011-09-07 17:27:58 +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
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
2011-08-04 13:37:33 +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
Adrien Guatto d1c2789574 Tomato: properly handle n-ary functions. 2011-07-08 11:56:38 +02:00
Adrien Guatto 3c5bb4e8b7 Tomato working with clocks and when. 2011-07-08 11:56:37 +02:00
Adrien Guatto 891174d73c All-new and fresh tomato!
Not working ATM:
  * tuples
  * when
2011-07-08 11:56:37 +02:00
Léonard Gérard c5fbcbe765 removing white spaces 2011-06-28 17:50:42 +02:00
Brice Gelineau c70d34ec06 Preliminary version of multidimensional iterators. 2011-06-28 17:50:42 +02:00
Léonard Gérard 2a2b363bf7 Real asynchronous resets. 2011-05-26 15:56:59 +02:00
Cédric Pasteur 1ea4290f9e Added scheduler that tries to minimize interferences 2011-05-25 09:12:15 +02:00
Cédric Pasteur 90648f61ff Fixed linear typing of automata
Each state must be typed in the global environment
and then the accumulator must be joined.
2011-05-25 09:12:15 +02:00
Cédric Pasteur 3f29e8623d Interaction between linear typing and memalloc 2011-05-25 09:12:13 +02:00
Cédric Pasteur dec8cb69c8 Fixed bug in computation of live vars 2011-05-25 09:12:12 +02:00
Cédric Pasteur c994e58e06 Fixed bug in listing colors 2011-05-25 09:12:11 +02:00
Cédric Pasteur 448c163181 Dsatur coloring algorithm
It is not completely generic, as we need to know 
the difference between affinity and interference
edges.
2011-05-25 09:12:11 +02:00
Cédric Pasteur a7015a9bf4 Fix for interference
Works on a simple program
2011-05-25 09:12:11 +02:00
Cédric Pasteur 9a7f9254d2 Added memalloc pass to the compiler 2011-05-25 09:12:11 +02:00
Cédric Pasteur 1059329c0e Interference compiles 2011-05-25 09:12:11 +02:00
Cédric Pasteur 197e24b73e Rename Graph to Sgraph
The Graph module name is already used  
in OCamlGraph
2011-05-25 09:12:10 +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
Cédric Pasteur e9316bbf1b Interference graph ported to OCamlGraph 2011-05-25 09:12:10 +02:00
Adrien Guatto a15276f053 Compile with proper include to pervasives.h. 2011-05-12 16:32:52 +02:00
Gwenal Delaval acad16b98a Graphical simulator hepts
Added graphical simulator hepts

Added option -hepts to the compiler: this option formats the output of the simulation loop
to fit with hepts (currently working only on C target code). Typically, suppresses all
"decoration" output, like input or output names, and prints output on single lines.

Currently not implemented in hepts: array types.

Usage: to simulate the node Modulename.f:

heptc -target c -s f -hepts modulename.ept
gcc modulename_c/*.c -o ./f_sim
hepts -mod Modulename -node f -exec ./f_sim
2011-05-12 10:08:13 +02:00
Gwenal Delaval 9e41fcf71f Current Boolean pass for Heptagon 2011-05-05 11:54:38 +02:00
Léonard Gérard 219c4dbf8d cosmetic 2011-04-29 15:04:47 +02:00
Gwenal Delaval 4e267d82c6 Boolean transformation pass (translate every enumeration type to boolean tuples) 2011-04-20 12:28:37 +02:00
Cédric Pasteur 57bc9f210b Added a generic onfiguration for backends
Each backend gives a function used to 
enable/disable passes, executed before the
beginning of the compilation
2011-04-14 13:53:30 +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
Cédric Pasteur 35775c4131 C backend ported to recent API changes in Obc 2011-03-09 09:46:00 +01:00
Léonard Gérard 86f743318b Fixes and basic Java main. 2011-02-14 15:21:57 +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 df469db394 New Java backend closing 2011-01-24 16:09:28 +01:00
Léonard Gérard 0768babab7 Removed brocken and useless mlsc, cleaned heptc. 2011-01-07 17:30:04 +01:00
Léonard Gérard e174151d37 Unclutter ident printing. 2010-12-15 11:27:19 +01:00
Léonard Gérard ac9f805446 Refactoring. 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
Gwenal Delaval b7cba3315a Compiler option -nocaus
Added a compiler option de-activating causality analysis
2010-12-08 17:31:16 +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 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
Adrien Guatto 1fd2f374ff New misc functions, renamed make_list_compare to list_compare.
New functions fold_right_i and option_compare.
2010-09-30 19:24:41 +02:00
Cédric Pasteur 77a9dde027 Fixed problem with stdlib
The preprocessor has to parse the compiler_options.ml
file now.
2010-09-15 10:27:53 +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 d913e1be89 Move options doc to the correct file 2010-09-15 09:43:28 +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 6e5e7ec814 Fix numbers in error messages 2010-09-14 17:15:43 +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 d8dffe15d8 Fixed remainings non exhaustive patterns
Now the only shown warnings are the X type that 
we don't care about
2010-09-13 16:02:33 +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 1e5697b29a Removed Interface since it's job is now done during the scoping.
Moved printing stuff to Global_printer.
2010-09-10 14:06:33 +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
Léonard Gérard aad7b29c30 small print debugging tweaks. 2010-09-01 14:42:44 +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 30c786c06e Some more clean up with formatter and so on. 2010-08-29 22:30:51 +02:00
Léonard Gérard 9df4f625a2 Fixed location to use formatter instead of out_channel. 2010-08-24 17:29:00 +02:00
Léonard Gérard c4a926f489 Correct Mapfold !! Or at least much more than before.
Still not sure whether the notion of main_nodes is correct.
A parametrized node not used right in the module gets removed.
Is that the wanted behaviour ?
2010-08-24 11:07:05 +02:00
Léonard Gérard f124bb4fd7 Refactoring Ident -> Idents ( uniform with Names etc ) 2010-07-23 19:45:19 +02:00
Léonard Gérard 5e737d0094 location change. Heptc works with menhir. 2010-07-21 15:15:57 +02:00
Adrien Guatto 4edc03c163 Mapfold_right for even nicer code. 2010-07-19 17:19:02 +02:00
Adrien Guatto 3a0b1f9e16 New handy function for pretty-printing: wrap_print. 2010-07-19 15:13:56 +02:00
Adrien Guatto d75f4f8901 Added an option for global inlining (-flatten). 2010-07-19 13:20:11 +02:00
Adrien Guatto 1d6df4ecb2 Inlining pass added. Use with -inline. 2010-07-19 12:02:29 +02:00
Léonard Gérard c657ce8ecb Schedule with the iterator and eqs/var_decs added in mapfold. 2010-07-14 03:45:38 +02:00
Léonard Gérard 1c2929078d Small tweaks on the hept_mapfold and comments. 2010-07-14 02:37:02 +02:00
Cédric Pasteur 0d9a35a8b6 Fixed Callgraph_mapfold 2010-07-13 15:37:29 +02:00
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).
2010-07-13 14:03:39 +02:00
Cédric Pasteur f752f895ce Reset_mapfold
- Also refactored most of the code (why the hell
would anyone use arrays to iterate over lists 
with an index ?!?)
2010-07-09 15:28:26 +02:00
Léonard Gérard 000dc91d69 Heptagon and Types mapfold. 2010-07-08 17:41:00 +02:00
Léonard Gérard 5baa30f7c1 Last refactor ? and hept_mapred shows in ! 2010-07-08 15:22:26 +02:00
Adrien Guatto ff07d77667 Assertion generation for C back-end. 2010-06-27 23:28:38 +02:00
Adrien Guatto b4ddefa65c Tabs, trailing ws and long lines shall receive no mercy! 2010-06-26 17:17:28 +02:00
Cédric Pasteur b360e56893 Unbreak Graph 2010-06-24 05:01:10 +02:00
Adrien Guatto 30338a3f38 Removed outdated command-line options. 2010-06-24 04:59:35 +02:00
Léonard Gérard 9fff8e4ad8 Refactoring and organisation.
Separate parser, lexer and printer of hpetagon (Hetp_*) from the minils ones (Mls_*)
ident_of_var -> ident_of_name
get_current_location -> current_loc
2010-06-24 03:30:14 +02:00
Léonard Gérard 60a3ad15f8 move to subfolder compiler. 2010-06-21 11:58:57 +02:00