Clean System

From Clean
Revision as of 15:51, 11 August 2008 by Bas Lijnse (talk | contribs) (Made a Clean System page, by copy/pasting and updating info from the Clean Homepage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The Clean System is a software development system for developing applications in Clean. The Clean System is available on many platforms (PC, Mac, SUN) and operating systems (Windows'95/'98/2000/NT, Linux, MacOS, Solaris). Our main platforms are PC and Mac.


The Clean Integrated Development Environment

The Clean System is a lean and stable system that comes with a dedicated Integrated program Development Environment, the Clean IDE. The IDE is the kernel of the Clean System which forms the interface to the programmer.

It consists of a dedicated editor and project manager which enables the programmer to generate and launch an application with just the push of a button. The Clean IDE is written in Clean using Clean's powerful GUI-library, the Object I/O Library.

The latest version 2.0 of the IDE is currently only available on the Wintel and MacOS/PowerPC platform. On the other platforms a much more restricted and older version of the IDE is available.

The IDE communicates with all other components of the system. Static-compilation-steps.jpg

The Clean Compiler

The Clean Compiler is the most complicated part of the system. Clean is a modular language consisting of definition modules (.dcl files) and implementation modules (.icl files). The Clean Compiler translates Clean source code to platform independent ABC-code (.abc files), a kind of byte code. CleanToAbc.jpg

The Code Generator

The Clean Code Generator is written in C (for historical reasons) and translates ABC-code into very efficient state-of-the-art native object code (.obj files). AbcToObj.jpg The Code Generator can generate code for the Intel, PowerPC, Motorola and Sparc processor families.

The Static Linker

Finally, the Static Linker which is written in Clean combines all the object code and special code (the Clean Run Time System including automatic garbage collectors) into an normal executable application which can launched by clicking on its icon or by the IDE. StaticLinker.jpg The Static Linker is an optimizing linker, it will not link in unused functions. It can also link in C code. There are several kinds of Clean libraries available which can help to reduce the amount of code you have to write significantly. Some linkers also (will) have the possibility to combine several object modules into one library module.

Time and Space profiling

The IDE communicates with other tools which can help you to write better programs. IDE Linkers.jpg There is a Time Profiler to measure the amount of time functions are consuming. Time consuming functions can be tuned by writing better algorithms or by using one of the many facilities Clean offers to speed up execution (strictness annotations, uniqueness typing).

There is a Heap Profiler to measure the space consumption which can help you to find "space leaks".

The Dynamic Linker

On the Wintel platform an alternative for the static linker is available, the Dynamic Linker which is again written in Clean. The Dynamic Linker does the same work as the Static Linker, but the difference is that the Dynamic Linker links object code to a running Clean application. DynamicLinking.gif An executing Clean application can communicate with the Dynamic Linker and request to plug-in some Clean function defined in some specific Clean module. If the object code is not available the Dynamic Linker can ask the Code Generator to generate it just-in-time. It would also be possible to ask the Clean Compiler to compile Clean source code just-in-time (this option is not chosen because you might run into compilation errors). The Dynamic Linker can also deal with Dynamics, a new feature of Clean 2.0. Dynamics are dynamically typed Clean expressions that can be stored on disk with just one Clean function call. Dynamics can contain code as well as data and when they are read in their types can be checked dynamically via pattern matching.

Proof System, Debugger

In the future the new IDE will communicate with even more tools. IDE Tools.gif Besides the Time Profiler and the Heap Profiler we will incorporate a debugger.

Under development is a Proof System which will assist you in proving properties of Clean programs.