1148 AN OBJECT-ORIENTED ENVIRONMENT $36.4 As a result,these optimizations are part of a third form of compilation,finalization, complementing the other two(melting and freezing).For a large system finalization can take a few hours;but it leaves no stone unturned in removing anything that will not be needed and speeding up everything that is not optimal.The result is the most efficient executable form of the system. The obvious opportunity for finalization is the delivery of a system,for a final or intermediate release.But many project leaders like to finalize once a week,at the time of the latest integration. 36.4T00LS The figure on the facing page shows the general organization of the environment.The environment is of course used to bootstrap itself,and is written in the O-O notation(except for some elements of the runtime system,discussed next);this makes it an excellent testbed of the technology,and a living proof that it does scale up to large,ambitious systems (which,of course,we would not want to develop in any other way!). Bench and the development process The centerpiece is Bench,the graphical workbench for compilation,browsing (exploring classes and features),documentation,execution,debugging.When developing a system you will constantly interact with Bench.For example you can melt the latest version by clicking on the Melt button of the Bench's Project Tool,shown below. As long as you are melting and freezing you can stay within Bench.When you finalize a system-also by clicking on a button,although for this operation and many others non-graphical commands are also available-the outcome will be a C program, which the environment will compile to machine code for your platform by calling the appropriate C compiler.Freezing too relies on C as intermediate code.The use of C has several benefits:C is available on just about every platform;the language is sufficiently low level to provide a good target format for a compiler;C compilers perform their own extensive optimizations.Two further advantages deserve emphasis: Thanks to C generation you can use the environment as a cross-development platform,by compiling the generated C on another platform.This is particularly useful for the production of embedded systems development,which typically uses a different platform for development and for final execution. The use of C as compilation technology helps implement the openness mechanisms discussed earlier,in particular the interfaces to and from existing software written in C and C++. Finalized C code,once compiled,must be linked;at this stage it uses the runtime system,a set of routines providing the interface with the operating system:file access, signal handling,basic memory allocation. In the case of cross development of embedded systems,it is possible to provide a minimum form of the runtime,which,for example,does not include any 1/O
1148 AN OBJECT-ORIENTED ENVIRONMENT §36.4 As a result, these optimizations are part of a third form of compilation, finalization, complementing the other two (melting and freezing). For a large system finalization can take a few hours; but it leaves no stone unturned in removing anything that will not be needed and speeding up everything that is not optimal. The result is the most efficient executable form of the system. The obvious opportunity for finalization is the delivery of a system, for a final or intermediate release. But many project leaders like to finalize once a week, at the time of the latest integration. 36.4 TOOLS The figure on the facing page shows the general organization of the environment. The environment is of course used to bootstrap itself, and is written in the O-O notation (except for some elements of the runtime system, discussed next); this makes it an excellent testbed of the technology, and a living proof that it does scale up to large, ambitious systems (which, of course, we would not want to develop in any other way!). Bench and the development process The centerpiece is Bench, the graphical workbench for compilation, browsing (exploring classes and features), documentation, execution, debugging. When developing a system you will constantly interact with Bench. For example you can melt the latest version by clicking on the Melt button of the Bench’s Project Tool, shown below. As long as you are melting and freezing you can stay within Bench. When you finalize a system — also by clicking on a button, although for this operation and many others non-graphical commands are also available — the outcome will be a C program, which the environment will compile to machine code for your platform by calling the appropriate C compiler. Freezing too relies on C as intermediate code. The use of C has several benefits: C is available on just about every platform; the language is sufficiently low level to provide a good target format for a compiler; C compilers perform their own extensive optimizations. Two further advantages deserve emphasis: • Thanks to C generation you can use the environment as a cross-development platform, by compiling the generated C on another platform. This is particularly useful for the production of embedded systems development, which typically uses a different platform for development and for final execution. • The use of C as compilation technology helps implement the openness mechanisms discussed earlier, in particular the interfaces to and from existing software written in C and C++. Finalized C code, once compiled, must be linked; at this stage it uses the runtime system, a set of routines providing the interface with the operating system: file access, signal handling, basic memory allocation. In the case of cross development of embedded systems, it is possible to provide a minimum form of the runtime, which, for example, does not include any I/O
§36.4T00LS 1149 Case Build Analysis,design and Graphicalapplication builder reverse engineering Developer-defined Classes Base (incl.Kernel) General libraries EXTERNAL CODE (C,C++,...) Vision,WEL,MEL... GUI libraries Existing software, Net libraries, utility packages, Client-server library,object exchange low-level access routines... Lex,Parse also Cecil library (calls to O-O Lexical and parsing libraries facilities from C and other languages) Math Numerical and statistical library FAST RECOMPILATION (MELTING ICE), ObjEdit EXECUTION, Run-time object editing Bench BRO WSING, AUTOMATIC Web DOCUMENTATION. Web form processing library DEBUGGING Shelf Finalization (OPTIMIZED COMPILATION) User-contributed reusable components PORTABLE PORTABLE. ANSI-C CODE INTERNET- DOWNLOADABLE C Compilation BYTECODE Runtime system Linking Downloadable Execution Engine Executable System STORABLE Store Persistent Databases Objects (Relational, 0-0) APPLICATION RESULTS
§36.4 TOOLS 1149 APPLICATION RESULTS Numerical and statistical library EXTERNAL CODE (C, C++, …) Base (incl. Kernel) Vision, WEL, MEL… Net Lex, Parse Math Web GUI libraries Client-server library, object exchange Lexical and parsing libraries Web form processing library Run-time object editing ObjEdit Build Build STORABLE Store Bench C Compilation Linking Runtime system PORTABLE ANSI-C CODE Developer-defined Classes Persistent Objects Databases Executable System Graphical application builder Existing software, libraries, utility packages, low-level access routines… also Cecil library (calls to O-O facilities from C and other languages) Shelf User-contributed reusable components Case reverse engineering Analysis, design and FAST RECOMPILATION (MELTING ICE), EXECUTION, BROWSING, AUTOMATIC DOCUMENTATION, DEBUGGING PORTABLE, BYTECODE INTERNETDOWNLOADABLE Finali zation Downloadable Execution Engine (Relational, O-O) (OPTIMIZED COMPILATION) General libraries