Arthur
> > main()
> > {
> > printf("Hello world.\n");
> > }
>
> implicit and up to the compiler's implementation in that program. There is
> no indication as to whether or not this will compile to a void or integer
> main, and what the printf will exactly do is fully unclear as well (it might
Actually it will be an int procedure since int is assumed if no type is
specified.
> What I think Derek is hinting at is that every programmer has a tendency to
> actually understand only parts of the program and assume other parts will
> behave properly. As anecdotal evidence: must bugs I encounter have to do
> with assuming I understand what a piece of code does (and the assumptions
> usually are quite reasonable) and finding out that assumption is wrong.
> Even then I usually don't need to fully understand what's going on, just
> what's going *wrong*.
There has to be congruence between the operational semantics the programmers
believes and the operational semantics the processor believes. Debugging is
about finding the incongruences between the expected behaviour and the actual
behaviour. If the incongruence can be found without fully comprehending the
whole program then so much the better. However, fixing a bug without following
through the consequences on the whole of the rest of the program ultimately leads
to spaghetti code. The program realy does have to be understood globally in
order to really evolve it and make it smaller and faster.
> Other than that there are obviously different levels of understanding. I
> understand the way computers work on a general level, but I wouldn't say
> I actually understand what the north bridge connecting my processor to the
> memory bus and the south bridge does precisely.
But then this is below the operational virtual machine that the general C
programmer works at. The issues of bus bridges are only worrisome for the
hardware engineer and the operating system constructor. Thus these issues do not
impinge on the operational semantics of the genral C program -- the virtual
machine provided by the operating system shield the programmer from these issues.
Russel.
======================================================================
Professor Russel Winder Professor of Computing Science
Department of Computer Science Fax: +44 20 7848 2851/+44 20 7848 2913
King's College London [EMAIL PROTECTED]
Strand, London WC2R 2LS, UK http://www.dcs.kcl.ac.uk/staff/russel/
- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED] unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED] help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]