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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: If not Ada, what else... Date: Sat, 11 Jul 2015 10:47:48 +0200 Organization: cbb software GmbH Message-ID: References: <14592326-5070-4663-a864-5684298f3748@googlegroups.com> <004361da-53c4-4ea9-8cc6-38944aa6c7ad@googlegroups.com> <29dd5458-f9ce-4db8-9128-8ab35a9ce5f8@googlegroups.com> <64bc671c-72e5-4924-b703-3b907c69949c@googlegroups.com> <877fq9uj6g.fsf@theworld.com> <65061686-5c8f-433b-9b11-9e228298158e@googlegroups.com> <87k2u96jms.fsf@jester.gateway.sonic.net> <06f8a6f9-d219-4d40-b9ac-8518e93839bd@googlegroups.com> <87y4io63jy.fsf@jester.gateway.sonic.net> <7a29d3e9-d1bd-4f4a-b1a6-14d3e1a83a4d@googlegroups.com> <87mvz36fen.fsf@jester.gateway.sonic.net> <2215b44f-8a89-47c6-a4c4-52b74d2dac45@googlegroups.com> <87oajj4e8l.fsf@jester.gateway.sonic.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: evoS9sCOdnHjo0GRLLMU1Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:26765 Date: 2015-07-11T10:47:48+02:00 List-Id: On Sat, 11 Jul 2015 09:51:07 +0200, Georg Bauhaus wrote: > On 11.07.15 04:31, Paul Rubin wrote: > >> Historically AFAIK range types in Ada were not statically checked. >> Checking them is very complicated and can be partly automated these days >> with SMT solvers, but in general you'd need proof assistants and lots of >> manual effort. > > The expressly bounded, named types of Ada to me are fundamental to sorting > things out. In many ways, for example: how could one find a function > from integers into integers to be from N -> {0, 1, ..., 10}, actually, > if there was no better way to specify the set of values in a type than > by saying "int"? Knowing more about the sets continues transitively, and > this knowledge is reflected in the definitions of user defined fundamental > types (with ranges etc.). Partially. Ada 83 didn't make it fully static, because it disregarded operations. It is not enough to declare a range or, more generally, the set of values to define a type. Because type includes operations. E.g. the numbers 1..10 may not have unary minus, as they don't have inverses. What Ada 83 did to resolve the problem was less typing. It relaxed contracts to uphold them. Constraint_Error was added to the contracts of all operations. Ada simplified issues with intermediate results by making them of the base type (C used type promotion for this). This was a compromise, but compromises never win. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de