Lo := Succ (Expr_Type, UR_From_Uint (Ifirst - 1));
Lo_OK := True;
- elsif abs (Ifirst) < Max_Bound then
+ elsif abs Ifirst < Max_Bound then
Lo := UR_From_Uint (Ifirst) - Ureal_Half;
Lo_OK := (Ifirst > 0);
Hi := Pred (Expr_Type, UR_From_Uint (Ilast + 1));
Hi_OK := True;
- elsif abs (Ilast) < Max_Bound then
+ elsif abs Ilast < Max_Bound then
Hi := UR_From_Uint (Ilast) + Ureal_Half;
Hi_OK := (Ilast < 0);
else
-- do the corresponding optimizations later on when applying the checks.
if Mode in Minimized_Or_Eliminated then
- if not (Overflow_Checks_Suppressed (Etype (N)))
+ if not Overflow_Checks_Suppressed (Etype (N))
and then not (Is_Entity_Name (N)
and then Overflow_Checks_Suppressed (Entity (N)))
then
-- The RACW case is taken care of by Exp_Dist.Add_RACW_From_Any
pragma Assert
- (not (Is_Remote_Access_To_Class_Wide_Type (Typ)));
+ (not Is_Remote_Access_To_Class_Wide_Type (Typ));
Use_Opaque_Representation := False;
end if;
elsif Is_Decimal_Fixed_Point_Type (Rtyp) then
- if Esize (Rtyp) <= 32 and then abs (Scale_Value (Rtyp)) <= 9 then
+ if Esize (Rtyp) <= 32 and then abs Scale_Value (Rtyp) <= 9 then
Vid := RE_Value_Decimal32;
- elsif Esize (Rtyp) <= 64 and then abs (Scale_Value (Rtyp)) <= 18 then
+ elsif Esize (Rtyp) <= 64 and then abs Scale_Value (Rtyp) <= 18 then
Vid := RE_Value_Decimal64;
else
Vid := RE_Value_Decimal128;
if not Found
and then Present (Interfaces (Typ))
- and then not (Is_Empty_Elmt_List (Interfaces (Typ)))
+ and then not Is_Empty_Elmt_List (Interfaces (Typ))
then
-- Skip the tag associated with the primary table
-- Special-case for Time_First, whose absolute value is anomalous,
-- courtesy of two's complement.
- T_Val := (if T = Time_First then abs (Time_Last) else abs (T));
+ T_Val := (if T = Time_First then abs Time_Last else abs T);
-- Extract the integer part of T, truncating towards zero
while Source.Last >= Index_Type'First loop
pragma Assert
(Source.Last <= Index_Type'First
- or else not (Is_Less (SA (Source.Last),
- SA (Source.Last - 1))));
+ or else not Is_Less (SA (Source.Last),
+ SA (Source.Last - 1)));
if I < Index_Type'First then
declare
pragma Assert
(I <= Index_Type'First
- or else not (Is_Less (TA (I), TA (I - 1))));
+ or else not Is_Less (TA (I), TA (I - 1)));
declare
Src : Element_Access renames SA (Source.Last);
function To_Big_Real (Arg : Num) return Valid_Big_Real is
- A : constant Num'Base := abs (Arg);
+ A : constant Num'Base := abs Arg;
E : constant Integer := Num'Exponent (A);
F : constant Num'Base := Num'Fraction (A);
M : constant Natural := Num'Machine_Mantissa;
-- Local variables
- V : Big_Real := abs (Arg);
+ V : Big_Real := abs Arg;
E : Integer := 0;
L : Integer;
-- their operands could overflow. Given that all operations on NaNs
-- return false, the test can only be written thus.
- if not (abs (X) <= R'Last) then
+ if not (abs X <= R'Last) then
pragma Annotate
(CodePeer, Intentional,
"test always false", "test for infinity");
(Left.Im / Scale) * (Right.Im / Scale));
end if;
- if not (abs (Y) <= R'Last) then
+ if not (abs Y <= R'Last) then
pragma Annotate
(CodePeer, Intentional,
"test always false", "test for infinity");
exception
when Constraint_Error =>
pragma Assert (X.Re /= 0.0);
- return R (abs (X.Re))
+ return R (abs X.Re)
* Aux.Sqrt (1.0 + (R (X.Im) / R (X.Re)) ** 2);
end;
exception
when Constraint_Error =>
pragma Assert (X.Im /= 0.0);
- return R (abs (X.Im))
+ return R (abs X.Im)
* Aux.Sqrt (1.0 + (R (X.Re) / R (X.Im)) ** 2);
end;
if Re2 = 0.0 then
if X.Re = 0.0 then
- return abs (X.Im);
+ return abs X.Im;
elsif Im2 = 0.0 then
if X.Im = 0.0 then
- return abs (X.Re);
+ return abs X.Re;
else
- if abs (X.Re) > abs (X.Im) then
- return R (abs (X.Re))
+ if abs X.Re > abs X.Im then
+ return R (abs X.Re)
* Aux.Sqrt (1.0 + (R (X.Im) / R (X.Re)) ** 2);
else
- return R (abs (X.Im))
+ return R (abs X.Im)
* Aux.Sqrt (1.0 + (R (X.Re) / R (X.Im)) ** 2);
end if;
end if;
else
- return abs (X.Im);
+ return abs X.Im;
end if;
elsif Im2 = 0.0 then
- return abs (X.Re);
+ return abs X.Re;
-- In all other cases, the naive computation will do
return Sqrt (Left);
else
- A_Right := abs (Right);
+ A_Right := abs Right;
-- If exponent is larger than one, compute integer exponen-
-- tiation if possible, and evaluate fractional part with more
-- Return True iff A is symmetric, see RM G.3.1 (90).
function Is_Tiny (Value, Compared_To : Real) return Boolean is
- (abs Compared_To + 100.0 * abs (Value) = abs Compared_To);
+ (abs Compared_To + 100.0 * abs Value = abs Compared_To);
-- Return True iff the Value is much smaller in magnitude than the least
-- significant digit of Compared_To.
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Length (Source) - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Length (Source) - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Ada.Strings.Search.Match
- (Source, Pattern, Mapping, J)))),
+ then not Ada.Strings.Search.Match
+ (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Ada.Strings.Search.Match
- (Source, Pattern, Mapping, J)))),
+ then not Ada.Strings.Search.Match
+ (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Source'Last - Pattern'Length)
- then not (Ada.Strings.Search.Match
- (Source, Pattern, Mapping, J)))),
+ then not Ada.Strings.Search.Match
+ (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Source'Last - Pattern'Length)
- then not (Ada.Strings.Search.Match
- (Source, Pattern, Mapping, J)))),
+ then not Ada.Strings.Search.Match
+ (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
is
(if Test = Inside then
Is_In (Element, Set)
- else not (Is_In (Element, Set)));
+ else not Is_In (Element, Set));
-----------
-- Count --
if Pattern (K) /= Value (Mapping,
Source (Ind + (K - Pattern'First)))
then
- pragma Assert (not (Match (Source, Pattern, Mapping, Ind)));
+ pragma Assert (not Match (Source, Pattern, Mapping, Ind));
goto Cont;
end if;
pragma Annotate (GNATprove, False_Positive,
"call via access-to-subprogram",
"function Mapping must always terminate");
- pragma Assert (not (Match (Source, Pattern, Mapping, Ind)));
+ pragma Assert (not Match (Source, Pattern, Mapping, Ind));
goto Cont;
end if;
pragma Loop_Invariant
(for all K in Integer'Max (From, Source'First) .. J =>
- not (Belongs (Source (K), Set, Test)));
+ not Belongs (Source (K), Set, Test));
end loop;
-- Here if no token found
pragma Loop_Invariant
(for all K in Source'First .. J =>
- not (Belongs (Source (K), Set, Test)));
+ not Belongs (Source (K), Set, Test));
end loop;
-- Here if no token found
pragma Loop_Invariant
(for all J in Source'First .. Ind =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
end loop;
-- Mapped forward case
<<Cont1>>
pragma Loop_Invariant
(for all J in Source'First .. Ind =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
null;
end loop;
end if;
pragma Loop_Invariant
(for all J in Ind .. Source'Last - PL1 =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
end loop;
-- Mapped backward case
<<Cont2>>
pragma Loop_Invariant
(for all J in Ind .. Source'Last - PL1 =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
null;
end loop;
end if;
<<Cont1>>
pragma Loop_Invariant
(for all J in Source'First .. Ind =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
null;
end loop;
<<Cont2>>
pragma Loop_Invariant
(for all J in Ind .. Source'Last - PL1 =>
- not (Match (Source, Pattern, Mapping, J)));
+ not Match (Source, Pattern, Mapping, J));
null;
end loop;
end if;
pragma Loop_Invariant
(for all C of Source (Source'First .. J) =>
- not (Belongs (C, Set, Test)));
+ not Belongs (C, Set, Test));
end loop;
-- Backwards case
pragma Loop_Invariant
(for all C of Source (J .. Source'Last) =>
- not (Belongs (C, Set, Test)));
+ not Belongs (C, Set, Test));
end loop;
end if;
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Source'Last - Pattern'Length)
- then not (Match (Source, Pattern, Mapping, J)))),
+ then not Match (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Source'Last - Pattern'Length)
- then not (Match (Source, Pattern, Mapping, J)))),
+ then not Match (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Match (Source, Pattern, Mapping, J)))),
+ then not Match (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Match (Source, Pattern, Mapping, J)))),
+ then not Match (Source, Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Super_Index'Result - 1
else J - 1 in Super_Index'Result
.. Super_Length (Source) - Pattern'Length)
- then not (Search.Match
- (Super_To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (Super_To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Super_Index'Result - 1
else J - 1 in Super_Index'Result
.. Super_Length (Source) - Pattern'Length)
- then not (Search.Match
- (Super_To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (Super_To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Super_Index'Result - 1
else J - 1 in Super_Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (Super_To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (Super_To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Super_Index'Result - 1
else J - 1 in Super_Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (Super_To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (Super_To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Length (Source) - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J <= Index'Result - 1
else J - 1 in Index'Result
.. Length (Source) - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
then J in From .. Index'Result - 1
else J - 1 in Index'Result
.. From - Pattern'Length)
- then not (Search.Match
- (To_String (Source), Pattern, Mapping, J)))),
+ then not Search.Match
+ (To_String (Source), Pattern, Mapping, J))),
-- Otherwise, 0 is returned
begin
for K in Varray_Type'Range loop
D (K) := (if A (K) /= Component_Type'First
- then abs (A (K)) else Component_Type'First);
+ then abs A (K) else Component_Type'First);
end loop;
return D;
begin
for K in Varray_Type'Range loop
- D (K) := Saturate (abs (SI64 (A (K))));
+ D (K) := Saturate (abs SI64 (A (K)));
end loop;
return D;
begin
if Bits (VSCR, NJ_POS, NJ_POS) = 1
- and then abs (X) < 2.0 ** (-126)
+ and then abs X < 2.0 ** (-126)
then
D := (if X < 0.0 then -0.0 else +0.0);
else
begin
for J in Varray_float'Range loop
- D (J) := abs (VA.Values (J));
+ D (J) := abs VA.Values (J);
end loop;
return To_Vector ((Values => D));
function S (Num : Integer) return String is
Buf : String (1 .. 30);
Ptr : Natural := Buf'Last + 1;
- Val : Natural := abs (Num);
+ Val : Natural := abs Num;
begin
loop
function V (Num : Integer) return VString is
Buf : String (1 .. 30);
Ptr : Natural := Buf'Last + 1;
- Val : Natural := abs (Num);
+ Val : Natural := abs Num;
begin
loop
(if X = Double_Int'First
then Double_Uns'(2 ** (Double_Size - 1))
else Double_Uns (Double_Int'(abs X)))
- with Post => abs (Big (X)) = Big ("abs"'Result),
+ with Post => abs Big (X) = Big ("abs"'Result),
Annotate => (GNATprove, Hide_Info, "Expression_Function_Body");
-- Convert absolute value of X to unsigned. Note that we can't just use
-- the expression of the Else since it overflows for X = Double_Int'First.
procedure Lemma_Abs_Commutation (X : Double_Int)
with
Ghost,
- Post => abs (Big (X)) = Big (Double_Uns'(abs X));
+ Post => abs Big (X) = Big (Double_Uns'(abs X));
procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer)
with
with
Ghost,
Pre => In_Double_Int_Range (X),
- Post => abs (X) <= Big_2xxDouble_Minus_1
- and then In_Double_Int_Range (-abs (X));
+ Post => abs X <= Big_2xxDouble_Minus_1
+ and then In_Double_Int_Range (-abs X);
procedure Lemma_Abs_Rem_Commutation (X, Y : Big_Integer)
with
+ Big (Double_Uns (Lo (T1))));
pragma Assert (Mult <= Big_2xxDouble_Minus_1);
Lemma_Mult_Commutation (X, Y);
- pragma Assert (Mult = abs (Big (X * Y)));
+ pragma Assert (Mult = abs Big (X * Y));
Lemma_Word_Commutation (Lo (T2));
pragma Assert (Mult = Big (Double_Uns'(2 ** Single_Size)
* Double_Uns (Lo (T2)))
procedure Lemma_Abs_Commutation (X : Int32)
with
Ghost,
- Post => abs (Big (X)) = Big (Uns32'(abs X));
+ Post => abs Big (X) = Big (Uns32'(abs X));
procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer)
with
-- Convert a double to a single real
function Quick_Two_Sum (A, B : Num) return Double_T
- with Pre => A = 0.0 or else abs (A) >= abs (B);
+ with Pre => A = 0.0 or else abs A >= abs B;
-- Compute A + B and its rounding error exactly, but assume |A| >= |B|
function Two_Sum (A, B : Num) return Double_T;
(Y.Len <= 1 or else (Y.Len = 2 and then Y.D (1) < 2**31))
then
declare
- A : constant LLI := abs (From_Bignum (X));
- B : constant LLI := abs (From_Bignum (Y));
+ A : constant LLI := abs From_Bignum (X);
+ B : constant LLI := abs From_Bignum (Y);
begin
if not Discard_Quotient then
Quotient := To_Bignum (A / B);
Digs (1) := (if Is_Negative (V) then '-' else ' ');
Ndigs := 1;
- X := Double_Real.To_Double (abs (V));
+ X := Double_Real.To_Double (abs V);
-- If X is zero, we are done
-- Compute Sign
Is_Positive := (0.0 <= Item);
- F := abs (Item);
+ F := abs Item;
-- Signed zero
-- Compute Sign
Is_Positive := (0.0 <= Item);
- F := abs (Item);
+ F := abs Item;
-- Signed zero
-- Compute Sign
Is_Positive := (0.0 <= Item);
- F := abs (Item);
+ F := abs Item;
-- Signed zero
Pow : Big_Integer := 1 with Ghost;
T_Init : constant Int :=
- Int'Max (abs (Int'Max (Lo, Int'First + 1)),
- abs (Int'Max (Hi, Int'First + 1)))
+ Int'Max (abs Int'Max (Lo, Int'First + 1),
+ abs Int'Max (Hi, Int'First + 1))
with Ghost;
-- Start of processing for System.Width_I
-- negative number (note that First + 1 has same digits as First)
T := Int'Max (
- abs (Int'Max (Lo, Int'First + 1)),
- abs (Int'Max (Hi, Int'First + 1)));
+ abs Int'Max (Lo, Int'First + 1),
+ abs Int'Max (Hi, Int'First + 1));
-- Increase value if more digits required
-- Now test for dynamic predicate
if Has_Predicates (P_Type)
- and then not (Has_Static_Predicate (P_Type))
+ and then not Has_Static_Predicate (P_Type)
then
Error_Attr_P
("prefix of % attribute may not have dynamic predicate");
if (Is_Type (Tsk) and then Tsk = S)
or else (not Is_Type (Tsk)
and then Etype (Tsk) = S
- and then not (Comes_From_Source (S)))
+ and then not Comes_From_Source (S))
then
null;
else
P := Unit (Parent_Spec (Lib_Spec));
P_Name := Defining_Entity (P);
- if not (Private_Present (Parent (Lib_Spec)))
+ if not Private_Present (Parent (Lib_Spec))
and then not In_Private_Part (P_Name)
then
Install_Private_Declarations (P_Name);
Error_Msg_N
("full view of private extension must be an extension", N);
- elsif not (Abstract_Present (Parent (Prev)))
+ elsif not Abstract_Present (Parent (Prev))
and then Abstract_Present (Type_Definition (N))
then
Error_Msg_N
-- from interfaces several null primitives which differ only
-- in the mode of the formals.
- if not (Comes_From_Source (E))
+ if not Comes_From_Source (E)
and then Is_Null_Procedure (E)
and then not Mode_Conformant (Designator, E)
then
-- overridden operation is the inherited primitive
-- (which is available through the attribute alias).
- elsif not (Comes_From_Source (E))
+ elsif not Comes_From_Source (E)
and then Is_Dispatching_Operation (E)
and then Find_Dispatching_Type (E) =
Find_Dispatching_Type (S)
then
return True;
- elsif not (Is_Derived_Type (Dep))
+ elsif not Is_Derived_Type (Dep)
and then Is_Derived_Type (Full_View (Dep))
then
-- When instantiating a package body, the scope stack is empty, so
and then Dims_Of_L /= Dims_Of_R
then
if Nkind (L) = N_Real_Literal
- and then not (Comes_From_Source (L))
+ and then not Comes_From_Source (L)
and then Expander_Active
then
null;
elsif Nkind (R) = N_Real_Literal
- and then not (Comes_From_Source (R))
+ and then not Comes_From_Source (R)
and then Expander_Active
then
null;
declare
Designated : constant Entity_Id := Designated_Type (Typ);
begin
- if not (Is_Array_Type (Designated))
+ if not Is_Array_Type (Designated)
or else Is_Constrained (Designated)
then
Error_Pragma
if Nkind (Rop) = N_Real_Literal
and then Realval (Rop) /= Ureal_0
- and then abs (Realval (Rop)) < Delta_Value (Standard_Duration)
+ and then abs Realval (Rop) < Delta_Value (Standard_Duration)
then
Error_Msg_N
("??universal real operand can only "
begin
-- It is not so clear what to return when Arg is negative???
- Left_Hat := abs (L1) * Base + L2;
+ Left_Hat := abs L1 * Base + L2;
end;
end if;
Length_R := 2;
else
- R1 := abs (Udigits.Table (Uints.Table (Right).Loc));
+ R1 := abs Udigits.Table (Uints.Table (Right).Loc);
R2 := Udigits.Table (Uints.Table (Right).Loc + 1);
Length_R := Uints.Table (Right).Length;
end if;
-- For any other number in Int_Range, get absolute value of number
elsif UI_Is_In_Int_Range (Input) then
- Num := abs (UI_To_Int (Input));
+ Num := abs UI_To_Int (Input);
Bits := 0;
-- If not in Int_Range then initialize bit count for all low order
else
Bits := Base_Bits * (Uints.Table (Input).Length - 1);
- Num := abs (Udigits.Table (Uints.Table (Input).Loc));
+ Num := abs Udigits.Table (Uints.Table (Input).Loc);
end if;
-- Increase bit count for remaining value in Num
Init_Operand (Left, L_Vec);
Init_Operand (Right, R_Vec);
Neg := L_Vec (1) < Int_0 xor R_Vec (1) < Int_0;
- L_Vec (1) := abs (L_Vec (1));
- R_Vec (1) := abs (R_Vec (1));
+ L_Vec (1) := abs L_Vec (1);
+ R_Vec (1) := abs R_Vec (1);
Algorithm_M : declare
Product : UI_Vector (1 .. L_Length + R_Length);