1. 23 Aug, 2011 2 commits
    • Guillaume Melquiond's avatar
    • Guillaume Melquiond's avatar
      Add a new transformation that instantiates the axioms marked with the · 4d7dd217
      Guillaume Melquiond authored
      meta "instantiate : auto" on as many terms as possible.
      
      The transformation is rather naive, since it doesn't look for term
      candidates under quantifiers, if-then-else, let-in, and so on. So it can
      only appear late in the transformation pipe.
      
      It is only enabled for Gappa and its target axioms are the ones that state
      that any floating-point value is bounded. It was the last transformation
      from Why2 still missing in Why3.
      
      Thanks to this transformation, Gappa is now able to prove all the safety
      obligations from the following code, including the ones about division and
      downcast, which is definitely frightening.
      
      /*@ assigns \nothing;
        @ ensures \result == \abs(x);
        @*/
      extern double fabs(double x);
      
      /*@ requires \valid(AB_Ptr) && \valid(CD_Ptr);
        @ assigns *AB_Ptr, *CD_Ptr;
        @ ensures \abs(*AB_Ptr) <= 6.111111e-2;
        @ ensures \abs(*CD_Ptr) <= 6.111111e-2;
        @ */
      void limitValue(float *AB_Ptr, float *CD_Ptr)
      {
         double Fabs_AB, Fabs_CD;
         double max;
      
         Fabs_AB = fabs (*AB_Ptr);
         Fabs_CD = fabs (*CD_Ptr);
      
         max = Fabs_AB;
         if (Fabs_CD > Fabs_AB)  max = Fabs_CD;
      
         if ( max > 6.111111e-2)
         {
            *AB_Ptr = (float) (((*AB_Ptr) * 6.111111e-2) / max);
            *CD_Ptr = (float) (((*CD_Ptr) * 6.111111e-2) / max);
         }
      }
      4d7dd217
  2. 22 Aug, 2011 1 commit
    • Guillaume Melquiond's avatar
      Detect syntax errors in CVC3 files. · a4d0d0fe
      Guillaume Melquiond authored
      Note that CVC3 doesn't care about syntax errors and it will still answer
      valid at the end. Currently, CVC3 chokes on the following kind of
      declarations (Div_mult, Abs_real_pos, and so on).
      
        ASSERT
        (FORALL (x : INT, y : INT, z : INT):PATTERN (div(((x * y) + z), x)):
        (((0 < x) AND ((0 <= y) AND (0 <= z))) => (div(((x * y) + z), x) = (y +
        div(z, x)))));
      a4d0d0fe
  3. 26 Jul, 2011 1 commit
    • Jean-Christophe Filliâtre's avatar
      Coq output: recursive definitions · 59b180cb
      Jean-Christophe Filliâtre authored
      introduced new transformation eliminate_non_struct_recursion for that purpose
      uses Decl.check_termination tomake the check and the pretty-print
      (could probably be improved to avoid 3 calls to check_termination)
      59b180cb
  4. 06 Jul, 2011 1 commit
  5. 05 Jul, 2011 3 commits
  6. 29 Jun, 2011 1 commit
  7. 07 Jun, 2011 1 commit
  8. 05 Jun, 2011 2 commits
  9. 04 Jun, 2011 2 commits
  10. 03 Jun, 2011 1 commit
  11. 30 May, 2011 1 commit
  12. 27 May, 2011 1 commit
  13. 22 May, 2011 2 commits
  14. 20 May, 2011 1 commit
  15. 11 May, 2011 1 commit
  16. 03 May, 2011 2 commits
  17. 02 May, 2011 1 commit
  18. 29 Apr, 2011 1 commit
  19. 28 Apr, 2011 1 commit
  20. 21 Apr, 2011 4 commits
  21. 19 Apr, 2011 2 commits
  22. 12 Apr, 2011 7 commits
  23. 11 Apr, 2011 1 commit