1. 13 Jun, 2017 3 commits
    • Andrei Paskevich's avatar
      WhyML: white-box blocks · 516cfd3a
      Andrei Paskevich authored
      Just as abstract blocks, "white-box blocks" are program expressions
      with an additional contract attached to their execution place.
      Contrary to abstract blocks, whiteboxes do not hide their contents
      from the outer computation. In most cases, you would not need
      whiteboxes at all, as the same effect can be achieved by adding
      assertions. Their utility comes from their syntax: the added
      contract clauses bind to the expression and do not require
      additional semicolons, begin-end's, let-in's or try-with's.
      
      Compare:
      
          let x = <expr> in assert { P x }; x
      to  <expr> ensures { P result }
      or  <expr> returns { x -> P x }
      
          if ... then begin let x = <expr> in assert { P x }; x end; ...
      to  if ... then <expr> ensures { P result }; ...
      
          try <expr> with E x -> assert { P x }; raise E x; end
      to  <expr> raises { E x -> P x }
      
      Internally, whiteboxes are just abstract blocks (zero-argument
      anonymous functions executed in-place) with the label "vc:white_box"
      on top. The user never needs to write this label explicitly though.
      516cfd3a
    • Andrei Paskevich's avatar
      Dexpr: relax alias restrictions on non-recursive functions · 8b67dbad
      Andrei Paskevich authored
      There is no reason why an abstract block cannot return an alias
      with some external variable or exception.
      8b67dbad
    • Andrei Paskevich's avatar
      Typing: minor · 65844aa6
      Andrei Paskevich authored
      65844aa6
  2. 11 Jun, 2017 4 commits
    • Andrei Paskevich's avatar
      WhyML: tuple terms/expressions do not require parentheses · a1e032f6
      Andrei Paskevich authored
      This makes the syntax cleaner and brings us closer to OCaml.
      
      One incompatibility with the previous grammar is that "ghost"
      binds stronger than the left arrow of assignment, and thus
      ghost assignments have to be written as "ghost (x.f <- v)".
      
      This is unavoidable, because assignment has to be weaker than
      the tuple comma (think "x.f, y.g <- y.g, x.f" or "a[i] <- u,v"),
      and "ghost" has to be stronger than comma, for consistency with
      our patterns and our return types.
      
      The "return" construction is weaker than comma, for "return a,b".
      It is also weaker than assignment, though "return x.f <- b" does
      not make much sense either way.
      
      This change does not concern type expressions, where a tuple
      type must always have its clothes^Wparentheses on: (int, int).
      It might be nice to write "constant pair: int, bool", but on
      the other hand this would break casts like "42: int, true".
      a1e032f6
    • MARCHE Claude's avatar
    • MARCHE Claude's avatar
      negative literals: fixed coq printer · 01989311
      MARCHE Claude authored
      01989311
    • Andrei Paskevich's avatar
      WhyML: match ... with exception ... end · 6aace661
      Andrei Paskevich authored
      6aace661
  3. 10 Jun, 2017 11 commits
  4. 09 Jun, 2017 6 commits
  5. 08 Jun, 2017 9 commits
  6. 07 Jun, 2017 3 commits
  7. 06 Jun, 2017 4 commits