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.99.36.1 with SMTP id k1mr4473374pgk.25.1481060668496; Tue, 06 Dec 2016 13:44:28 -0800 (PST) X-Received: by 10.157.18.211 with SMTP id g77mr4203664otg.14.1481060668432; Tue, 06 Dec 2016 13:44:28 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!p16no3499199qta.1!news-out.google.com!j8ni4592qtc.0!nntp.google.com!p16no3499195qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 6 Dec 2016 13:44:27 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.0.242.189; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 67.0.242.189 References: <92ed75e9-baae-455c-9e34-53348dc6eaef@googlegroups.com> <03847fd7-5699-48de-bb3c-ef5512398f26@googlegroups.com> <3ef819e8-55f7-4ef7-9f37-77e6abc33f98@googlegroups.com> <47366b42-c0a3-41bf-a44a-5241c109d60f@googlegroups.com> <58f477d2-8b01-4001-bad8-47ea73424f4c@googlegroups.com> <6e206c3b-d4a8-44ab-9e0e-adb0924983ef@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <10e8cb52-1cbd-40ed-ba11-f474c2263ced@googlegroups.com> Subject: Re: Ada 2012 Constraints (WRT an Ada IR) From: Shark8 Injection-Date: Tue, 06 Dec 2016 21:44:28 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:32642 Date: 2016-12-06T13:44:27-08:00 List-Id: On Tuesday, December 6, 2016 at 2:07:07 PM UTC-7, Dmitry A. Kazakov wrote: >=20 > P1 =3D P3, sorry It's ok, I was just giving you a hard time. But something did occur to me in the interim: One reason that an IR could be handy is as an execution model -- like how I= ntel's iAPX 432 was designed for Ada's feature-set -- having a generalized = form for constraints/violations would mean that the the chip would only hav= e to handle one kind of constraint-type instead of having to have specializ= ed forms for P3 and P0. Perhaps a construction like: -- Failure indicates which exception is used, Message indicates the -- "with String" message, and Asserted indicates if the assertion- -- form is being used (and might therefore be suppressed). Type Constraint_Node( Failure : Exception_Node :=3D Constraint_Error; Message : AString :=3D Empty_String; Asserted : Boolean :=3D False ) is record Constraint : However_We_Represent_Constraints_Node; end record; Heck, if we went with an OOP class-hierarchy of tagged items we could have = a root Node type with inherited types for the classes of nodes (eg DIANA's = classification for structural-, semantic-, lexical-, and code- attributes).