public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Prove double precision integer arithmetic unit
@ 2021-11-10  8:58 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-11-10  8:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: Pierre-Alexandre Bazin

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]

This unit is used to implement the rutime support for fixed-point
operations (conversions, multiplication, division and I/O).  Its
correctness is proved with GNATprove.

Proof is performed with GNATprove options --level=4 --prover=all

Proof requires use of the special Big_Integers_Ghost unit for spec and
proof. Mark also the units analyzed as being in SPARK with aspect
SPARK_Mode.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/a-nbnbig.ads: Mark the unit as Pure.
	* libgnat/s-aridou.adb: Add contracts and ghost code for proof.
	(Scaled_Divide): Reorder operations and use of temporaries in
	two places to facilitate proof.
	* libgnat/s-aridou.ads: Add full functional contracts.
	* libgnat/s-arit64.adb: Mark in SPARK.
	* libgnat/s-arit64.ads: Add contracts similar to those from
	s-aridou.ads.
	* rtsfind.ads: Document the limitation that runtime units
	loading does not work for private with-clauses.

[-- Attachment #2: patch.diff.gz --]
[-- Type: application/gzip, Size: 18766 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-10  8:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  8:58 [Ada] Prove double precision integer arithmetic unit Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).