Commit graph

60 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
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 44d3a639e5 Internal error for unknown clocks. 2012-03-02 17:12:30 +01:00
Cédric Pasteur 2f993a602c Fixed base clock in code generation
Put the base clock inside the equation where it 
belongs.
2012-01-25 09:34:58 +01:00
Léonard Gérard da3147151d Better check signature error message 2011-12-12 11:30:18 +01:00
Cédric Pasteur 2fc0435393 Added simple printf
Typing and clocking done
2011-12-12 10:36:24 +01:00
Léonard Gérard 2b9d3828b1 debut de la correction du when.
test :

node f(c :bool) returns (out :int)
let
  out = (0 fby 1) when c
tel


et

node f(x :int) returns (out : int)
let
  out = 0 fby x
tel

node g(c :bool) returns (out :int)
let
  out = f(0) when c
tel
2011-12-06 15:44:20 +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 7ac567cc35 Update the signature instead of recreating it
This avoids losing additional info in the
signature (such as linearity)
2011-09-07 11:32:16 +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
Brice Gelineau 42c2936040 Bugfix for the clocking analysis of iterators 2011-07-06 15:56:56 +02:00
Léonard Gérard 5837f3906f Multidimensional iterators in java. 2011-06-28 17:50:42 +02:00
Léonard Gérard 46ed39b7b3 Remove some warnings. 2011-06-09 14:40:31 +02:00
Léonard Gérard fe74030f78 Fix clocking of iterators. 2011-05-26 16:08:59 +02:00
Léonard Gérard b73e6502a6 resets are now without constraint. 2011-05-26 15:56:59 +02:00
Léonard Gérard d7d7552be4 Fix printing and parsing of clocks 2011-05-26 15:56:59 +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
Léonard Gérard de49540a76 clean signature printing. 2011-05-26 15:56:59 +02:00
Léonard Gérard 74cc367a0e correct base_clock and signature. 2011-05-26 15:56:59 +02:00
Léonard Gérard 9a17648516 good clocks in signatures 2011-05-26 15:56:59 +02:00
Leonard Gerard a8215c8083 compile ! nearly all tests passed. 2011-05-26 15:56:58 +02:00
Cédric Pasteur a2303ec7e1 Other compile fixes
The java backend is disabled temporarily
2011-04-19 09:49:00 +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 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 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 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 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
Léonard Gérard 6da5171e6a Flatten arguments fix in cloking. 2010-09-27 18:16:00 +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
Léonard Gérard a58c729ae2 clocking tweak. 2010-09-13 01:18:45 +02:00
Cédric Pasteur ffff23b675 Remove Elambda
Replace Elambda with a central repository of 
anonymous nodes. It made the AST unnecessarily 
complex.
2010-09-06 14:03:47 +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 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
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 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.
2010-07-28 12:34:07 +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 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 1719e2eb36 Fix bad clock expectation for static_exps. 2010-07-23 22:05:54 +02:00