Difference between revisions of "Clean System"

From Clean
Jump to navigationJump to search
(Made a Clean System page, by copy/pasting and updating info from the Clean Homepage)
 
(Removed the most outdated parts of the Clean system description. The whole page should still be rewritten.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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 System is a software development system for developing applications in Clean. The Clean System is available on multiple platforms (Windows, Linux & macOS).
  
  
 
== The Clean Integrated Development Environment ==
 
== 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.
+
The Clean System is a lean and stable system that comes with a dedicated Integrated program Development Environment, the Clean IDE.
 +
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 GUI-library, the Object I/O Library.
  
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 Clean IDE is currently only available on Windows. On the other platforms (Linux and macOS) command line tools are available to build and manage your clean projects.
  
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.
+
[[Image:static-compilation-steps.jpg|center]]
  
The IDE communicates with all other components of the system.
+
== The Clean Compiler ==
[[Image:static-compilation-steps.jpg]]
+
The Clean Compiler is the most important component. 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 byte code for the abstract ABC machine.
  
== The Clean Compiler ==
+
[[Image:CleanToAbc.jpg|center]]
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.
 
[[Image:CleanToAbc.jpg]]
 
  
 
== The Code Generator ==
 
== 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).
+
The Clean Code Generator is written in C (for historical reasons) and translates ABC-code into very efficient native object code (.obj or .o files).
[[Image:AbcToObj.jpg]]
+
 
The Code Generator can generate code for the Intel, PowerPC,  Motorola and Sparc processor families.
+
[[Image:AbcToObj.jpg|center]]
 +
 
 +
The Code Generator can generate code for different types of processors.
  
 
== The Static Linker ==
 
== 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.
+
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 executable application.
[[Image:StaticLinker.jpg]]
+
 
 +
[[Image:StaticLinker.jpg|center]]
 +
 
 
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.
 
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.  
 
Some linkers also (will) have the possibility to combine several object modules into one library module.  
Line 29: Line 32:
 
== Time and Space profiling ==
 
== Time and Space profiling ==
 
The IDE communicates with other tools which can help you to write better programs.
 
The IDE communicates with other tools which can help you to write better programs.
[[Image:IDE_Linkers.jpg]]
+
 
 +
[[Image:IDE_Linkers.jpg|center]]
 +
 
 
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 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).
  
Line 35: Line 40:
  
 
== The Dynamic Linker ==
 
== 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.
+
On Windows 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.
[[Image:DynamicLinking.gif]]
+
 
 +
[[Image:DynamicLinking.gif|center]]
 +
 
 
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).
 
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.
 
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.
 
[[Image:IDE_Tools.gif]]
 
Besides the Time Profiler and the Heap Profiler we will incorporate a debugger.
 
 
Under development is a [[Sparkle|Proof System]] which will assist you in proving properties of Clean programs.
 

Latest revision as of 14:55, 27 August 2018

The Clean System is a software development system for developing applications in Clean. The Clean System is available on multiple platforms (Windows, Linux & macOS).


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. 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 GUI-library, the Object I/O Library.

The Clean IDE is currently only available on Windows. On the other platforms (Linux and macOS) command line tools are available to build and manage your clean projects.

Static-compilation-steps.jpg

The Clean Compiler

The Clean Compiler is the most important component. 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 byte code for the abstract ABC machine.

CleanToAbc.jpg

The Code Generator

The Clean Code Generator is written in C (for historical reasons) and translates ABC-code into very efficient native object code (.obj or .o files).

AbcToObj.jpg

The Code Generator can generate code for different types of processors.

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 executable application.

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 Windows 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.