comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Teaching C/C++ from Ada perspective?
Date: Thu, 5 Jul 2018 20:32:35 -0700 (PDT)
Date: 2018-07-05T20:32:35-07:00	[thread overview]
Message-ID: <9bb99fb4-b9c7-4516-97b5-da41466e96be@googlegroups.com> (raw)
In-Reply-To: <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com>

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 code 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?
> 
> So can you kindly point me to where exactly SEI recommends defining integer range types ...

Maciej, I'll see your integer range types as software-engineering principles 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 members, but from the imprimatur of William A. Wulf himself, the founder-progenitor-anchor-pillar of the entire software-engineering team at CMU.

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 -man requirements for HOLWG's new language:  strawman, woodenman, tinman, ironman, steelman.  Ironman and Steelman were issued to the {Yellow, Blue, Red, Green} color teams to design a language that conforms to the Ironman-at-first and then-Steelman requirements.  Steelman requirements added a brand-new requirement that had no precursor in Ironman:
“3-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 application. Explicit conversion operations shall not be required between numeric ranges.”

https://en.wikisource.org/wiki/Steelman_language_requirements

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 relationship with HOLWG:  Tartan from the pre-SEI team at CMU and -75+15PL/I from IBM.

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% added.  HOLWG issued Ironman requirements to CMU and IBM to design a language from Ironman, and harshly critique whether Ironman was on-track or off-track.  HOLWG utilized the language definitions (including 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.

https://ia800804.us.archive.org/7/items/DTIC_ADA062815/DTIC_ADA062815.pdf
In §1.7 Unresolved Issues, the §1.7.3 Definition of Integers overtly recommends the content that became Steelman's new 3-1C requirement:
“In the reference manual we chose fIxed as a primitive and defined lnt as a special case by choosing attributes appropriately. We believe it is possible to treat int as primitive and define Fixed as nonprlmative by associating •range•/precision bookkeeplng with the operations.”  [Operations were Tartan's jargon for compile-time definitions of the values of the attributes of types.]

[Btw, Dmitry, you & your Steelman 3-3F-esque compile-time constant tag attributes for untagged types should pay especial attention henceforth, because, had more of Tartan made it into Steelman and thus into Green/Ada, then you yourself [not language designers] would have been able to define your own compile-time constant tag attributes for •any• type.  In the form of a standard library of Tartan-esque type compile-time operations, you would have had your tags for untagged types feature in a hypothetical more-Tartan-influenced Ada83+ almost 4 decades ago.]

In §1.5.6 Definition of Types, we see::
“A ••user•• may introduce a new type into his program with a type deflation. The type definition itself merely introduces the <type name> and defines the representation of the type. Operations are introduced by writing routines whose formal parameters are of the newly-dsflned type. …
¶A type definition may be paremeterized with •attributes•. The bindings in the formal parameter list must be •const• or mamfest. If a <binding> is omitted, it will be assumed to be const[, •Dmitry•]. The names of the formal parameters of the type are available throughout the elaboration of the program as •constants• [just as in Steelman requirement 3-3F], called •attributes• [just as they later became known in Ada]. They are accessed by treating the <var ident> as a •record•[, Dmitry] and the type attribute as a [Steelman 3-3F-compliant] •const• field. Attributes for primitive types are given as part of the type definitions [just as they later became in Ada].”

So there we have it, almost* precisely as Maciej requested:
constant compile-time attributes for integer (and fixed-point) ranges (and precision) from Carnegie Mellon University's DoD computer-science research team that a few years later named themselves Software Engineering Institute feeding directly into the requirements document that is to measure the amount of software-engineering-ness present in any programming language.

* just without mentioning C++ by name, mainly because C++ didn't exist yet (nor did C with Classes), because C++ hadn't mimicked Ada to this degree until a half to full decade later

Btw, Maciej, Steelman requirements are governing any programming language that purports to be a software-in-the-large software-engineering language, C++ included.

How well does 1990s-era {Ada95, C, C++, Java, Pascal}, and 2010s-era {D, Rust, Parasail} measure up against Steelman's software-engineering requirements?

https://www.dwheeler.com/steelman/steeltab.htm

http://jedbarber.id.au/steelman.html


  parent reply	other threads:[~2018-07-06  3:32 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 18:04 Teaching C/C++ from Ada perspective? kouaoua16
2018-06-30 18:15 ` Luke A. Guest
2018-06-30 19:27   ` Dan'l Miller
2018-06-30 19:07 ` Dan'l Miller
2018-07-01 16:12 ` kouaoua16
2018-07-01 17:08   ` Luke A. Guest
2018-07-01 19:19     ` Dan'l Miller
2018-07-02  6:12       ` Maciej Sobczak
2018-07-01 20:52 ` Maciej Sobczak
2018-07-01 21:35   ` Dan'l Miller
2018-07-02  5:56     ` Maciej Sobczak
2018-07-02  9:58       ` Marius Amado-Alves
2018-07-02 11:03         ` Maciej Sobczak
2018-07-02 13:52           ` Marius Amado-Alves
2018-07-04 12:10             ` Dan'l Miller
2018-07-02 20:14         ` Paul Rubin
2018-07-03  9:48           ` Marius Amado-Alves
2018-07-04  2:52             ` Paul Rubin
2018-07-02 18:52       ` Dan'l Miller
2018-07-03  8:00         ` Maciej Sobczak
2018-07-03 12:40           ` Dan'l Miller
2018-07-03 20:54             ` Maciej Sobczak
2018-07-04  3:10               ` Dan'l Miller
2018-07-04  7:59                 ` Maciej Sobczak
2018-07-04  8:37                   ` Marius Amado-Alves
2018-07-04 12:22                     ` Maciej Sobczak
2018-07-04 14:13                       ` Simon Wright
2018-07-04 14:56                         ` Maciej Sobczak
2018-07-04 15:52                           ` Dmitry A. Kazakov
2018-07-04 16:24                             ` Alejandro R. Mosteo
2018-07-04 20:00                               ` Jeffrey R. Carter
2018-07-05 18:35                                 ` Randy Brukardt
2018-07-05 19:39                                   ` Jeffrey R. Carter
2018-07-06 18:45                                     ` Randy Brukardt
2018-07-04 20:13                             ` Maciej Sobczak
2018-07-04 21:09                               ` Dmitry A. Kazakov
2018-07-05  5:49                                 ` Maciej Sobczak
2018-07-05  7:37                                   ` Dmitry A. Kazakov
2018-07-05 13:14                                     ` Maciej Sobczak
2018-07-05 15:18                                       ` Dmitry A. Kazakov
2018-07-05 19:16                                       ` Randy Brukardt
2018-07-07 15:09                                         ` Lucretia
2018-07-05 19:12                                     ` Randy Brukardt
2018-07-05 20:10                                       ` Maciej Sobczak
2018-07-06 19:01                                         ` Randy Brukardt
2018-07-06 19:35                                           ` Dmitry A. Kazakov
2018-07-05  7:43                                   ` Alejandro R. Mosteo
2018-07-05 18:53                                   ` Randy Brukardt
2018-07-05 19:06                                     ` Dan'l Miller
2018-07-06 18:47                                       ` Randy Brukardt
2018-07-05 20:12                                     ` Maciej Sobczak
2018-07-06 18:51                                       ` Randy Brukardt
2018-07-06 19:43                                         ` Dmitry A. Kazakov
2018-07-06 20:18                                           ` Dan'l Miller
2018-07-07  8:39                                             ` Dmitry A. Kazakov
2018-07-07 11:53                                           ` Björn Lundin
2018-07-06 20:22                                         ` Maciej Sobczak
2018-07-06 23:26                                           ` Paul Rubin
2018-07-07  6:17                                             ` J-P. Rosen
2018-07-07  6:37                                               ` Micronian Coder
2018-07-07  8:48                                                 ` Privacy and child packages (Was: Teaching C/C++ from Ada perspective?) Jacob Sparre Andersen
2018-07-07 20:19                                               ` Teaching C/C++ from Ada perspective? Maciej Sobczak
2018-07-08 15:25                                           ` Simon Wright
2018-07-08 20:00                                             ` Maciej Sobczak
2018-07-09  9:04                                               ` Alejandro R. Mosteo
2018-07-05 15:30                               ` Dan'l Miller
2018-07-05 20:38                                 ` Maciej Sobczak
2018-07-05 21:05                                   ` Dan'l Miller
2018-07-05 18:47                               ` Randy Brukardt
2018-07-04 16:01                           ` Simon Wright
2018-07-04 17:12                           ` G. B.
2018-07-04 20:18                             ` Maciej Sobczak
2018-07-04 21:03                               ` G.B.
2018-07-04 17:21                           ` Dan'l Miller
2018-07-04 20:36                             ` Maciej Sobczak
2018-07-04 22:44                               ` Dan'l Miller
2018-07-05  2:01                                 ` Luke A. Guest
2018-07-05  5:03                                   ` Dan'l Miller
2018-07-05  5:58                                 ` Maciej Sobczak
2018-07-05 19:25                                   ` Randy Brukardt
2018-07-05 19:22                                 ` Randy Brukardt
2018-07-05 18:31                       ` Randy Brukardt
2018-07-06  3:32           ` Dan'l Miller [this message]
2018-07-06 12:05             ` Dan'l Miller
2018-07-06 20:42             ` Maciej Sobczak
2018-07-06 21:32               ` Dan'l Miller
2018-07-07 20:43                 ` Maciej Sobczak
2018-07-08 17:36                   ` Dan'l Miller
2018-07-08 18:39                     ` Bill Findlay
2018-07-08 19:28                       ` Dan'l Miller
2018-07-09 12:34                         ` Bill Findlay
2018-07-09 15:19                           ` Dan'l Miller
2018-07-09 19:34                             ` Bill Findlay
2018-07-09 22:03                               ` Dan'l Miller
2018-07-09 22:35                                 ` Bill Findlay
2018-07-10  1:56                                   ` Lucretia
2018-07-10 23:14                         ` Randy Brukardt
2018-07-11 14:05                           ` Dan'l Miller
2018-07-11 20:20                             ` Randy Brukardt
2018-07-08 20:43                     ` Maciej Sobczak
2018-07-08 23:17                       ` Dan'l Miller
2018-07-09  6:13                         ` Maciej Sobczak
2018-07-09 16:35                           ` Dan'l Miller
2018-07-10 23:20                       ` Randy Brukardt
2018-07-10 23:51                         ` Britt
2018-07-02 17:10   ` kouaoua16
2018-07-02 17:28     ` Dennis Lee Bieber
2018-07-02 18:22     ` Maciej Sobczak
2018-07-02 20:27     ` G.B.
2018-07-02  0:11 ` Paul Rubin
2018-07-02 14:26 ` kouaoua16
2018-07-02 19:57 ` G.B.
2018-07-02 20:17   ` Dan'l Miller
2018-07-03  9:56 ` Brian Drummond
2018-07-04 12:18 ` Olivier Henley
2018-07-04 14:17   ` kouaoua16
2018-07-12  5:38 ` robin.vowels
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox