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 2002:a6b:c542:: with SMTP id v63-v6mr4194423iof.18.1530878739630; Fri, 06 Jul 2018 05:05:39 -0700 (PDT) X-Received: by 2002:aca:c6ca:: with SMTP id w193-v6mr2186390oif.1.1530878739439; Fri, 06 Jul 2018 05:05:39 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!news.roellig-ltd.de!open-news-network.org!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!d7-v6no3546529itj.0!news-out.google.com!l67-v6ni3747itl.0!nntp.google.com!d7-v6no3546527itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 6 Jul 2018 05:05:39 -0700 (PDT) In-Reply-To: <9bb99fb4-b9c7-4516-97b5-da41466e96be@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <856189aa-fa00-4960-929e-174f352310ad@googlegroups.com> <2718c8d4-5f35-4fd8-a1aa-1e60069a7a5d@googlegroups.com> <39fce60c-9f56-42fb-b679-fa08810b00ee@googlegroups.com> <3701bf07-89a5-4cb0-a704-5aebb589ca79@googlegroups.com> <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com> <9bb99fb4-b9c7-4516-97b5-da41466e96be@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Teaching C/C++ from Ada perspective? From: "Dan'l Miller" Injection-Date: Fri, 06 Jul 2018 12:05:39 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 8819 X-Received-Body-CRC: 1298063925 Xref: reader02.eternal-september.org comp.lang.ada:53694 Date: 2018-07-06T05:05:39-07:00 List-Id: I found another 2 OCR mistakes that occurred within MacOS's PDF-world durin= g the bitmap-to-text copy paste (that I missed during the original edit). = Their correction is interspersed below, to try to preclude anyone from pond= ering what a =E2=80=9Cmamfest=E2=80=9D is. On Thursday, July 5, 2018 at 10:32:36 PM UTC-5, Dan'l Miller wrote: > On Tuesday, July 3, 2018 at 3:00:27 AM UTC-5, Maciej Sobczak wrote: > > > Overtly declaring the range of integers over which this portion of co= de operates can be a key portion > > > of eliminating all variants of the overflow/overrun vuln(erabilitie)s= that worms utilize as their attack > > > vector to insert machine code. > > ... > > > But never mind SEI software engineering principles, eh? > >=20 > > So can you kindly point me to where exactly SEI recommends defining int= eger range types ... >=20 > Maciej, I'll see your integer range types as software-engineering princip= les emanating from the SEI team > at CMU, and raise you one Tartan in 1978. The integer ranges as constant= attributes on integer (or, > indeed, on any scalar type) comes not merely from the various team member= s, but from the imprimatur > of William A. Wulf himself, the founder-progenitor-anchor-pillar of the e= ntire software-engineering team > at CMU. >=20 > The Software Engineering Institute was formed on 14 November 1984. Prior= to the official formation of > the SEI, William Wulf's team were a DoD-supported research contractor at = Carnegie Mellon University. > The DoD High-Order Language Working Group (HOLWG) authored a series of -m= an requirements for > HOLWG's new language: strawman, woodenman, tinman, ironman, steelman. I= ronman and Steelman > were issued to the {Yellow, Blue, Red, Green} color teams to design a lan= guage that conforms to the > Ironman-at-first and then-Steelman requirements. Steelman requirements a= dded a brand-new > requirement that had no precursor in Ironman: > =E2=80=9C3-1C. Numeric Variables. The range of each numeric variable must= be specified in programs and shall > be determined by the time of its allocation. Such specifications shall be= interpreted as the minimum > range to be implemented and as the maximum range needed by the applicatio= n. Explicit conversion > operations shall not be required between numeric ranges.=E2=80=9D >=20 > https://en.wikisource.org/wiki/Steelman_language_requirements >=20 > But notably (and the ultimate SEI/CMU answer to your question) there were= 2 pre-disqualified > noncolor/noncompetitor language designs that had a extra-special relation= ship with HOLWG: Tartan > from the pre-SEI team at CMU and -75+15PL/I from IBM. >=20 > http://archive.adaic.com/pol-hist/history/holwg-93/holwg-93.htm > As mentioned in the 2nd paragraph below Figure 9, Tartan was an apparent = wordplay on the color > naming of the 4 official competitors; tartan is a specific kind of plaid = in William Wulf's ancestral > Scotland. -75+15PL/I was PL/I with 75% of PL/I removed and a new 15% add= ed. HOLWG issued Ironman > requirements to CMU and IBM to design a language from Ironman, and harshl= y critique whether Ironman > was on-track or off-track. HOLWG utilized the language definitions (incl= uding the language designers' > insights and criticisms) that they got back from Tartan and -75+15PL/I to= author their Steelman > requirements as a definitive improvement over their Ironman requirements. >=20 > https://ia800804.us.archive.org/7/items/DTIC_ADA062815/DTIC_ADA062815.pdf > In =C2=A71.7 Unresolved Issues, the =C2=A71.7.3 Definition of Integers ov= ertly recommends the content that became > Steelman's new 3-1C requirement: > =E2=80=9CIn the reference manual we chose fIxed as a primitive and define= d lnt as a special case by choosing > attributes appropriately. We believe it is possible to treat int as primi= tive and define Fixed as > nonprlmative by associating =E2=80=A2range=E2=80=A2/precision bookkeeplng= with the operations.=E2=80=9D [Operations were > Tartan's jargon for compile-time definitions of the values of the attribu= tes of types.] >=20 > [Btw, Dmitry, you & your Steelman 3-3F-esque compile-time constant tag at= tributes for untagged types > should pay especial attention henceforth, because, had more of Tartan mad= e it into Steelman and thus > into Green/Ada, then you yourself [not language designers] would have bee= n able to define your own > compile-time constant tag attributes for =E2=80=A2any=E2=80=A2 type. In = the form of a standard library of Tartan-esque > type compile-time operations, you would have had your tags for untagged t= ypes feature in a > hypothetical more-Tartan-influenced Ada83+ almost 4 decades ago.] >=20 > In =C2=A71.5.6 Definition of Types, we see:: > =E2=80=9CA =E2=80=A2=E2=80=A2user=E2=80=A2=E2=80=A2 may introduce a new t= ype into his program with a type deflation. The type definition itself > merely introduces the and defines the representation of the t= ype. Operations are > introduced by writing routines whose formal parameters are of the newly-d= sflned type. =E2=80=A6 defined > =C2=B6A type definition may be paremeterized with =E2=80=A2attributes=E2= =80=A2. The bindings in the formal parameter list > must be =E2=80=A2const=E2=80=A2 or mamfest. If a is omitted, it= will be assumed to be const[, =E2=80=A2Dmitry=E2=80=A2]. The manifest > names of the formal parameters of the type are available throughout the e= laboration of the program as > =E2=80=A2constants=E2=80=A2 [just as in Steelman requirement 3-3F], calle= d =E2=80=A2attributes=E2=80=A2 [just as they later became known > in Ada]. They are accessed by treating the as a =E2=80=A2reco= rd=E2=80=A2[, Dmitry] and the type attribute as a > [Steelman 3-3F-compliant] =E2=80=A2const=E2=80=A2 field. Attributes for p= rimitive types are given as part of the type > definitions [just as they later became in Ada].=E2=80=9D >=20 > So there we have it, almost* precisely as Maciej requested: > constant compile-time attributes for integer (and fixed-point) ranges (an= d precision) from Carnegie > Mellon University's DoD computer-science research team that a few years l= ater named themselves > Software Engineering Institute feeding directly into the requirements doc= ument that is to measure the > amount of software-engineering-ness present in any programming language. >=20 > * just without mentioning C++ by name, mainly because C++ didn't exist ye= t (nor did C with Classes), > because C++ hadn't yet mimicked Ada to this degree until a half to full d= ecade later >=20 > Btw, Maciej, Steelman requirements are governing any programming language= that purports to be a > software-in-the-large software-engineering language, C++ included. >=20 > How well does 1990s-era {Ada95, C, C++, Java, Pascal}, and 2010s-era {D, = Rust, Parasail} measure up > against Steelman's software-engineering requirements? >=20 > https://www.dwheeler.com/steelman/steeltab.htm >=20 > http://jedbarber.id.au/steelman.html