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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.180.76.76 with SMTP id i12mr135026wiw.6.1368496937498; Mon, 13 May 2013 19:02:17 -0700 (PDT) MIME-Version: 1.0 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!h2no2471702wiw.1!news-out.google.com!p18ni108122wiv.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!137.226.231.214.MISMATCH!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Mon, 13 May 2013 21:02:16 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <17ceq51ydy3s0.s94miqqzbg5w.dlg@40tude.net> <1vrhb7oc4qbob$.q02vuouyovp5$.dlg@40tude.net> <19lrzzbgm77v6.1dzpgqckptaj6.dlg@40tude.net> <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net> <12gn9wvv1gwfk.10ikfju4rzmnj.dlg@40tude.net> <6416a096-def9-4a95-a4e0-7ba6a4ece524@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1368496937 7639 69.95.181.76 (14 May 2013 02:02:17 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 14 May 2013 02:02:17 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 3549 Xref: number.nntp.dca.giganews.com comp.lang.ada:181623 Date: 2013-05-13T21:02:16-05:00 List-Id: "Niklas Holsti" wrote in message news:av8pvtFehv2U1@mid.individual.net... ... > It is interesting that Randy thinks his ideas regarding a future > replacement for Ada resemble the typestate concept, but that the > typestate concept as implemented in Plaid seems to be implementable in > Ada 2012. Perhaps Randy's ideas go much further than this, however. The main thing I was thinking about was some extension to the things that have to be compile-time analyzable (as Static Predicates are in Ada 2012). Probably the basis of them would remain subtypes and subprogram profiles (via preconditions and postconditions). For the Open example, that requires some way to encode the notion of "properties" in a statically understandable way. Perhaps you are right that discriminants would do the trick, but we'd want them to be "virtual" discriminants without any runtime cost. I agree that you can get the effect of typestate analysis in Ada 2012 using discriminants, predicates, and pre/postconditions, but those would be checked at runtime. The key here for me is to require static detection of these errors, even when variables and unconstrained formal parameters are involved. Anyway, I'm just musing here as opposed to having fully worked out ideas. So I could in fact be going down the wrong path. Randy.