Java Reference
In-Depth Information
unrealistic expectations concerning how well a compiler can use large-
scale systems without changing an application. While compilers contin-
ually improve [Wol95, AK01], languages are also evolving [CGS + 05] to
address these challenges.
For some programming languages, runtime checks for data and program in-
tegrity are dropped in favor of gains in execution speed. Programming errors
can then go undetected because of that fear that extra checking will slow
down execution unacceptably. The cost of software development and the con-
sequences of program failure have reversed that trend for most programming
e
ff
orts. A major complexity in implementing Java is e
ciently enforcing the
runtime integrity constraints it imposes.
1.8 Compiler Design Considerations
Compilers are often biased for a particular kind of deployment or user base. In
this sectionwe examine some commondesign criteria that a
ff
ect howcompilers
are crafted.
1.8.1 Debugging (Development) Compilers
A debugging compiler such as CodeCenter [Cod] is specially designed to
aid in the development and debugging of programs. It carefully scrutinizes
programs and details programmer errors. Often it can tolerate or repair minor
errors (for example, insert a missing comma or parenthesis). Some program
errors can be detected only at runtime. Such errors include invalid subscripts,
misuse of pointers, and illegal file manipulations.
These compilers may include the checking of code that can detect run-
time errors and initiate a symbolic debugger. Although debugging compilers
are particularly useful in instructional environments, diagnostic techniques
are of value in all compilers. In the past, development compilers were used
only in the initial stages of program development. When a program neared
completion, compilation switched to a production compiler , which increased
compilation and execution speed by ignoring diagnostic concerns. This strat-
egy has been likened by Tony Hoare to wearing a life jacket in sailing classes
held on dry land, but abandoning the jacket when at sea [Hoa89]! Indeed, it is
becoming increasingly clear that for almost all applications, reliability is more
important than speed. For example, Java mandates runtime checks that C and
C
do not.
For production systems where quality is a paramount concern, detecting
possible or actual runtime errors is crucial. Tools such as purify [pur] can
add initialization and array bounds checks to already compiled programs,
++
 
 
 
Search WWH ::




Custom Search