Commit Graph

222 Commits

Author SHA1 Message Date
Tom Jack
66d2cda107 Mini_c: Inlining optimization 2019-11-27 09:06:31 -06:00
Tom Jack
f7ef0472be Add command for measuring contracts 2019-11-25 17:36:22 -06:00
Tom Jack
dbb36e6fdc Use runtest to run tests 2019-11-21 12:28:38 -06:00
Tom Jack
81c49f4342 Fix/simplify big_maps using Babylon 2019-11-21 08:18:18 -06:00
Lesenechal Remi
f27f8c10d1 For collection loop: also capture variable in logical blocks
Also, the iterated element/s are appended tot he list of local declaration
2019-11-21 11:28:32 +01:00
Lesenechal Remi
725176a59d allow to pack message (aka lambda of type unit -> operation list) 2019-11-19 23:27:43 +01:00
Lesenechal Remi
f7d6a5ea58 allow to catch failwith's in our tests 2019-11-19 15:38:23 +01:00
galfour
ddc4b7b7a5 add anon functions; remove pre-block declarations; update tests 2019-11-18 16:10:48 +01:00
Christian Rinderknecht
759978393a Merge branch 'rinderknecht-dev' into 'dev'
Refactoring of PascaLIGO's front-end

See merge request ligolang/ligo!176
2019-11-06 17:17:02 +00:00
Christian Rinderknecht
fe90246e3a Fixed the printing of some AST nodes. 2019-11-06 17:23:49 +01:00
Christian Rinderknecht
70a9afcce2 Merge branch 'rinderknecht-dev' into 'dev'
Refactoring of Ligodity (CameLIGO) and making an AST pretty-printer

See merge request ligolang/ligo!172
2019-11-06 12:18:54 +00:00
Christian Rinderknecht
351025b52d Refactoring of Ligodity (CameLIGO) and making an AST pretty-printer
- AST.ml/AST.mli:
  - The AST now distinguishes the constructors `None` and `Some` as being
    predefined, as in PascaLIGO. See type `AST.constr_pattern`.
  - I removed the nodes specific to Liquidity,
    e.g. `let%entry`, and, in particular, the natural literals
    ending with `p`. Now it should be `n`, as in `10n`.
  - I renamed the node `TAlias` to `TVar`.
  - I have applied the rule of expanding type expressions after `of` when
    those were not records.
  - The type of the argument to a data constructor is now
    `type_expr`, instead of `cartesian`.
  - I added the patterns for bytes (`PBytes`) and natural literals (`PNat`).
  - I renamed the node `Sugar` into
    `PListComp` (meaning "pattern of list comprehension").
  - Record types in CameLIGO now must have at least one field declaration.
  - Replaced the type `closing` and `opening` with one type `compound`,
    which captures only the right combinations of opening and closing.
  - Components of tuples in a selection must not be written
    between parentheses. For example, `a.b.(1).(0)` is now
    `a.b.1.0`, as in PascaLIGO.
- LexToken.mli/LexToken.mll
  - I renamed the string literal `Str` into `String`.
  - I added the tokens `C_None` and `C_Some` (to distinguish the
    constructors `None` and `Some`. See AST.ml)
  - Fixed the function `mk_sym` so it does not fail with `failwith`, but
    with `Error Invalid_symbol`.
- Lexer.mll (shared)
  - I removed the character `%` from the identifiers (used to
    support Liquidity, like `entry%point` and `match%nat`).
  - I adde to the hint on broken strings: "or insert a backslash"
    (from a Gitlab issue).
- ParToken.mly
  - I added the tokens `C_None` and `C_Some` (to distinguish the
    constructors `None` and `Some`. See AST.ml and LexToken.mll)
- Parser.mly
  - Fixed the order of declarations in the AST (it was reversed).
  - I removed syntax support for Liquidity.
  - I added user-defined constructor applications to irrefutable
    patterns (the ones afer a `let`), even though only the type
    checker can decide that they are truly irrefutable because they
    are the only constructors of their types.
  - I added natural numbers and bytes to patterns.
  - Access of tuple components do not require parentheses now, like
    `a.b.1.0`.
  - I refactored the semantic actions.
  - I added the empty sequence `begin end`.
- ParserLog.ml/ParserLog.mli
  - I added a pretty-printer for the AST (with source locations).
- ParserMain.ml
  - The CLI for the pretty-printer is now `--verbose=ast`.
  - The old CLI `--verbose=ast` is now `--verbose=ast-tokens`.
- ligodity.ml (simplifier)
  - I removed the constructions of sets, lists and maps with
    `Set [...]`, `List [...]` and `Map [...]`, as there are already
    better ways (that is, more like the OCaml's way), like
    `Set.literal [...]` and `Map.literal [...]`. (The case for lists
    was entirely redundant with the rest of the language as it is.)
  - Everywhere there is now a non-empty list of elements, I made a
    change. In particular, I removed a corner case ("let without
    binding"), thanks to more precise OCaml types for non-empty
    lists.
  - I ported all the changes to the AST above.
- region.ml (vendors)
  - I changed the method `compact` so the end-line is not repeated
    if it is the same as the start line: this is even more compact. I
    use this in the new pretty-printer for the AST (see above)
- I updated all the CameLIGO contracts.
2019-11-04 23:51:47 +01:00
galfour
9fe5d821c3 Merge branch 'dev' into clean-sts-solver 2019-11-04 16:32:32 +01:00
Tom Jack
ba7a83d0f7 Deal with upstream MBytes changes 2019-11-02 17:54:33 -05:00
Tom Jack
b06f4d3f62 Delete protocol tests 2019-11-02 17:54:21 -05:00
Tom Jack
f739624185 Prepare for tezos upgrade 2019-11-02 17:38:39 -05:00
Suzanne Dupéron
1e06c24325 Merge branch 'dev' of gitlab.com:ligolang/ligo into clean-sts-solver 2019-10-31 17:18:09 -04:00
Tom Jack
58638c6a05 Merge branch 'feature/hex' into 'dev'
Add hex michelson output, use enums for format options

See merge request ligolang/ligo!162
2019-10-31 15:39:03 +00:00
Suzanne Dupéron
735bd8e668 Implementing subst over the AST 2019-10-29 01:55:53 -04:00
Suzanne Dupéron
dcf5a975d4 More of subst 2019-10-28 01:10:26 -04:00
Tom Jack
6956e8751d Add hex michelson output, use enums for format options 2019-10-26 12:57:22 -05:00
Tom Jack
dae4f58297 Combine adjacent DROP 2019-10-24 23:58:21 -05:00
galfour
27be6cfcba use apply for closures 2019-10-17 16:34:02 +02:00
galfour
8a4b9695e7 use dig/dug for get/set 2019-10-17 15:48:24 +02:00
galfour
56269231b3 upgrade to babylon 2019-10-17 11:45:27 +02:00
Suzanne Dupéron
5a58559edc Merge remote-tracking branch 'origin/dev' into HEAD 2019-10-11 16:59:45 -04:00
Tom Jack
047065f8ee Delete vestigial local repo stuff 2019-10-11 15:12:07 +00:00
Suzanne Dupéron
4fa54dd2c1 More progress on merging new typer and new dev 2019-10-10 01:23:55 -04:00
Christian Rinderknecht
bcf73d01bf Printing of tokens from the AST is now done in a Buffer.t 2019-10-09 16:07:13 +02:00
Pierre-Emmanuel Wulfman
59cb210b83 Interface for Ocaml code 2019-10-07 14:18:32 +00:00
Lesenechal Remi
4e333836cb ignore closure error in subexpression of argument 2019-10-03 15:36:06 +02:00
Lesenechal Remi
a7565145d5 add map_expression function in self_mini_c pass helpers 2019-10-02 18:31:15 +02:00
Georges Dupéron
2b5b23f266 WIP: fixing the build errors + missing non-merged code 2019-09-29 18:25:02 -04:00
Pierre-Emmanuel Wulfman
f657c71753 Merge done and repo build with no error 2019-09-27 14:55:09 +02:00
Tom Jack
09496ce4ca Generate field annotations for sum/record 2019-09-26 11:39:35 -05:00
Tom Jack
a521c01115 some michelson optimizations 2019-09-25 20:15:19 -05:00
galfour
720ef99c69 solve conflict 2019-09-22 22:17:28 +02:00
galfour
ad79188c4f add list pattern matching 2019-09-21 09:12:00 +02:00
Lesenechal Remi
25e3ab8e5d big map can be looked up 2019-09-20 21:33:14 +02:00
galfour
66efff631d add micheline 2019-09-20 18:56:55 +02:00
galfour
9a7c3ee54d Merge branch 'dev' into refactor/everything 2019-09-20 17:51:43 +02:00
galfour
015e197183 back on track 2019-09-19 01:34:37 +02:00
galfour
b619fa1f17 further down the road 2019-09-18 18:49:33 +02:00
Tom Jack
c867a4c4d4 Remove dune-project files 2019-09-09 13:59:08 -07:00
Tom Jack
e0b5910627 Try to fix CI again 2019-09-08 12:37:11 -07:00
galfour
cb1aa44ff4 moving stuff around 2019-09-08 12:17:24 +02:00
galfour
25b07af6ae merge dev conflict 2019-09-07 16:54:08 +02:00
galfour
f831793fbd y e s s s 2019-09-05 15:21:01 +02:00
galfour
32599ae90b removing tezos-modded 2019-09-04 20:19:09 +02:00
galfour
af588933f4 add closures 2019-08-21 10:28:27 +02:00