Re: Compiles without Executing
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Thu, 02 Mar 2006 14:37:46 GMT
<niklasb@xxxxxxxxxxxxx> wrote in message news:1141255483.798243.96580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dave wrote:CNerd2025 wrote:[snip]
> My boss, sort of an eccentric guy, came in today and asked if I could
> write a program that:
> a) compiles correctly
> b) is logically correct, and
> c) never executes.
>
Personally I'm inclined to answer "no" to the question; if it compiles
and is correct, then it will run.
...subject to resource limitations. A program may be "logically
correct" and yet fail to run on a computer with limited memory,
for example.
This suggests a possible approach. What if you could write
a program that would work given infinite resources, but can't
actually load and run on ANY real computer? Depending on
how you define "logically correct" this might fit the bill.
To meet the "never executes" criterion, just make sure the
OS can't load the program -- again for resource reasons, like
a data segment too large for available address space. The
program might be "correct" by some definitions and yet none
of its code would ever execute (only OS code).
Nice idea; didn't think of this one. But it seems to assume that the OS, upon encountering a 20GB executable file, for example, won't just load the first 512 kilobytes into memory and leave the rest on disk as it tries to run the program file.
- Oliver
.
- Follow-Ups:
- Re: Compiles without Executing
- From: Rob Thorpe
- Re: Compiles without Executing
- References:
- Re: Compiles without Executing
- From: Dave
- Re: Compiles without Executing
- From: niklasb
- Re: Compiles without Executing
- Prev by Date: Re: Binary tree
- Next by Date: Re: Compiles without Executing
- Previous by thread: Re: Compiles without Executing
- Next by thread: Re: Compiles without Executing
- Index(es):
Relevant Pages
|