Re: HLA StdLib2 criticism



"rhyde@xxxxxxxxxx" wrote:
Herbert Kleebauer wrote:

Suppose someone creates a new language and calls it "High Level
Assembler" (HLA). And then writes a couple of programs (HLA.EXE and
HLAPARSE.EXE) that takes a source file in the HLA language and
translates it to FASM and then calls FASM to produce an object code
output. Can that person call this the "FASM language?" Of course not.

Of course not, but also of course not he can call it an assembler
language. The machine language is defined by the processor architecture
and the code generating part of an assembly language is a symbolic
representation of the machine language.


Can HLC.EXE be called a compiler? HLC.EXE converts HLC source code
to C source code, the final compilation is done by the back end C
compiler. Therefore HLC.EXE can't be called a compiler.

You don't know what you're talking about. There are lots of compilers
implemented exactly this way. Like Rene, you confuse a language with
the implementation of the language.

Now you are confused by your trinity. Nobody would call a FORTRAN
to C converter a FORTRAN compiler. You can call it a FORTRAN
compiler only, if you combine it with a C compiler. And you
also can only call the combination of the front end HLC.EXE with
the back end C compiler a compiler, but not the HLC.EXE program
itself.



Can the HLC system be called a C compiler?

No, it cannot. "C" has a very standardized meaning and unless HLC
compiles unmodified C programs, you could never get away with this
claim.

By definition HLC is an extension of C and therefore will compile
unmodified C source. But nevertheless it can't be called a C compiler.


OTOH, there is no standardized "assembly language." Assembly language
is a nebulous term encompassing a wide range of different languages
(indeed, across different processors).

Ok, forgot to mention that I'm speaking about assembly programming
for a given processor architecture (x86). But I thought this was
obvious.


"Assembly Language" is in the
same category as "High-Level Language" for all intents and purposes. It
describes a class of languages, not a specific language.

Not if we are speaking about assembly programming for a given
architecture.


No doubt, the HLC
system is a compiler which converts HLC source code to object
code (a different question is, whether the system should use
the name HLC when the most work is done by the back end C
compiler).

How do you know that "most of the work" is being done by the back-end C
compiler. In the case of HLA, I can assure you that this is *not* the
case.

Did I say this? As you can see, I have not copied this sentence into
the HLA-version of this text below.


And because C is a subset of HLC, the HLC system
can compile any valid C program (HLC.EXE just passes the source
code unmodified to the C compiler). But this doesn't make the
HLC system a C compiler, it still is a HLC compiler which also
can compile C programs.

And that's where your analogy fails. HLA will not compile any FASM,
MASM, TASM, or Gas program.

Where did I say this? I said, HLA CAN compile assembly language but
also can compile HLA language. The same as HLC can compile C
programs as well as HLC programs. But this doesn't make HLC a
C compiler nor HLA an assembler.


HLA is a completely different language. It
is not a superset of one of these other languages, at all.

Where die I say that HLA is a superset of this languages. I
also didn't say, that HLC is a superset of BASIC, FORTRAN
and Modula. I said, HLC is a superset of C and HLA is a superset
of a "symbolic representation of processor instructions" (an
assembler).


It is a
*different* language. That language happens to be classified as an
assembly language, because you have all the machine instructions
available to you.

That doesn't qualify HLA as an assembler. HLC also has all
C constructs available for you, but this doesn't qualify it
as a C compiler.


Can the HLA language be called an assembly language?

Not only can be called an assembly language, it *is* an assembly
language.

Only if continuously repeating a false statement makes it true.


Because
HLA is an extension to assembly language,

No, it is *not* an extension. That's like saying "C is an extension to
high-level language." Your statement makes no sense. You could claim
(incorrectly) that "HLA is an extension to the MASM language" or "HLA
is an extension to the FASM language" but you can't use the term
"assembly language" as though it described a single language. It does
not.

Wrong again. Assembly language is a symbolic representation
of the well define machine language. And HLA _IS_ an extension
to this.


a valid assembly
program also is a valid HLA program, but this doesn't make
HLA an assembly language.

That statement makes no sense at all. If a valid assembly language
program (that is, the syntax of the source file corresponds to some
grammar for an assembly language) and the HLA compiler processes that
language, of course HLA is an assembly language.

Just because you can use a television to hear music, doesn't
make the TV a radio.


HLA.EXE converts HLA source code
to assembly source code, the final conversion is done by the back end
assembler. Therefore HLA.EXE can't be called a compiler.

GCC converts C/C++ source code to assembly source code. The final
conversion is done by the back end assembler (Gas). Therefore GCC can't
be called a compiler.

Yeah, right.

Did you ever get a GCC version without GAS? Only the complete set
makes it a compiler. Remove GAS and the rest of the package isn't
a compiler anymore because it then isn't able to generate machine
code. Remove the back end assembler from the HLA system and the
rest (HLA.EXE + HLAPARSE.EXE) isn't a compiler anymore.


Can the HLA system be called an assembler?

It is a compiler for an assembly language. That's the only reasonable
definition I've come across. That is, it takes an assembly language
source file (in the HLA assembly language) and through magic (internal)
means, produces an object output file. What more is needed than that.

It is a compiler for HLA language which also can compile assembly
language, but that doesn't make it an assembler. HLC is a compiler
for HLC source code which also can compile C source code, but that
doesn't make HLC a C compiler.


No doubt, the HLA
system is a compiler which converts HLA source code to object
code.

No doubt. And again, a compiler that accepts some sort of assembly
language input and produces object code output is called an
"assembler".

No. this is true only if it can only compile assembly language input.
If it can also compile a superset of the assembly language it
isn't anymore an assembler, as HLC isn't a C compiler or a TV
isn't a radio.


And because assembler code is a subset of HLA,

Actually, you've got it backwards. The HLA language is a subset of all
the assembly languages out there. If "assembler code" were a subset of
HLA, then HLA would be able to compile any assembly source file out
there, including MASM source code, FASM source code,

An assembler will convert a symbolic representation of machine code
to binary machine code. Because the assembler author is free to
choose his preferred symbolic representation, it is very unlikely that
an assembler can process the source for a different assembler. But
if the language is extended by HL constructs it isn't an assembler
anymore even if it can still process assembler code. A radio is
a device which can receive and play sound. Because the designer
can choose his preferred modulation or encoding format, not every
radio device can decode the HF signal generated or an other radio.
Now if you generate a superset of the radio by adding pictures, you
will get a TV and it isn't a radio anymore. And just because the
TV is a superset of the radio doesn't mean that the TV can receive
all sorts of radio modulations. And just because HLA is a superset
of assembly language doesn't mean that HLA can process all sorts
of assembly language.


....., then this can't be tolerated anymore. Sure, the
students get much better exams when using this PC's, as
they get better exams when using HLA instead of an assembler, but
they didn't learn what they should have learned.

If you're trying to claim that students are learning assembly language
using HLA, then you're dead wrong.

I know that I would be dead wrong if I would claim this. And you are
dead wrong because you claim this.
.



Relevant Pages

  • Re: HLA StdLib2 criticism
    ... HLC.EXE with an already existing C compiler and calls it HLC system. ... Suppose someone creates a new language and calls it "High Level ... Assembler" (HLA). ...
    (alt.lang.asm)
  • Re: What is an assembly language?
    ... HLA is an assembler. ... So what is this essential ability of an assembly language that is ... > that Randy-HLA isn't an x86 assembler. ...
    (alt.lang.asm)
  • Re: I think i finally got a definition of an Assembler!
    ... definition - you can _never_ have an assembler for that system. ... production of an object file, ... A compiler that produces a object file from transalting the source ... I was refering as Randallīs HLA as he hole system...It does not ...
    (alt.lang.asm)
  • Re: Why no C++ in Windows itself?
    ... >Do you mean that C is faster executing? ... I wasn't trying to start a language war. ... compiled by a C++ compiler). ... you have to "deobjectify" any data you want to access from assembler ...
    (microsoft.public.vc.language)
  • Re: Why no C++ in Windows itself?
    ... >Do you mean that C is faster executing? ... I wasn't trying to start a language war. ... compiled by a C++ compiler). ... you have to "deobjectify" any data you want to access from assembler ...
    (microsoft.public.dotnet.general)