Difference between revisions of "Melting Ice Technology"

m (Compiled versus interpreted)
Line 13: Line 13:
 
Finalized code has only two advantages, smallness and speed. Whereas the former contributes to the latter due too better cache efficiency. Finalized code can only be debugged at the C level. This article focuses on the workbench mode of EiffelStudio
 
Finalized code has only two advantages, smallness and speed. Whereas the former contributes to the latter due too better cache efficiency. Finalized code can only be debugged at the C level. This article focuses on the workbench mode of EiffelStudio
  
==Compiled versus interpreted==
+
====Compiled versus interpreted====
 
EiffelStudio was designed with the following principle in mind: When a programmer makes a small change he expects a short recompilation time, when he makes a big change he will accept some waiting time.  
 
EiffelStudio was designed with the following principle in mind: When a programmer makes a small change he expects a short recompilation time, when he makes a big change he will accept some waiting time.  
  

Revision as of 12:21, 9 January 2007

There are two main criteria for any good compiler. Both the compilation and the compiled program need to be fast. There is a trade off, the more time a compiler takes to make optimizations, the faster the compiled program is and the slower the compilation process becomes.

Fortunately the need for fast compilation and fast compiled programs occurs at different times during the development cycle. When the developer is incrementally writing and testing a program he needs short compilation time to be productive. At the end, when his work is thoroughly tested and ready to ship there can be one more compilation that needs to generate a very fast delivery but can consume more time.

EiffelStudio exploits this by providing two basic compilation modes: workbench and finalized mode. The C code generated by the compiler looks different for workbench and finalized mode. The terms workbench code and finalized code are used to refer to the corresponding generated C code.

Workbench code has the following properties:

  • It is easily testable (by debugging).
  • It compiles and recompiles very fast (due to melting ice technology).
  • It supports precompiles.

Finalized code has only two advantages, smallness and speed. Whereas the former contributes to the latter due too better cache efficiency. Finalized code can only be debugged at the C level. This article focuses on the workbench mode of EiffelStudio

Compiled versus interpreted

EiffelStudio was designed with the following principle in mind: When a programmer makes a small change he expects a short recompilation time, when he makes a big change he will accept some waiting time.

Traditionally, the fastest programming environments (in terms of recompilation time) were interpreted languages (like VisualBasic). Unfortunately interpreted languages are not competitive performance wise.

The designers of EiffelStudio circumnavigated the trade off by taking the best of both approaches. Thus, in workbench mode EiffelStudio is half compiler and half interpreter. The technology behind this is called melting ice.

An Eiffel System compiled in workbench mode consists of both frozen and melted code. Frozen code is code, that is translated to C code. Melted code is not yet translated to C code but to a form of byte code that has to be interpreted. This byte code is called EiffelStudio byte code.