Commit graph

74 commits

Author SHA1 Message Date
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 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
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
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 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
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
Adrien Guatto 1d6df4ecb2 Inlining pass added. Use with -inline. 2010-07-19 12:02:29 +02:00
Cédric Pasteur 4f9d6b2d82 Added v_loc in Minils too 2010-07-15 10:02:42 +02:00
Cédric Pasteur 46a09cf369 Make Efield an op (as in Minils)
The fact that this commit mostly removes code proves
that this was a good choice.
2010-07-15 09:56:21 +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 e2af987967 Compile fix 2010-07-13 08:38:51 +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
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
Léonard Gérard 7c0c2e0415 v_name -> v_ident for idents.... 2010-06-29 19:21:01 +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
Adrien Guatto b4ddefa65c Tabs, trailing ws and long lines shall receive no mercy! 2010-06-26 17:17:28 +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
Renamed from main/hept2mls.ml (Browse further)