public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Proof of 'Image support for signed integers
@ 2022-05-12 12:39 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-12 12:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: Yannick Moy

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

Prove System.Image_I, similarly to the proof done for System.Image_U.
The contracts make the connection between the result of Image_Integer,
the available space computed with System.Width_U and the result of
'Value as computed by Value_Integer.

I/O units that now depend on non-pure units are also marked not Pure
anymore.

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

gcc/ada/

	* libgnat/s-imagef.adb: Adapt to new signature of Image_I, by
	providing ghost imported subprograms. For now, no contract is
	used on these subprograms, as System.Image_F is not proved.
	* libgnat/s-imagef.ads: Add modular type Uns as formal
	parameter, to use in defining Int_Params for instantiating
	Image_I.
	* libgnat/s-imagei.adb: Add contracts and ghost code.
	* libgnat/s-imagei.ads: Replace Int formal parameter by package
	Int_Params, which bundles type Int and Uns with ghost
	subprograms.  Add contracts.
	* libgnat/s-imfi128.ads: Adapt to new formal of Image_F.
	* libgnat/s-imfi32.ads: Adapt to new formal of Image_F.
	* libgnat/s-imfi64.ads: Adapt to new formal of Image_F.
	* libgnat/s-imgint.ads: Adapt to new formals of Image_I.
	* libgnat/s-imglli.ads: Adapt to new formals of Image_I.
	* libgnat/s-imgllli.ads: Adapt to new formals of Image_I.
	* libgnat/s-valint.ads: Adapt to new formals of Value_I.
	* libgnat/s-vallli.ads: Adapt to new formals of Value_I.
	* libgnat/s-valllli.ads: Adapt to new formals of Value_I.
	* libgnat/s-valuei.adb (Prove_Scan_Only_Decimal_Ghost): New
	ghost lemma.
	* libgnat/s-valuei.ads: New formal parameters to prove the new
	lemma.
	* libgnat/s-valuti.ads (Int_Params): Define a generic package to
	be used as a trait-like formal parameter in Image_I and other
	generics that need to instantiate Image_I.
	* libgnat/s-widthu.ads (Big_10): Qualify the 10 literal.

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

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

only message in thread, other threads:[~2022-05-12 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 12:39 [Ada] Proof of 'Image support for signed integers 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).