From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.210.68 with SMTP id gj4mr1294871icb.1.1384892436144; Tue, 19 Nov 2013 12:20:36 -0800 (PST) X-Received: by 10.182.78.103 with SMTP id a7mr122653obx.4.1384892435856; Tue, 19 Nov 2013 12:20:35 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i2no6174503qav.0!news-out.google.com!9ni37638qaf.0!nntp.google.com!i2no6174489qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 19 Nov 2013 12:20:35 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.34; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.34 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9bf77e66-7279-4d18-8f83-4df40040723d@googlegroups.com> Subject: Re: Making guarantees about record components From: Anh Vo Injection-Date: Tue, 19 Nov 2013 20:20:36 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:17733 Date: 2013-11-19T12:20:35-08:00 List-Id: On Tuesday, November 19, 2013 10:49:26 AM UTC-8, J Kimball wrote: > > I'm trying to guarantee that two record component values map to the same > value of another type. > > type A is (...); > type C is (...); > > M : array (A) of C := (...); > > type R is record > A1 : A; > A2 : A; > end record > with Dynamic_Predicate => (M (R.A1) = M (R.A2) ); > > Is this the best solution we have as of Ada 2012? I am not sure if it is the best solution. However, it should work based on your requirements. A. Vo