1. 17 Feb, 2013 12 commits
  2. 15 Feb, 2013 4 commits
  3. 14 Feb, 2013 1 commit
  4. 13 Feb, 2013 6 commits
  5. 12 Feb, 2013 7 commits
  6. 11 Feb, 2013 1 commit
  7. 09 Feb, 2013 2 commits
    • Andrei Paskevich's avatar
      whyml: accept infix relation chains · 919d60bf
      Andrei Paskevich authored
      In a chain "e1 op1 e2 op2 e3 op3 e4", each relation symbol is either:
      - an infix symbol "=" or "<>", or
      - a binary symbol whose value type is Bool.bool or Prop (for lsymbols)
        and whose arguments' types are not Bool.bool.
      In other words, we interpret a chain as a conjunction only if there
      is no possibility(*) to interpret it as a superposition. The exception
      is only made for "=" and "<>", which are _always_ considered as
      chainable, even if they are redefined with some bogus type signatures.
      Notice that redefining "<>" has no effect whatsoever, since "<>" is
      always treated as negated "=".
      As for the evaluation order, the chain above would be equivalent to:
          let x2 = e2 in
          (e1 op1 x2) &&
              let x3 = e3 in
              (x2 op2 x3) &&
                  (x3 op3 e4)
      This is due to the fact that lazy conjunctions are evaluated from
      left to right, function arguments are evaluated from right to left,
      and no expression should be evaluated twice.
      [*] well, not really, since we consider symbols ('a -> 'b -> bool)
      as chainable, even though such chains could be interpreted as
      superpositions(**). We could treat such symbols as unchainable,
      but that would make equality and disequality doubly special cases,
      and I don't like it. We'll see if the current conditions are not
      [**] what also bothers me is dynamic types of locally defined
      infix symbols, which can be type variables or Bool.bool depending
      on the order of operations in Mlw_typing. Currently, I can't come
      up with any example of bad behaviour -- we are somewhat saved by
      not being able to write "let (==) = ... in ...").
    • MARCHE Claude's avatar
  8. 08 Feb, 2013 1 commit
  9. 07 Feb, 2013 6 commits