In ``The Java Language Environment: A white Paper,''[GM96] Sun describes Java as follows:
Java: A simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multithreaded, and dynamic language.
We might be tempted to define a portable program as ``one that fulfills its function on any platform''. However, this definition is very hard to apply because the ``function'' of each program is specific to that program. Using this definition, we cannot evaluate the portability of a program without (ultimately) understanding the requirements of its users; this definition blurs the distinction between portability and quality.
However, we can determine a simple specification without understanding the requirements of the user: normal termination. The Java language defines two exit paths for any procedure: a normal termination, expressed as an exit or return, and an abrupt termination, expressed as a throw of an exception. Clearly, a program has failed to operate normally when the program as a whole terminates abruptly due to an uncaught exception.
For testing the portability and ``purity'' of a Java code, a 100% purity test has been implemented by SUN. This test is a program which gives some hints of which parts of the input code is not portable. Of course termination of programs cannot be evaluated.
|
|