[Aldor-l] Compiling setup
Gabriel Dos Reis
gdr at integrable-solutions.net.integrable-solutions.net
Sun Aug 13 10:00:04 EDT 2006
"Christian Aistleitner" <tmgisi at gmx.at> writes:
[...]
| #include <stdio.h>
| int main( int argc, char * argv[] )
| {
| char str0[]="QRST";
| char str1[]="ABCDEFGHIJKLMNO";
| str1[strlen(str1)]='P';
| printf( "%s\n", str1 );
| return 0;
| }
|
| . Its not very portable -- but portable is again one of those vague
| term. We do not use it. It's a valid C program (for this gcc an my
| machine).
What makes you believe that is a valid C program? It invokes
undefined behaviour. From there you can prove everything you want.
[...]
| Maybe this example showed you, that the issue is also related to what
| you choose as reference. I chose "C as accepted by my gcc on my
| machine". Aldor did not choose the current C specification, but maybe
| the "C as accepted by (the then current) gcc".
But even with K&R, you have rubbish.
|
| > | > There is no "bad style" excuse to invoke. If the proram cannot work
| > | > correctly, then either the language is defective or the compiler is
| > | > buggy -- FWIW, I conisder the runtime system part of the compiler.
| > |
| > | Hmm, until someone proves me wrong, I would claim that String is not
| > | part of the Aldor language. And it is also not a part of the
| > | runtime. It is defined in the Aldor library "libaldor". And I don't
| > | count libaldor as part of the compiler stuff.
| >
| > That is a fine distinction. However, it does not work in practice: I
| > can't test any useful program coming with the AUG without having
| > libaldor. AUG says, page 12:
| >
| > #include "aldor" is the general include statement that will allow
| > the types and functions from libaldor to be visible. It is
| > necessary to use it (or an equivalent library) in order to write
| > programs.
|
| There are equivalent libraries.
I have no doubt that you can find *different implementations* of the
Aldor libary. However, they will be _equivalent_. That equivalence
classes (i.e. semamtics) is part of the compiler.
| I wrote one myself when experimenting
| with the semantics of Aldor's categories. In my base library, the
| domain Category had a completely different signature. I did not have
| a domain String at all.
|
| Compare it to C++ and the STL. You can code C++ without using the STL.
That sounds like "you can code in C++ without while". That is
true, but that hardly implies that "while" is not part of the C++
language.
STL is part of the *hosted implementation* specification of ISO C++ --
though a freestanding implementation can offer too, but is not
required too. Most certainly the "STL" -- what most people call STL today
is not the real STL -- is part of the ISO C++ specification. It is
part of the language. There is no real distinction, and certainly the
ISO C++ definition does not make any formal distintion.
However, you have many implementations of the C++ standard library.
That does not mean the standard library is not part of the language.
[...]
| The aldor library is not part of the Run-time System. Aldor's runtime
| system has types like HInt and SInt and expects Category and Type to
| be some domain valued constants (to give an example of the connection
| between the front-end and the run-time system).
| But the Aldor library is not in the scope of this. The Aldor libarry
| is separated from the run-time system.
OK.
-- Gaby
More information about the Aldor-l
mailing list