next up previous
Next: Speed Up: PortabilityEfficiency, Benchmarks, also Previous: PortabilityEfficiency, Benchmarks, also

Portability

Simply because an application program is written in a standard high-level language does not mean that it can be moved without change from one machine to another. Or that when moved, it will operate 100% identically. In fact the industry has a constant burden of porting a an allegedly working program from a machine to itself after an operating system or library upgrade.

Even Java has been widely ridiculed for its current state, characterized as ``Write Once Debug Everywhere.'' Code cannot be expected to run on both Netscape and Internet Explorer unless debugged on both, and since one cannot tell for sure what is running on a remote client, in all versions, past and future. Nevertheless we should distinguish between bugs in implementations and more fundamental sources of non-determinism that would still remain.

Consider:

``Except for timing dependencies or other non-determinisms and given sufficient time and sufficient memory space, a Java program should compute the same result on all machines and in all implementations."

--Preface to The Java(TM) Language Specification

In fact even single threaded Java is non-deterministic. For example, the order finalize methods on garbage collected objects get called is not specified by the language.

Rigorous approaches to fully portable code typically require replacement of all interfaces to particular OS features by some set of abstractions which must be implemented on all hosts (e.g. Macintosh, Microsoft, POSIX, each bus, disk, etc architecture.)

Or (in the past) by full emulation of instruction sets etc.

A more reasoned approach is to hope for

a. Modular re-use with only minor adaptation (most programs continue to work) and

b. Identical results on exact data types (strings, bits);

c. Identical exact arithmetic (given sufficient integer word size);

but perhaps something less on Floating-Point arithmetic!

Why not 100% identical results?

While 100% is achievable, it is probably a bad idea for numerical results:




next up previous
Next: Speed Up: PortabilityEfficiency, Benchmarks, also Previous: PortabilityEfficiency, Benchmarks, also

Richard J. Fateman
Fri Aug 14 11:13:05 PDT 1998