211 Commits (master)

Author SHA1 Message Date
Timothy Bourke 685c3aa862 Accept .lus file extension 7 years ago
Gwenaël Delaval 35bce1d5e8 Added simple scheduler with -simple-scheduler option
Scheduler_simple module: simplest possible scheduler, with
only topological sort and without any "smart" algo/heuristic.
7 years ago
Gwenaël Delaval 7d6106d0aa Passes optimization
Translation to tail-recursive versions of functions
for handling of (very) big nodes.
7 years ago
Gwenaël Delaval 028c564a31 Clean-up of verbose output
Leave only comments about compilation passes.
Remove output of intermediate code on standard output: added
generation of <module>.log containing all intermediate code.
7 years ago
Gwenaël Delaval e4f51fea68 Switch to non-deprecated String functions
Use of String.*_ascii non-deprecated versions.

NB: Heptagon becomes available only for Ocaml versions >= 4.03.0.
7 years ago
Gwenaël Delaval 2f18926bf4 Clean up documentation comments 7 years ago
Gwenaël Delaval d8d24ffd95 Handle modularity/several controllers by module
* Several controllers by module : added option "-m <Module>" in ctrl2ept

Generate controllers for each node of one module in <module>_controller.ept

* Types of <Module> no longer moved to <Module>_controller

* Added "_types" suffix for type dependencies for C target
8 years ago
Gwenaël Delaval 05150f2078 [ctrl-n] Suppression of type declarations in Heptagon controller
TODO : move type declarations in separated module.
8 years ago
Gwenaël Delaval e9540a2159 hepts: enum types & alias
The graphical simulator hepts now support type aliasing.
8 years ago
Nicolas Berthier fb6755efb2 Bugfix in ctrl2ept: do not reset symbol table after loading type declarations 9 years ago
Nicolas Berthier 14a7b67a70 New option to force abstraction of infinite-domain state variables in ctrln export
Also add an option to silence related warnings
9 years ago
Nicolas Berthier 2d874f8070 New option to silence warnings about untranslatable constructs 9 years ago
Nicolas Berthier 74b94c9718 Fix handling of nodes without actual controllers by ctrl2ept
These changes allow to handle the case where contracts are only used
for verification purposes, in which case the functions generated by
ReaX have no outputs and are not functions stricto sensu.  Indeed, in
this case the new controller module still needs to be declared and
compiled as we may have re-qualified types during the generation of
the Controllable-Nbac code: we moved all types declared in the
original module into the controller module to break cyclic module
dependencies that would otherwise be introduced if the controller is
expressed using data of such types.
9 years ago
Gwenaël Delaval 0d1aef8c78 Bug correction: support of enumerated types as input for simulation
- use of a buffer to translate enumerated types from string to enum value
- hepts : correct interface with main
9 years ago
Gwenaël Delaval 3dfbeffeb6 Added syntax for reachability and attractivity in contracts
Contracts can now comprise a list of objectives (in any order).

One objective can be (e being a Boolean heptagon expression) :
- invariance, with the syntax "enforce e"
- reachability, "reachable e"
- attractivity, "attractive e"
10 years ago
Nicolas Berthier 307f3d8418 Controllable-Nbac import&export now support relocation of alias types.
- Controllable-Nbac export (CtrlNbacGen): correct handling of float
  expressions, as well as alias types;

- Controllable-Nbac controller importer (CtrlNbacAsEpt): Declaration
  of enumerated types and aliases that are relocated to controller
  modules is now performed based on the interface.  Dependencies
  between type aliases are also taken into account now;

- ctrl2ept tool: correct loading of pervasives module.
10 years ago
Nicolas Berthier cbcf8b9ac0 Using unqualified names for string representation of constructors in C backend.
+ minor modifications in various places.
10 years ago
Nicolas Berthier 39aa0e13c1 Ugly fix for handling enumerated types when exporting to Controllable-Nbac.
To avoid cyclic module dependencies (that show up when trying to
compile, e.g, the generated C code), enumerated types declared in the
main program are now "moved" into the module containing the generated
controllers.
10 years ago
Nicolas Berthier be21bf31d8 Insertion of call to controller(s) when exporting to Controllable-Nbac node.
To enable recovery of parameter and output ordering by `ctrl2ept', the
Controllable-Nbac generation procedure now declares a new module
dedicated to the encapsulation of the controller functions yet to be
synthesized.

Handling of type declarations are probably buggy.
10 years ago
Nicolas Berthier d84ae09cab Bug fix (preprocessor variable). 10 years ago
Nicolas Berthier bc17d71e3f New tool `ctrl2ept' for translating ReaX's output functions into Heptagon
Compilation of the tool is dependent on the presence of the
`reatk.ctrlNbac' library.
10 years ago
Nicolas Berthier 541dd83fca Optional compilation of Controllable-Nbac-related modules and tools. 10 years ago
Nicolas Berthier 9a29c6fa4b Upgrading to new ReaTK API (>= 0.9.4). 10 years ago
Nicolas Berthier 99ab12aa13 Fixed warnings. 10 years ago
Nicolas Berthier 850e8522dd Merge branch 'decade' into ctrl-n 10 years ago
Gwenaël Delaval 478e621ac5 Handling of contracts in Mls2obc
Handling of contracts when the "z3z" target is off. Equations of contracts are
put into the node in the Mls2obc pass (done by the "z3z" code generation).
10 years ago
Nicolas Berthier 216550c0d1 Fixed warnings & documentation comments.
- gitignore: ignore files generated by `configure' script.
11 years ago
Nicolas Berthier 10bdab4dc6 Exclusively use ocamlfind; source documentation generation.
- Stripped portions of `myocamlbuild{,_config}.ml' that seem useless
  when `-use-ocamlfind' is passed to ocamlbuild.

- Added some code in `myocamlbuild_config.ml' to be able to generate
  documentation by merging interface and implementation files.
11 years ago
Nicolas Berthier 8aeab651ce First draft for Controllable-Nbac format generation.
- CtrlNbac: new module for internal representation and output code for
  Controllable-Nbac format;

- CtrlNbacGen: translation into Controllable-Nbac of Minils nodes
  necessitating controller synthesis; the insertion of calls to
  controllers is not yet done, and the nodes are left unchanged.
11 years ago
Gwenal Delaval 13d616c930 Scrollbars on inputs/outputs of hepts
Allowed shrinking hepts main window and added scrollbars on frames
for inputs and outputs.
11 years ago
Gwenal Delaval cd01f82cf6 Graphical simulator: output to GTKWave and TikZ
Added option -gtkwave, output in VCD (Value Change Dump) format

Button for TikZ (tikz-timing) export.
11 years ago
Gwenal Delaval ce2e2bdcd0 Added -nbvars option for performance evaluation 12 years ago
Gwenaël Delaval ef536f412d Added option -nosink (CS optimisation)
The -nosink option suppress the sink state of sigali equations.

This optimizes the controller synthesis, but work only
when the synthesis objective instantaneoulsy depends only
on the current state (and not on current inputs).
12 years ago
Gwenaël Delaval 3e8af67e07 Added Java 1.4 target (experimental)
Experimental : remains some bugs on arrays
12 years ago
Gwenal Delaval 41fccc66fb Bugs corrections
- callgraph: add idents used for instantiated nodes
- cgen : added Idents.enter_node
- cmain : removed error when simulated node does not exist (existence
of simulated node was tested for every program, comprising loaded ones)
12 years ago
Gwenaël Delaval ccc07cc7b9 Unalias missing in obc translation 12 years ago
Gwenaël Delaval ef00823cf7 Added Marc as co-author 12 years ago
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.
12 years ago
Cédric Pasteur 8815a2cd03 Better handling of clocks in memalloc
- We can do a better allocation if we take into
account 'when' in extvalues 
(test/good/memalloc_clocks.ept shows the
improvement)
- Fixed a bug with memalloc on records: if we 
translate:
o = { a with .f = u }
to
o = a; o.f = u
then we cannot share u and o.f
12 years ago
Cédric Pasteur ee7d60120b Fixed bug in translation to minils 12 years ago
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).
12 years ago
Gwenal Delaval bb0bc8bfe5 Added local assume/guarantee
Added local assume/guarantee in contracts.

No syntax associated to these local asume/guarantee: internal use only.
12 years ago
Adrien Guatto e05f3732a0 Timing framework. 12 years ago
Adrien Guatto f09792485e Hept2mls: fixed missing enter_node 12 years ago
Léonard Gérard 8a78bc7d7d Add [external] in the signatures. fix callgraph acordingly. 12 years ago
Adrien Guatto 76ae2f4518 Loop unrolling. 12 years ago
Cédric Pasteur 2f993a602c Fixed base clock in code generation
Put the base clock inside the equation where it 
belongs.
13 years ago
Adrien Guatto cad8a0149f Option to perform type inference on all types 13 years ago
Léonard Gérard f0cbbccc2a unsafe in minils node 13 years ago
Cédric Pasteur 54cde301f6 C code generation for printf 13 years ago