-- or intermediate results are longer than the result type.
with Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
-use Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
generic
Contract_Cases => Ignore,
Ghost => Ignore);
- package Signed_Conversion is new Signed_Conversions (Int => Double_Int);
+ package BI_Ghost renames Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
+ subtype Big_Integer is BI_Ghost.Big_Integer with Ghost;
+ subtype Big_Natural is BI_Ghost.Big_Natural with Ghost;
+ use type BI_Ghost.Big_Integer;
+
+ package Signed_Conversion is
+ new BI_Ghost.Signed_Conversions (Int => Double_Int);
function Big (Arg : Double_Int) return Big_Integer is
(Signed_Conversion.To_Big_Integer (Arg))
with Ghost;
- package Unsigned_Conversion is new Unsigned_Conversions (Int => Double_Uns);
+ package Unsigned_Conversion is
+ new BI_Ghost.Unsigned_Conversions (Int => Double_Uns);
function Big (Arg : Double_Uns) return Big_Integer is
(Unsigned_Conversion.To_Big_Integer (Arg))
with Ghost;
function In_Double_Int_Range (Arg : Big_Integer) return Boolean is
- (In_Range (Arg, Big (Double_Int'First), Big (Double_Int'Last)))
+ (BI_Ghost.In_Range (Arg, Big (Double_Int'First), Big (Double_Int'Last)))
with Ghost;
function Add_With_Ovflo_Check (X, Y : Double_Int) return Double_Int
-- Signed integer exponentiation (checks off)
with Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
-use Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
generic
package System.Exponn
with Pure, SPARK_Mode
is
-
-- Preconditions in this unit are meant for analysis only, not for run-time
-- checking, so that the expected exceptions are raised. This is enforced
-- by setting the corresponding assertion policy to Ignore. Postconditions
Contract_Cases => Ignore,
Ghost => Ignore);
- package Signed_Conversion is new Signed_Conversions (Int => Int);
+ package BI_Ghost renames Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
+ subtype Big_Integer is BI_Ghost.Big_Integer with Ghost;
+ use type BI_Ghost.Big_Integer;
+
+ package Signed_Conversion is new BI_Ghost.Signed_Conversions (Int => Int);
function Big (Arg : Int) return Big_Integer is
(Signed_Conversion.To_Big_Integer (Arg))
with Ghost;
function In_Int_Range (Arg : Big_Integer) return Boolean is
- (In_Range (Arg, Big (Int'First), Big (Int'Last)))
+ (BI_Ghost.In_Range (Arg, Big (Int'First), Big (Int'Last)))
with Ghost;
function Expon (Left : Int; Right : Natural) return Int
-- Signed integer exponentiation (checks on)
with Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
-use Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
generic
package System.Expont
with Pure, SPARK_Mode
is
-
-- Preconditions in this unit are meant for analysis only, not for run-time
-- checking, so that the expected exceptions are raised. This is enforced
-- by setting the corresponding assertion policy to Ignore. Postconditions
Contract_Cases => Ignore,
Ghost => Ignore);
- package Signed_Conversion is new Signed_Conversions (Int => Int);
+ package BI_Ghost renames Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
+ subtype Big_Integer is BI_Ghost.Big_Integer with Ghost;
+ use type BI_Ghost.Big_Integer;
+
+ package Signed_Conversion is new BI_Ghost.Signed_Conversions (Int => Int);
function Big (Arg : Int) return Big_Integer is
(Signed_Conversion.To_Big_Integer (Arg))
with Ghost;
function In_Int_Range (Arg : Big_Integer) return Boolean is
- (In_Range (Arg, Big (Int'First), Big (Int'Last)))
+ (BI_Ghost.In_Range (Arg, Big (Int'First), Big (Int'Last)))
with Ghost;
function Expon (Left : Int; Right : Natural) return Int
-- type. The arguments Lo, Hi are the bounds of the type.
with Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
-use Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
generic
package System.Width_U
with Pure
is
- package Unsigned_Conversion is new Unsigned_Conversions (Int => Uns);
+ package BI_Ghost renames Ada.Numerics.Big_Numbers.Big_Integers_Ghost;
+ subtype Big_Integer is BI_Ghost.Big_Integer with Ghost;
+ subtype Big_Natural is BI_Ghost.Big_Natural with Ghost;
+ subtype Big_Positive is BI_Ghost.Big_Positive with Ghost;
+ use type BI_Ghost.Big_Integer;
+
+ package Unsigned_Conversion is
+ new BI_Ghost.Unsigned_Conversions (Int => Uns);
function Big (Arg : Uns) return Big_Integer renames
Unsigned_Conversion.To_Big_Integer;