Commit graph

74 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 ee7d60120b Fixed bug in translation to minils 2012-06-19 15:56:54 +02:00
Gwenal Delaval 2956002f85 Correction and simplification of the sigali pass
Added a "Contracts" pass, after inlining, taking care of the
contracts of the nodes called in the body of a node. This pass
"inlines" the code and assume/guarantee parts of these subcontracts.

The "Sigali" pass both generates the sigali ("z3z") code and add the call to
the controller (which is a node generated further by the sigali tool).
Therefore this pass has been included into the mls compiler, and removed
from the targets (a "z3z" dummy target has been kept for backward compatibility
reasons).
2012-06-06 15:59:08 +02:00
Gwenal Delaval bb0bc8bfe5 Added local assume/guarantee
Added local assume/guarantee in contracts.

No syntax associated to these local asume/guarantee: internal use only.
2012-05-29 14:14:46 +02:00
Adrien Guatto e05f3732a0 Timing framework. 2012-03-07 17:48:08 +01:00
Adrien Guatto f09792485e Hept2mls: fixed missing enter_node 2012-03-07 17:48:08 +01:00
Léonard Gérard 8a78bc7d7d Add [external] in the signatures. fix callgraph acordingly. 2012-02-21 16:07:29 +01:00
Léonard Gérard f0cbbccc2a unsafe in minils node 2011-12-12 11:27:18 +01:00
Léonard Gérard b49c37f7bf Add ways to declare unsafe functions + unsafe fix 2011-11-21 03:26:26 +01:00
Adrien Guatto 1a9dc17618 Fixed clocking annotations.
1. Transmit annotations to extvaluese in Hept2mls.

2. Handle a pre-existing w_ck when clocking extvalues.
2011-11-10 15:36:54 +01:00
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.
2011-10-17 15:28:04 +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 8cc879be7a Generate code from interface (.epi) files
It includes the definition of types, constants
and prototypes defined in the interface.
2011-09-06 11:55:06 +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
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 46ed39b7b3 Remove some warnings. 2011-06-09 14:40:31 +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
Leonard Gerard 88497a2da3 parsing clocks. 2011-05-26 15:56:58 +02:00
Leonard Gerard a8215c8083 compile ! nearly all tests passed. 2011-05-26 15:56:58 +02:00
Cédric Pasteur 2b2cba8e2d Added split operator 2011-05-25 09:12:14 +02:00
Cédric Pasteur 6c9d9e90d1 Linearity annotations in the AST 2011-05-25 09:12:13 +02:00
Cédric Pasteur 9a7f9254d2 Added memalloc pass to the compiler 2011-05-25 09:12:11 +02:00
Cédric Pasteur 59c8106e46 Also use idents for Ewhen in Heptagon 2011-04-29 15:21:12 +02:00
Cédric Pasteur aae38a7844 Use idents for Emerge in Heptagon 2011-04-29 15:21:12 +02:00
Gwenal Delaval 8c4217ab83 Rebase bzr branch on old decade 2011-04-20 14:50:09 +02:00
Gwenaël Delaval 85bbe21d6c Sigali pass into compiler + added a_id field to applications
- Added "z3z" target language, calling sigali code generation

- a_id is application id, so as to identify node applications; added
to Minils AST. a_id is given on hept2mls pass.

This is needed for the controller execution from controller synthesis.
2011-04-20 12:47:28 +02:00
Cédric Pasteur a2303ec7e1 Other compile fixes
The java backend is disabled temporarily
2011-04-19 09:49:00 +02:00
Cédric Pasteur 028dfe0468 Fix for nested if and merge with tuples 2011-04-19 09:04:36 +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
Cédric Pasteur e2e8a93656 Hept2mls ported and very simplified
Does not compile yet
2011-04-14 10:00:06 +02:00
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
2011-03-22 22:12:59 +01:00
Cédric Pasteur 99eeacbceb Added mapi iterator
The last argument of the iterated function is the
index of the element in the array.
2011-03-22 09:28:41 +01:00
Léonard Gérard b8b16a7355 blop 2011-03-21 17:41:00 +01: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 cab8bb706e backport from async. 2011-03-09 00:06:36 +01:00
Léonard Gérard 315527231c Async in Heptagon Minils Obc. 2011-01-24 16:09:27 +01:00
Léonard Gérard ac6dab15ee Switch removing. 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
Léonard Gérard e39a0484ff Add 'block' to Heptagon. 2010-12-10 00:42:49 +01:00
Gwenal Delaval ed2642f847 Added controllables in every pass 2010-12-08 17:32:24 +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
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
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
Cédric Pasteur cc039ac42d Make heptc compile 2010-09-10 14:29:13 +02:00