]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Amend proof of System.Arith_Double to remove justifications
authorYannick Moy <moy@adacore.com>
Fri, 26 Nov 2021 07:55:13 +0000 (08:55 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Dec 2021 16:26:29 +0000 (16:26 +0000)
commitb3f89a4510031af1913f70aad9b3ba559d326fb0
treed92a4028c6fa802ffdf5b067e3cec24d6fe2331b
parentce79e7e24acdc83620782dae9b954b1ad2bdb988
[Ada] Amend proof of System.Arith_Double to remove justifications

gcc/ada/

* libgnat/s-aridou.adb (Log_Single_Size, Big_0): New ghost
constants.
(Lemma_Mult_Non_Negative, Lemma_Mult_Non_Positive,
Lemma_Not_In_Range_Big2xx64): New lemmas on big integers.
(Double_Divide): Remove justifications. Amend for that local
lemma Prove_Overflow_Case.
(Scaled_Divide): Remove justifications. Insert for that local
lemmas Prove_Negative_Dividend, Prove_Positive_Dividend and
Prove_Q_Too_Big, and amend local lemma Prove_Overflow.  To prove
the loop invariant on (Shift mod 2 = 0), introduce local ghost
variable Iter to count loop iterations, and relate its value to
the value of Shift through Log_Single_Size, with the help of
local lemma Prove_Power. Deal with proof regression by adding
new local lemma Prove_First_Iteration and local ghost variable
D123.
* libgnat/s-arit64.ads (Multiply_With_Ovflo_Check64): Remove
unnecessary Pure_Function on function as package is Pure.
gcc/ada/libgnat/s-aridou.adb
gcc/ada/libgnat/s-arit64.ads