1. 28 Sep, 2017 1 commit
  2. 28 Feb, 2017 1 commit
    • Clément Fumex's avatar
      Add the ability to · f0547868
      Clément Fumex authored
      * declare range types and float types,
      * use integer (resp. real) literals for those types through casting,
      * specify how to print them in drivers.
      
      Change in syntax
      * use
      
        type t = < range 1 2 >   (* integers from 1 to 2 *)
        type t' = < float 4 12 > (* float with 4 bits in exponent and 12 in mantissa *)
      
        the two projections :
        t'int
        t''real
      
        and the predicate :
        t''isFinite
      
      * Restrict the use of "'" in whyml:
        Users are not allowed to introduce names where a quote symbol
        is followed by a letter. Thus, the following identifiers are
        valid:
      
        t'
        toto'0''
        toto'_phi
      
        whereas toto'phi is not.
      
      Note: we do not yet support negative numbers in range declaration
      and casting of a literal.
      f0547868
  3. 08 Mar, 2016 2 commits
  4. 20 Aug, 2015 1 commit
    • Andrei Paskevich's avatar
      adapt the standard library · cb9aa0a2
      Andrei Paskevich authored
      except for modules/impset.mlw (because of Fset) and modules/mach/*
      (because of program cloning), the standard library now typechecks.
      
      This is still very much the work in progress. Many functions and
      predicates have still to be converted to "let function" and
      "let predicate". Here are some TODOs:
      - do not require the return type for "val predicate", "val lemma", etc.
      - do not require explicit variant for "let rec" if the code passes
        the termination check in Decl (see list.why)
      - what should become "val ghost function" and what should stay just
        "function" (see array.mlw, matrix.mlw, string.mlw, etc)?
      - some defined functions in algebra.why and relations.why had to be
        removed, so that they can be implemented with "let function" in
        int.mlw (since they are defined, they cannot be instantiated with
        let-functions). This seems too restrictive. One way out would be
        to authorise instantiation of defined functions (with a VC).
      - should we keep the keyword "model"? reuse of "abstract" in types
        breaks syntax coloring ("abstract" requires closing "end" in
        programs but not in types; maybe we can drop that "end" again?).
      cb9aa0a2
  5. 20 Jan, 2014 1 commit
    • Andrei Paskevich's avatar
      "eliminate_epsilon" added in drivers · 9c20cd7c
      Andrei Paskevich authored
      Currently, the builtin theory why3.HighOrd (or just HighOrd) must
      be explicitly "use"-d. However, the type (HighOrd.func 'a 'b) can
      be written ('a -> 'b), and the type (HighOrd.pred 'a) can be written
      ('a -> bool), and the application operation (HighOrd.(@)) can be
      written as the usual juxtaposition. Thus, normally, you do not have
      to write the qualifiers. The builtin theory why3.Bool (or just Bool)
      is needed for "bool". The names "HighOrd", "func", "pred", and "(@)"
      are not yet fixed and may change.
      
      "eliminate_epsilon" tries to be smart when a lambda (or some other
      comprehension form) occurs under equality or at the top of a definition.
      We could go even further and replace (\ x . t) s with t[x <- s], without
      lifting the lambda. I'm not sure it's worth it: we rarely write redexes
      manually. They can and will appear through inlining, though.
      
      Anyone who wants to construct epsilon-terms directly using the API
      should remember that these are not Hilbert's epsilons: by writing
      an epsilon term, you postulate the existence (though not necessarily
      uniqueness) of the described object, and "eliminate_epsilon" will
      happily convert it to an axiom expressing this existence. We only
      use epsilons to write comprehensions whose soundness is guaranteed
      by a background theory, e.g. lambda-calculus.
      9c20cd7c
  6. 02 Nov, 2013 1 commit
    • Andrei Paskevich's avatar
      implement printers as memoizing transformations · 9640fb2b
      Andrei Paskevich authored
      also, avoid the "encoding_sort" transformation, if it can be done
      directly in the printer.
      
      On the same example as in the previous commits, this gives 5x
      acceleration together with some memory usage reduction.
      9640fb2b
  7. 06 Aug, 2013 1 commit
  8. 17 Feb, 2013 2 commits
  9. 05 Feb, 2013 1 commit
  10. 01 Sep, 2012 1 commit
  11. 20 Jun, 2012 1 commit
  12. 17 Mar, 2012 1 commit
  13. 14 Feb, 2012 1 commit
  14. 14 Dec, 2011 1 commit
  15. 29 Jun, 2011 1 commit
  16. 03 Jun, 2011 1 commit
  17. 22 May, 2011 1 commit
  18. 29 Apr, 2011 1 commit
  19. 21 Apr, 2011 1 commit
  20. 16 Mar, 2011 1 commit
  21. 03 Feb, 2011 1 commit
  22. 21 Jan, 2011 1 commit
  23. 10 Jan, 2011 1 commit
  24. 17 Dec, 2010 1 commit
  25. 16 Dec, 2010 2 commits
  26. 15 Dec, 2010 1 commit
  27. 01 Dec, 2010 1 commit
  28. 24 Nov, 2010 1 commit
  29. 26 Oct, 2010 1 commit
  30. 23 Aug, 2010 1 commit
  31. 19 Aug, 2010 1 commit
  32. 16 Aug, 2010 1 commit
  33. 11 Aug, 2010 1 commit
  34. 12 Jul, 2010 1 commit
  35. 09 Jul, 2010 1 commit
  36. 15 Jun, 2010 2 commits