From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: My new post on dev.to about SPARK
Date: Fri, 10 Jul 2020 06:17:21 +0200 [thread overview]
Message-ID: <re8q4i$rk3$1@dont-email.me> (raw)
In-Reply-To: <lyh7ugcvcd.fsf@pushface.org>
> mockturtle <framefritti@gmail.com> writes:
>> https://dev.to/pinotattari/proving-the-correctness-of-a-binary-search-procedure-with-spark-ada-34id
>
Hmmm.. The following O(N**2) function:
function Is_Sorted (Table : Array_Type) return Boolean
is (for all L in Table'Range =>
(for all M in Table'Range =>
(if L > M then Table (L) > Table (M))))
with Ghost;
can be changed to a O(N) function:
function Is_Sorted (Table : Array_Type) return Boolean
is (for all L in Table'First .. Table'Last -1 =>
Table (L) < Table (L+1))
with Ghost;
--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr
next prev parent reply other threads:[~2020-07-10 4:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 14:16 My new post on dev.to about SPARK mockturtle
2020-07-09 15:21 ` Fabien Chouteau
2020-07-09 15:27 ` Fabien Chouteau
2020-07-09 16:35 ` Jeffrey R. Carter
2020-07-09 20:00 ` Simon Wright
2020-07-10 4:17 ` J-P. Rosen [this message]
2020-07-10 6:04 ` Paul Rubin
2020-07-10 7:47 ` J-P. Rosen
2020-07-10 7:42 ` Stéphane Rivière
2020-07-10 9:16 ` Nasser M. Abbasi
2020-07-10 9:20 ` Nasser M. Abbasi
2020-07-23 10:17 ` mockturtle
2020-09-03 10:32 ` c+
2020-09-12 4:30 ` sumde121
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox