Commit Graph

81 Commits

Author SHA1 Message Date
Sylvain
212ea87ccd external python printer: fix parenthesis 2019-09-25 17:29:43 +02:00
Sylvain
cb1e8f28c6 external python printer/parser: div -> // and mod -> % 2019-09-25 17:23:49 +02:00
Sylvain
d47ea7b5b0 external_printer: protect priority and fix indentation 2019-09-25 16:32:30 +02:00
Sylvain
1259ec07c8 external printer/parser: task printer/parser depends of the language
An external printer/argument parser can now be registered. This changes
args_wrapper and Trans so that transformation now takes the Env.fformat
representing the language as argument.
Function lang of session_itp now uses file_format.
2019-09-25 16:32:30 +02:00
Sylvain
ea286888a6 External printer/parser: proof of concept on python plugin 2019-09-25 16:31:23 +02:00
Rehan MALAK
443cdcd136 adapt microc and python plugin to Ptree constructors (3d86e1c5f) 2019-07-26 13:26:59 +02:00
MARCHE Claude
f9228fac35 Merge branch 'ptree_typing_mlw_file' into 'master'
extends Ptree/Typing API to the entire mlw file

See merge request why3/why3!199
2019-07-26 12:42:01 +02:00
Jean-Christophe Filliatre
42c2e450b9 Python/micro-C: at/old/labels now supported
makes use of auto-dereference
2019-07-06 14:54:56 +02:00
Jean-Christophe Filliatre
5fceac32db micro-C
functions/predicates possibly with a definition
alternate syntax for but contracts/loop spec before or after curly braces
2019-07-06 13:39:38 +02:00
Jean-Christophe Filliatre
c8a111a2ec Python/micro-C: at/old/labels not yet supported 2019-07-06 12:41:28 +02:00
Jean-Christophe Filliatre
334aa9bc83 python: fixed call to a function with no argument 2019-07-06 12:09:08 +02:00
Rehan MALAK
3d86e1c5f9 extends Ptree/Typing API to the entire mlw file 2019-06-27 16:08:48 +02:00
Claude Marche
4ff8a6ac7b document + add sanitization on Ident.string_unique 2019-04-12 09:35:10 +02:00
Guillaume Melquiond
d3d7c7ac09 Rework numerical constants.
Main changes are:
- Real constants now offer a normalized representation usable for internal
  computations.
- Constants are no longer stored in textual form.
2019-02-18 16:55:08 +01:00
Guillaume Melquiond
abf9c043cf Update headers. 2019-02-11 15:35:11 +01:00
Raphael Rieu-Helft
17ed127006 Add support for partial functions
Program functions can be declared as partial with "let/val partial".
Similarly to "diverges", partial code cannot be ghost, however it does not need to be
explicitly specified as partial.

Fixes #184.
2018-09-28 10:31:26 +02:00
Guillaume Melquiond
b43e3c1d3a Remove dead code. 2018-09-14 11:18:04 +02:00
Andrei Paskevich
295cacf443 Ident: disambiguated symbolic notation
It is possible to append an arbitary number of quote symbols
at the end of an prefix/infix/mixfix operator:

            applied form      standalone form

              -' 42               (-'_)
              x +' y              (+')
              a[0]' <- 1          ([]'<-)

Pretty-printing will use the quote symbols for disambiguation.

The derived symbols can be produced by Why3 by appending
a suffix of the form "_toto" or "'toto". These symbols can
be parsed/printed as "(+)_toto" or "(+)'toto", respectively.
2018-07-17 23:53:22 +02:00
Andrei Paskevich
0fea401c50 confine all notation handling inside Ident
This commit removes all hard-coded "infix ..", "prefix ..",
and "mixfix .." from the rest of the code, and handles the
symbolic notation entirely inside Ident. It does not change
the notation itself.
2018-07-07 16:20:06 +02:00
Andrei Paskevich
35c1b010d7 WhyML: allow "ghost" over arbitrary subpatterns
This lets us write "let ghost (x, y) = 0, 0"
instead of "let ghost x, ghost y = 0, 0".
2018-06-18 17:29:12 +02:00
Andrei Paskevich
b0cef7e3f2 s/label/attribute/g 2018-06-01 21:03:01 +02:00
Guillaume Melquiond
4acc6d275d Merge branch 'new_ide' 2018-05-17 15:10:25 +02:00
Guillaume Melquiond
a9741e53d7 Merge branch 'next' into new_ide 2018-05-17 14:23:58 +02:00
Guillaume Melquiond
6563fac9cb Rename Stdlib into Wstdlib (fix issue #105).
OCaml 4.07 introduces a new standard module named Stdlib, which clashes
with the one from Why3 (during the compilation of Why3).
2018-05-17 11:26:04 +02:00
Andrei Paskevich
1f1f8b2cc6 Mlw: merge Ecase and Etry into a single match-with-exn constructor 2018-03-20 23:09:06 +01:00