Freestanding Environment

  • Thread starter Vijay Kumar R Zanvar
  • Start date
M

Martin Dickopp

Vijay Kumar R Zanvar said:
I want to know few examples of freestanding environments.

Cell phones, microwave ovens, washing machines, VCRs, DVD players...

Martin ( <-- that's my name, /not/ an example of a freestanding
environment)
 
D

Dan Pop

In said:
I want to know few examples of freestanding environments.

Any high end microwave oven, washing machine, TV set etc etc.
Your computer's keyboard, your computer's hard disk, your computer's OS
(and very likely your computer's monitor and graphics card).

Practically any computing environment that is not under the control of an
operating system is a freestanding environment.

Dan
 
C

Christopher Benson-Manica

Martin Dickopp said:
Martin ( <-- that's my name, /not/ an example of a freestanding
environment)

Well, you don't walk with a cane, do you? Then you're freestanding ;)
 
M

Martin Dickopp

Christopher Benson-Manica said:
Well, you don't walk with a cane, do you?

Neither do I, nor does my name.
Then you're freestanding ;)

But I'm not an environment, and neither is my name.

It could be argued that my name is sometimes freestanding in the sense
that it is the only item in a paragraph of text (like in this posting).
However, that was /not/ the case in my previous posting, where my name
wasn't freestanding, but accompanied the statement that it isn't a
freestanding environment. ;)

Martin
 
E

Eric Sosman

Dan said:
Any high end microwave oven, washing machine, TV set etc etc.
Your computer's keyboard, your computer's hard disk, your computer's OS
(and very likely your computer's monitor and graphics card).

Practically any computing environment that is not under the control of an
operating system is a freestanding environment.

.... and as a particular example, the operating system itself
is usually a freestanding environment.
 
D

Dan Pop

In said:
Cell phones, microwave ovens, washing machines, VCRs, DVD players...

Your favourite mistake at work again: microwave ovens and washing machines
need not be freestanding environments, for the simple reason that they
can be (and are) built without any embedded computer.

The first VCRs, too, but they are museum exhibits, by now :)

Dan
 
D

Dan Pop

In said:
... and as a particular example, the operating system itself
is usually a freestanding environment.

Any particular point in repeating my own example?

Dan
 
M

Martin Dickopp

Any high end microwave oven, washing machine, TV set etc etc.

Your favourite mistake at work again: high end microwave ovens and
washing machines need not be freestanding environments, for the simple
reason that they can be (and are) programmed in languages other than C
where the term "freestanding environment" isn't defined.

Martin
 
D

Dan Pop

In said:
Your favourite mistake at work again: high end microwave ovens and
washing machines need not be freestanding environments, for the simple
reason that they can be (and are) programmed in languages other than C
where the term "freestanding environment" isn't defined.

Freestanding environment is a general concept, that has precious little
to do with one programming language or another. Ditto for hosted
environment.

And an executable binary is an executable binary, regardless of the
language(s) it was written in, before being translated to an executable
binary.

Try engaging your brain next time!

Dan
 
M

Mike Wahler

Dan Pop said:
In <[email protected]> Martin Dickopp

Freestanding environment is a general concept, that has precious little
to do with one programming language or another. Ditto for hosted
environment.

Well, I'd apply context here (which due to the description
of comp.lang.c is ISO C):

=========================================================
ISO/IEC 9899:1999 (E)

[....]

4. Conformance

[....]

6 The two forms of conforming implementation are hosted and
freestanding. A conforming hosted implementation shall accept
any strictly conforming program. A conforming freestanding
implementation shall accept any strictly conforming program
that does not use complex types and in which the use of the
features specified in the library clause (clause 7) is confined
to the contents of the standard headers <float.h>, <iso646.h>,
<limits.h>, <stdarg.h>, <stdbool.h>, <stddef.h>, and <stdint.h>.
A conforming implementation may have extensions (including
additional library functions), provided they do not alter the
behavior of any strictly conforming program.

[....]

5.1.2.1 Freestanding environment

1 In a freestanding environment (in which C program execution
may take place without any benefit of an operating system),
the name and type of the function called at program startup
are implementation-defined. Any library facilities available
to a freestanding program, other than the minimal set required
by clause 4, are implementation-defined.

2 The effect of program termination in a freestanding environment
is implementation-defined.

[....]

=========================================================

-Mike
 
K

Keith Thompson

Freestanding environment is a general concept, that has precious little
to do with one programming language or another. Ditto for hosted
environment.

And an executable binary is an executable binary, regardless of the
language(s) it was written in, before being translated to an executable
binary.

Try engaging your brain next time!

Ahem.

This is comp.lang.c. If someone asks about "freestanding
environments" in this newsgroup, it's reasonable to assume that the
question is about the C programming language, especially since the C99
standard defines the term "freestanding implementation" in section 4,
paragraph 6 (and the C90 standard defines the same term in section 4,
paragraph 2). (I assumed you already knew that, since you replied to
the question with useful information without complaining that the
question was off-topic.)

Before telling people to engage their brains, you might pause to
consider the possibility that they already have.
 
D

Dan Pop

In said:
Ahem.

This is comp.lang.c. If someone asks about "freestanding
environments" in this newsgroup, it's reasonable to assume that the
question is about the C programming language, especially since the C99

The question is relevant to C programming, even if it is not about the
C programming language. The C standard itself mentions the concept of
"freestanding environment", without elaborating on it, hence the OP's
question about concrete examples was legit. And a freestanding
environment is still a freestanding environment even if no C
implementation exists for it...
standard defines the term "freestanding implementation" in section 4,
paragraph 6 (and the C90 standard defines the same term in section 4,
paragraph 2). (I assumed you already knew that, since you replied to
the question with useful information without complaining that the
question was off-topic.)

We were talking about "freestanding environment", not about "freestanding
implementation", which is something completely different.

If you engage your brain, you may realise the difference...
Before telling people to engage their brains, you might pause to
consider the possibility that they already have.

If they already have, but still posted nonsense, it's sad...

Dan
 
D

Dan Pop

In said:
Well, I'd apply context here (which due to the description
of comp.lang.c is ISO C):

Is a freestanding environment without any freestanding C implementation
any different from a freestanding environment with one or more
freestanding C implementations?

Dan
 
K

Keith Thompson

The question is relevant to C programming, even if it is not about the
C programming language. The C standard itself mentions the concept of
"freestanding environment", without elaborating on it, hence the OP's
question about concrete examples was legit. And a freestanding
environment is still a freestanding environment even if no C
implementation exists for it...

Ok, you're at least partly correct. I had missed section 5.1.2,
"Execution environments", which defines the terms "freestanding
environment" and "hosted environment".

But since "freestanding environment" is a term defined by the C
standard, I'm not convinced that a freestanding environment (in the
sense that the term should be used in this newsgroup) can exist in the
absence of a C implementation. There can be non-C freestanding
environments, just as the term "byte" can have a non-C meaning that
may or may not match the C definition, but when we talk about "bytes"
and "freestanding environments" here it should be with the
understanding that we're using the terms as they're defined in the C
standard.
We were talking about "freestanding environment", not about "freestanding
implementation", which is something completely different.

If you engage your brain, you may realise the difference...

Certainly there's a difference, but I'd say there's a strong link
between a "freestanding implementation" and a "freestanding
environment" (and likewise for "hosted"). Off the top of my head, I'd
say that a freestanding implementation provides a freestanding
(runtime) environment. That statement may be imprecise or even wrong,
so take it with a grain of salt.

<OT>
On a personal note, I'm getting really tired of the "engage your
brain" taunts. I don't expect you to do anything about it, but I just
had to mention it.
</OT>
 
D

Dan Pop

In said:
Ok, you're at least partly correct. I had missed section 5.1.2,
"Execution environments", which defines the terms "freestanding
environment" and "hosted environment".

But since "freestanding environment" is a term defined by the C
standard, I'm not convinced that a freestanding environment (in the
sense that the term should be used in this newsgroup) can exist in the
absence of a C implementation. There can be non-C freestanding
environments, just as the term "byte" can have a non-C meaning that
may or may not match the C definition, but when we talk about "bytes"
and "freestanding environments" here it should be with the
understanding that we're using the terms as they're defined in the C
standard.

Read the standard carefully. It doesn't really *define* the concept
of freestanding environment, it merely describes the particularities of
C implementations and C programs developed for such an environment.
Which are relevant only if a C implementation exists for that
environment, but the concept of freestanding environment is the same,
with or without a C implementation.

Too bad you didn't follow my advice to engage your brain.
Certainly there's a difference, but I'd say there's a strong link
between a "freestanding implementation" and a "freestanding
environment" (and likewise for "hosted"). Off the top of my head, I'd
say that a freestanding implementation provides a freestanding
(runtime) environment. That statement may be imprecise or even wrong,
so take it with a grain of salt.

It's dead wrong. The freestanding implementation is a set of software
tools:

3.12
1 implementation
particular set of software, running in a particular translation
environment under particular control options, that performs
^^^^^^^^^^^^^
translation of programs for, and supports execution of functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
in, a particular execution environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So, the execution environment exists independently of the C
implementation, because it is the C implementation that targets the
environment, rather than creating it.

Which makes sense: the microcomputer controlling the microwave oven
together with the interface between the microcomputer and the oven (which
are the execution environment) are not provided by any freestanding C
implementation.

This is why it makes perfect sense to talk about freestanding environment
even in the absence of a C implementation, without contradicting the C
standard in any way.

There is no way to tell the difference between a microwave oven
executing a C program and one executing a program written in any other
language. For the simple reason that what they *really* execute
is a machine code program which could have been written in *any*
programming language implemented for that execution environment.
<OT>
On a personal note, I'm getting really tired of the "engage your
brain" taunts.

You'd better take the advice seriously, instead of being tired of it.
I don't expect you to do anything about it, but I just had to mention it.
</OT>

If you (realistically) don't expect me to do anything about it, what's
the point in mentioning it?

I put some serious thought in my posts and it is really annoying to see
them addressed in a superficial manner, as you did in this thread.

Dan
 
M

Mike Wahler

Keith Thompson said:
(e-mail address removed) (Dan Pop) writes:
<OT>
On a personal note, I'm getting really tired of the "engage your
brain" taunts. I don't expect you to do anything about it, but I just
had to mention it.
</OT>

I once got engaged to my brain, but it refused to marry me,
so I gave it up. :)

-Mike
 
K

Keith Thompson

You'd better take the advice seriously, instead of being tired of it.


If you (realistically) don't expect me to do anything about it, what's
the point in mentioning it?

I was in a bad mood. I probably should have set my response aside for
a while before deciding whether to send it. I don't withdraw my
comments, but I probably should have kept them to myself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top