🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2594

Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)

#2594
From: Robert Dewar
Date: Mon, 09 Oct 1995 12:58
24 lines
1993 bytes
Michel asks:

"If the language allows arbitrary pointer arithmetic or even explicit
"free" of dynamically allocated memory, you cannot "rigorously" check
everything. This is why you see so many competing products to check C
programs. None does a thorough job although some are quite good.
If you are willing to subset the portion of the language that you are using
then you can garantee safety."

You can in fact rigorously check everything against the ANSI standard, but
only by keeping additional runtime data strucures (as for instance Purify
does). Furthermore, most C programmers would not want such rigorous
checking because it would forbid things which in practice work fine on
all C compilers.

It is a common position to say that C (and other languages without bounds
checking built-in, like Fortran or COBOL) are equivalent to Ada since
bounds checking is simply an implementation matter, but it is an
incorrect one. There is in practice a big diffrerence between a language
like Ada, where bounds checking is part of the sematncis and the language
is designed so that it is easy to implement, and the assumption is that the
default is checks on, and a language where you can implement limited
bounds checking, but not easily, and certainly you would not expect to
see it as the default.
Technical Details
Message-ID: <dewar.813243156@schonberg>
Path: arc1-ca.pugleaf.net!news.mathworks.com!panix!cmcl2!schonberg!dewar
References: <44hcri$rsm@theopolis.orl.mmc.com> <44rv1u$dfk@apollo.ekfido.kodak.com> <44uccq$lkd@theopolis.orl.mmc.com> <DFyAJF.KpC@research.att.com> <DAGENAIS.95Oct6084824@gutrune.vlsi.polymtl.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mathworks.com!panix!cmcl2!schonberg!dewar
From: dewar@cs.nyu.edu (Robert Dewar)
Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++,comp.lang.ada
Subject: Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)
Date: 9 Oct 1995 08:58:10 -0400
Organization: Courant Institute of Mathematical Sciences
Message-ID: <dewar.813243156@schonberg>
References: <44hcri$rsm@theopolis.orl.mmc.com> <44rv1u$dfk@apollo.ekfido.kodak.com>  <44uccq$lkd@theopolis.orl.mmc.com> <DFyAJF.KpC@research.att.com> <DAGENAIS.95Oct6084824@gutrune.vlsi.polymtl.ca>
NNTP-Posting-Host: schonberg.cs.nyu.edu
X-Newsreader: NN version 6.5.0 (NOV)