Adrien Guatto
c7b83b7381
Fixed comparison functions which were blatantly wrong.
...
Previous versions weren't antisymmetric.
2010-11-10 15:45:41 +01:00
Léonard Gérard
26b30b9bac
Small code comments.
2010-11-04 18:07:17 +01:00
Léonard Gérard
a22f7216f2
Added when and merge to heptagon. Need tests !
...
Clocking is still done in minils since it is way simpler.
2010-11-01 01:05:37 +01:00
Léonard Gérard
ea4ef2583b
Fix print location.
...
It was not respecting boxes by using a \n instead of a @\n.
2010-10-08 14:34:31 +02:00
Adrien Guatto
6bdca86253
Comparison functions for types, clocks and minils expressions.
2010-09-30 21:39:53 +02:00
Adrien Guatto
3d860c3624
Idents: rename compare to ident_compare
2010-09-30 19:13: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
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
1857cb7c47
Identifiers only need to be unique inside a node
2010-09-13 15:20:09 +02:00
Léonard Gérard
412425301a
Added Sfield to differentiate from Sconstructor.
2010-09-13 12:05:10 +02:00
Léonard Gérard
e0e7bba733
Removed wrong sanity check in modules.
2010-09-13 11:06:42 +02:00
Cédric Pasteur
a3e1d8a5f9
Make sure that idents have unique names
...
Make sure that Idents.name returns two different
strings for two different idents. This fixes a
problem with variables in two automaton states
with the same name (as shown by test/good/name_clash.ept).
2010-09-13 10:18:52 +02:00
Léonard Gérard
b5f6593e18
Useful debug printing function.
2010-09-13 01:17:31 +02:00
Léonard Gérard
d20a77e181
Removed one nasty bug in modules.ml
2010-09-13 01:14:03 +02:00
Léonard Gérard
937d1f580b
Add Warning when encountering not typed expression when cloking.
2010-09-12 23:58:21 +02:00
Léonard Gérard
a72ab6fa08
Removed debug g_env printing.
2010-09-12 23:55:54 +02:00
Léonard Gérard
9cc3176771
Modules fixed... Pay $$$ attention to partial application and mutable fields.
2010-09-10 17:11:34 +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
Cédric Pasteur
f6fb5861ce
Make Typing compile
2010-09-10 13:59:38 +02:00
Cédric Pasteur
1d1f398e8a
First try at updating Typing
2010-09-10 13:42:45 +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
aef39b8036
Callgraph_mapfold polished.
2010-08-24 17:30:19 +02:00
Léonard Gérard
9df4f625a2
Fixed location to use formatter instead of out_channel.
2010-08-24 17:29:00 +02:00
Adrien Guatto
288b0049e4
Improved Obc pretty-printer, still far from perfect.
2010-08-19 12:38:22 +02:00
Léonard Gérard
8bda39eae9
Correct error message with assert false for int_of_static_exp. And some indentation.
2010-08-19 11:28:47 +02:00
Léonard Gérard
a3ac71174c
Static exp instantiation fix.
2010-08-17 23:30:26 +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
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)
2010-08-02 16:31:57 +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
e3676d1e3c
Fixed problem in clocking
...
Tuple of consts should have one clock var per
element. Added a new function const_skeleton to
create this kind of clock.
2010-07-26 15:34:46 +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
493f49fe04
Added iterator fusion
...
For now it only deals with maps but it can be
easily extended. See test/good/itfusion.ept for
examples of sequences that can be optimised.
2010-07-21 17:19:51 +02:00
Léonard Gérard
5e737d0094
location change. Heptc works with menhir.
2010-07-21 15:15:57 +02:00
Adrien Guatto
2a72628f20
Stricter mk_longname.
2010-07-19 12:02:29 +02:00
Cédric Pasteur
ac4e46eff9
Remove debug info
2010-07-16 14:16:31 +02:00
Cédric Pasteur
9f7c4da446
Added missing operator
2010-07-16 14:15:26 +02:00
Cédric Pasteur
778dfdb3f9
Do not loop forever during code generation
...
- Detect when the computation of the static exp
using simplif failed and abort.
- Added a better way to compute operators in
Static
2010-07-16 12:04:51 +02:00
Léonard Gérard
ce4f1916da
interface_format_version bump ! 10....
2010-07-14 02:37:02 +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
b8f69492b9
Add mapfold for other types in Signature
2010-07-13 13:55:29 +02:00
Cédric Pasteur
9e7c013fe2
Completion_mapfold
...
- Added it_gather combinator to create simply
a version of an iterating function using a gather
to combine accumulator values
Completion_mapfold and every_mapfold seems to work
2010-07-09 13:27:06 +02:00
Cédric Pasteur
e7bd251b35
Added Global_mapfold and Mls_mapfold
...
- Global_mapfold is used to iterate over types
defined in Types or Signature (the iterators
from Types were moved here)
- Mls_mapfold to iterate over Minils AST (we
do not iterate over clocks yet: is it useful ?)
2010-07-09 11:33:17 +02:00
Léonard Gérard
000dc91d69
Heptagon and Types mapfold.
2010-07-08 17:41:00 +02:00
Cédric Pasteur
b0a5a7f13e
Heptcheck compiles !!
2010-07-08 15:25:26 +02:00
Cédric Pasteur
68ecd0e781
Added consts in the signature of a module
2010-07-08 15:23:13 +02:00