Skip to content

Commit

Permalink
Suppress inevitable proof warnings
Browse files Browse the repository at this point in the history
Ref. #1131
  • Loading branch information
treiher committed Aug 19, 2022
1 parent 97775c3 commit 4b542d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rflx/templates/rflx_generic_types.ads
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,16 @@ is

procedure Free is new Ada.Unchecked_Deallocation (Object => Bytes, Name => Bytes_Ptr);

pragma Warnings (Off, "precondition is always False");

function Unreachable return Boolean is (False) with Pre => False;

function Unreachable return Bit_Length is (0) with Pre => False;

function Unreachable return Length is (0) with Pre => False;

pragma Warnings (On, "precondition is always False");

procedure Lemma_Size (Val : Base_Integer; Size : Positive) renames {prefix}RFLX_Arithmetic.Lemma_Size;

end {prefix}RFLX_Generic_Types;
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,16 @@ is

procedure Free is new Ada.Unchecked_Deallocation (Object => Bytes, Name => Bytes_Ptr);

pragma Warnings (Off, "precondition is always False");

function Unreachable return Boolean is (False) with Pre => False;

function Unreachable return Bit_Length is (0) with Pre => False;

function Unreachable return Length is (0) with Pre => False;

pragma Warnings (On, "precondition is always False");

procedure Lemma_Size (Val : Base_Integer; Size : Positive) renames RFLX.RFLX_Arithmetic.Lemma_Size;

end RFLX.RFLX_Generic_Types;
4 changes: 4 additions & 0 deletions tests/spark/generated/rflx-rflx_generic_types.ads
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,16 @@ is

procedure Free is new Ada.Unchecked_Deallocation (Object => Bytes, Name => Bytes_Ptr);

pragma Warnings (Off, "precondition is always False");

function Unreachable return Boolean is (False) with Pre => False;

function Unreachable return Bit_Length is (0) with Pre => False;

function Unreachable return Length is (0) with Pre => False;

pragma Warnings (On, "precondition is always False");

procedure Lemma_Size (Val : Base_Integer; Size : Positive) renames RFLX.RFLX_Arithmetic.Lemma_Size;

end RFLX.RFLX_Generic_Types;

0 comments on commit 4b542d8

Please sign in to comment.