1. 19 Oct, 2013 1 commit
    • Andrei Paskevich's avatar
      switch Typing to the new Dterm-based API · 460e93f8
      Andrei Paskevich authored
      - Make [Highord.pred 'a] an alias for [Highord.func 'a bool],
      rename [Highorg.(@!)] to [(@)], remove [Highorg.(@?)], remove
      the quantifiers [\!] and [\?] and only leave [\] which is the
      only true lambda now;
      - Allow mixing bool and Prop in logic, Dterm will introduce
      coercions where necessary (trying to minimize the number of
      if-then-else in the term context).
  2. 13 Mar, 2013 1 commit
  3. 06 Mar, 2013 1 commit
  4. 03 Mar, 2013 1 commit
    • Andrei Paskevich's avatar
      track dangerous applications of equality · bb6734a1
      Andrei Paskevich authored
      In programs, but also in pure theories, it is not safe to compare
      arbitrary types. For example, if we have a record with ghost fields,
      a comparison may produce different results before and after ghost
      code elimination. Even for pure types like 'map' or 'set', it is
      unlikely that the result of logical equality will be the same as
      the result of OCaml structural equality on the implemented type.
      This commit makes the first step towards fixing this issue.
      We proceed in the following way:
      1. Every lsymbol (pure function or predicate symbol) carries
         a subset of type variables of its signature, called "opaque
         type variables". By marking a type variable 'a opaque in an
         lsymbol's signature, the user guarantees that this lsymbol
         can be implemented without ever comparing values of type 'a.
         In other words, this is a promise not to break into a type
         The corresponding syntax is: "predicate safe (x y : ~'a)".
         All type variables in undefined symbols are non-opaque,
         unless annotated otherwise. Non-opaque is the default
         to keep the change conservative.
         Opacity of type variables in defined symbols is inferred
         from the definition. If the definition violates a given
         opacity annotation, an exception is raised. Notice that
         we only check definitions in _theory_ declarations. One
         can define an lsymbol in a _task_ in a way that violates
         opacity. We cannot forbid it, because various elimination
         transformations would replace safe operations (such as
         matching) with equalities. This is not a problem, since in
         the pure logical realm of provers opacity is not required
         One exception would be Coq, whose transformation chain must
         never perform such operations.
         All type variables in inductive predicates are non-opaque.
         Indeed, we can redefine equality via an inductive predicate.
         [TODO: find safe forms of inductive definitions and implement
         more reasonable restrictions.]
         All type variables in constructors and field symbols are opaque.
         It is forbidden to instantiate an opacity-preserving symbol
         with an opacity-breaking one in a clone substitution.
      2. Similar type variable tracking is implemented for program symbols.
         Type variables in the signature of a "val" are non-opaque unless
         annotated otherwise. Opacity of type variables in defined symbols
         is inferred from the definition, and an exception is raised, if
         a given annotation is violated.
         The internal mechanism of tracking is different: the "eff_compar"
         field in effects contains the type variables that occur under
         equality or any other opacity-breaking operation. In this respect,
         our API is inconsistent between lsymbols and psymbols: the former
         asks for the opaque tvsymbols, the latter requires us to fill the
         spec with "comparison effects" for the non-opaque ones. [TODO:
         add the "~opaque" argument to create_psymbol and make the WhyML
         core fill the effect under the hood.]
         Every time an lsymbol or a psymbol is applied in a program,
         we check the substitution into its signature's type variables.
         If a non-opaque type variable is instantiated with a program type,
         an exception is raised. [TODO: be more precise and reject only
         types with ghost and model components - being mutable, private,
         or carrying an invariant doesn't conflict with equality.]
         Notice that we do not allow to compare program types even in
         the ghost code. This is not needed if we only consider the
         problems of the code extraction, but _might_ be necessary,
         if we also want to protect Coq realisations (see below).
      This commit fixes the immediate problem of breaking the ghost
      guarantees when equality or some other opacity-breaking lsymbol
      is applied in a program to a type with ghost or "model" parts.
      This leaves the problem of code extraction for programs that
      compare complex types such as maps or sets (Coq driver is
      affected by this, too, I guess). The next step is to provide
      annotations for problematic type constructors. A declaration
      "type ~map 'a 'b" would mean "logical equality on this type
      is likely to be different from the structural equality on any
      implementation of this type - therefore do not apply equality
      to it: neither in programs (because this can't be implemented),
      nor in pure functions (because they are extracted, too, and
      because this can't be realized with Leibniz equality in Coq)."
      [TODO: discuss and implement.]
      [TODO: mb choose better term for "opaque" and notation for ~'a.]
  5. 13 Feb, 2013 1 commit
  6. 07 Nov, 2012 1 commit
  7. 06 Nov, 2012 1 commit
  8. 04 Nov, 2012 1 commit
  9. 21 Oct, 2012 1 commit
  10. 20 Oct, 2012 1 commit
    • Andrei Paskevich's avatar
      simplify copyright headers · 11598d2b
      Andrei Paskevich authored
      + create AUTHORS file
      + fix the linking exception in LICENSE
      + update the "About" in IDE
      + remove the trailing whitespace
      + inflate my scores at Ohloh
  11. 12 Oct, 2012 1 commit
  12. 11 Sep, 2012 1 commit
  13. 04 Aug, 2012 1 commit
  14. 03 Aug, 2012 1 commit
    • François Bobot's avatar
      Documentation: add description to all the registration functions · 29201f7c
      François Bobot authored
       (metas, debug flags, transformations, formats) except for label.
      This description is used in --list-*. The description can use any of
      the formatting markup of Format "@ " "@[",...
      Transformations can also specify from which metas and labels they
      depend, and add informations about how they are interpreted.
        - complete and correct the documentation
        - when a transformation use Trans.on_meta, it should be possible to
          add an interpretation of the metas in the documentation.
        - recover a summary version of --list-* ?
        - be able to export in latex?
  15. 19 Jul, 2012 1 commit
  16. 22 May, 2012 1 commit
  17. 09 Apr, 2012 1 commit
  18. 11 Mar, 2012 1 commit
  19. 24 Feb, 2012 1 commit
  20. 19 Feb, 2012 1 commit
  21. 06 Feb, 2012 1 commit
  22. 13 Nov, 2011 1 commit
  23. 25 Oct, 2011 1 commit
  24. 28 Sep, 2011 1 commit
  25. 13 Jul, 2011 1 commit
    • Guillaume Melquiond's avatar
      Add support for generic printing of integers and reals. · 1ba8f1a6
      Guillaume Melquiond authored
      Prover capabilities are now represented by a record enumerating each case and which syntax to use then.
      This fixes output of nondecimal integers to provers (bug #12981).
      TODO: check whether some provers support more than just decimal representations.
  26. 05 Jul, 2011 1 commit
  27. 01 Jul, 2011 1 commit
  28. 30 Jun, 2011 1 commit
  29. 29 Jun, 2011 1 commit
    • Andrei Paskevich's avatar
      several changes in syntax · aa2c430e
      Andrei Paskevich authored
      - No more "and", "or", "implies", "iff", and "~".
        Use "/\", "\/", "->", "<->", and "not" instead.
      - No more "logic". Use "function" or "predicate".
  30. 12 Jun, 2011 1 commit
  31. 11 Jun, 2011 1 commit
    • Andrei Paskevich's avatar
      a little refactoring in Env · b8dcebfc
      Andrei Paskevich authored
      - create_env_of_loadpath is now provided in Env instead of Lexer
      - find_channel functions now depend on format to determine the
        suitable extensions
  32. 24 May, 2011 1 commit
  33. 09 May, 2011 1 commit
  34. 18 Apr, 2011 1 commit
  35. 17 Mar, 2011 1 commit
  36. 05 Mar, 2011 1 commit
    • Andrei Paskevich's avatar
      store locations in term/formulas, not in labels · f530689a
      Andrei Paskevich authored
      - the new syntax for localisation "labels" in Why is as follows:
          goal Toto #"file" line bchar echar#     - after an ident
          #"file" line bchar echar" (A and B)     - before a term/fmla
      - the new syntax for buffer relocation is as follows:
          ##"file" line char##
  37. 04 Mar, 2011 1 commit
  38. 21 Feb, 2011 1 commit
  39. 25 Jan, 2011 1 commit
  40. 23 Jan, 2011 1 commit