\About
\DThe Concurrent Clean Programming Development System

\c© 1987-1998
\cUniversity of Nijmegen
\cand
\cHILT - High Level Software Tools B.V.
\cNijmegen - The Netherlands

\cThis programming environment for
\cthe lazy functional language Concurrent Clean
\chas been written in Clean.

\dThe Concurrent Clean System
\c is distributed via
\dwww (http://www.cs.kun.nl/~clean)
\cand
\dftp (ftp://ftp.cs.kun.nl//pub/Clean)
\cfor
\dMacintosh, PC (Windows 95/NT,OS/2,Linux) and Sun (Solaris,SunOS).
\d
\EndAbout

\Help

\DThe Concurrent Clean Program Development System

\dDraft Version 1.3 - April 1998

\d© 1987-1998

Concurrent Clean 1.3 is a general purpose, higher order, pure and lazy func-
tional programming language that can be used for the development of se-
quential, parallel or distributed executing real world applications. 

The Concurrent Clean Programming Development System is a special pro-
gramming environment for Concurrent Clean.

\D2. Copyright Notice and Disclaimer

Concurrent Clean and the Concurrent Clean Program Development System 

© 1987-1998

Computing Science Institute
University of Nijmegen
Nijmegen - The Netherlands
and
HILT - High Level Software Tools B.V.
Nijmegen - The Netherlands

e-mail: clean@cs.kun.nl

We do not make any warranty, either express or implied, with respect to this 
software.


\D3. Availability

Concurrent Clean is available for Macintosh, PowerMac, Sun (SunOS, Solaris) and 
PC (Windows, OS/2, Linux).

Clean is a commercial product, so, for commercial use a license is required. 
Please contact:

Rinus Plasmeijer, Department of Computer Science, University of Nijmegen, 
Toernooiveld 1, 6525 ED Nijmegen, The Netherlands

e-mail: rinus@cs.kun.nl

or

e-mail: clean@cs.kun.nl

Concurrent Clean and the Concurrent Clean Programming Development System 
are distributed free for educational and research purposes only! 

Please send us your electronic mail address when you take a copy such that we 
can inform you about important changes and upgrades (mail to 
clean@cs.kun.nl).

Permission is granted to make and distribute copies of this version for edu-
cational purposes, provided the disclaimer, the copyright notice, the Reference 
Manual and the Clean Help file are preserved on all copies. Without a special 
license, the software may not, however, be used for commercial purposes, be 
sold or distributed for profit, or included with other software which is sold or 
distributed for profit.

If you would like to obtain the latest information about Concurrent Clean, have 
bugs to report, or when you have wishes or comments, please send an 
electronic mail to clean@cs.kun.nl or to rinus@cs.kun.nl.

\D4. More information on the language Clean

A description of the syntax and semantics of Concurrent Clean 1.3 can be found 
in the following manual which is included in the distribution:

\jConcurrent Clean
\cLanguage Report
\c- version 1.3 -
\cRinus Plasmeijer and Marko van Eekelen
\cUniversity of Nijmegen

The ideas behind Clean and its implementation on sequential and parallel 
machine architectures are explained in detail in the following textbook:

\jFunctional Programming and Parallel Graph Rewriting
\cRinus Plasmeijer and Marko van Eekelen
\cAddison-Wesley Publishing Company
\c1993
\cISBN 0-201-41663-8

The latest papers on Clean can be found on http://www.cs.kun.nl/~clean.

\D5. The Integrated Development Environment (1.3)

The Concurrent Clean Programming Development System is a programming 
environment for Concurrent Clean written in Clean itself.

The current version 1.3 of the system contains:

¥   An integrated development environment providing an automatic make 
facility, advanced search facilities and a built-in text-editor.

¥   A compiler and code generator for the platform on which the system is 
running. A linker is included that generates stand-alone Mac applications. Such 
an application can also be sub-launched from the Clean system.

\D6. Installation

Please follow the installation descriptions of the distribution which are platform 
dependent.

Make a back-up of your old Clean programs, Clean system and I/O libraries.

Put the Clean compiler, Program Development System, all folders, libraries, the 
Clean Help file in one folder on your Machine. Put the example programs in any 
folder you like. Put related Clean programs (a Clean project) in one folder.

The Concurrent Clean System generates native applications. If you have Virus 
detectors they may complain about this. Clear the protection for the Clean 
compiler and editor. They should be allowed to create, edit and delete other 
files (but not system files). Make sure that you have an original unaf-fected 
Nijmegen version of the Clean System (see availability).

Make sure that the following path names are set in the default paths (choose 
Paths... in the Options menu) such that at least the following standard Clean 
libraries can be found (assuming that the Clean 1.3 application and the libraries 
are put into one folder):

    {Application}:StdEnv:
    {Application}:IOInterface:
    {Application}:MacInterface: (for Mac applications only)
    {Application}:PowerMacInterface: (for PowerMac applications only)

Path names that are printed in italics do not lead to the indicated libraries. 
Remove these paths and add the missing libraries.

It is possible that you have received a version of the Clean System in which the 
object files and/or .abc files of the I/O and arithmetic libraries are not present, 
for example to save disk space and/or copying time. Compilation of an 
application using the I/O libraries may take some time then, because code has 
to be generated for all modules of these libraries. Fortunately this has to be 
done only once, so the next time compilation will be much faster.

\D6. Quick Try

Install the system properly (see Installation).

¥   Double-click on one of the example programs.

The Concurrent Clean System should now launch.

¥   Now select Run in the Commands menu (command R).

The system should compile, generate code, build an application and launch it. If 
all files are already consistent, the project manager will just launch the 
application.

Building the application might not succeed when you have virus detections 
active (see Installation). Launching will not succeed when the generated ap-
plication has not enough memory to run. This is the case when your Mac has 
not enough free memory left. Quit other applications until enough free mem-ory 
is available. It is also possible that you have to quit the Concurrent Clean 
System and launch the generated application from the operating system. It is 
also possible that not the right amount of memory is assigned to the gener-ated 
application. Increase or decrease the amount of memory (see Applica-tion... in 
the Options menu).

The application might not run when you have generated code that is not suited 
for your platform. The generated application will warn you about this situation 
when it is launched. Regenerate the application but now choose the proper 
option for the Code Generator (see Code Generator... in the Options menu).

\D7. Help

The Help window displays the help information you are reading now. It is 
opened by choosing the Help... command in the Window menu.

Use the scroll bar to scroll through the manual.

\D8. System Parts

The Concurrent Clean System version 1.3 consists of the following parts:

¥   The Project Manager
¥   The Text Editor
¥   The Clean Compiler
¥   The Code Generator
¥   The Linker
¥   Libraries for arithmetic, I/O handling, utility modules for interfacing

\dThe Project Manager

The Concurrent Clean Project Manager checks and controls the consistency of all 
the files, windows and options of the system such that  the compilation of Clean 
programs and the creation, execution of applications can be invoked with only 
one command.

All information about a project is remembered such that a second compila-tion 
goes much faster than the first one. The information about a project is stored in 
a file (name.prj) such that projects can be continued in the same status they are 
left.

A Clean program consists of modules that can be compiled separately. There are 
implementation modules (name.icl) and definition modules (name.dcl). Only 
implementation modules can be compiled explicitly, the corresponding 
definition modules are checked automatically.

Modules are hierarchical. The top-most implementation module is called the 
main module or start module. It should contain a Start rule (see the Clean 
Language Report).

The project manager needs to know what the main module is. When this 
module is known all other modules (and the corresponding intermediate files) 
in the hierarchy are examined by the manager. All these files together are 
called a project (see Files). The name of the project is the name of the main 
module. The settings of a particular project are stored in the project file 
(name.prj).

The project manager will scan your disk to find the files it needs. In order to 
restrict the search time the search paths should be set as accurate as possible 
(see Installation and the PathsÉ help information).

By default the implementation module displayed in the active window (see 
Windows) is assumed to be the main module of the project. Any implemen-
tation module can be assigned to be the main module via New ProjectÉ and Set 
Main Module in the Commands menu. The Run or Execute command in the 
Commands menu always reveals what the name of the main module is.

A window can be opened on a file containing a Clean module. The contents can 
be changed with the text editor (see Text Editor). When you generate an 
application, the project manager may warn you when windows and files have 
different contents. The Clean compiler always uses the version on disk, so donÕt 
forget to save your changes before you bring your project up-to-date.

\dModules

¥   Implementation modules

An implementation module (name.icl) consists of a sequence of type, func-tion, 
graph, class, macro and other definitions. These definitions have in prin-ciple 
only a local scope: they only have meaning in the implementation mod-ule they 
are defined in. In the corresponding definition module one can specify which 
types and rules (defined in the corresponding implementation module) are 
exported, i.e. are made visible to the outside world.

¥   The main module

The main module is always an implementation module. In its module header 
the keyword "implementation" can be left out. In that case the main module 
does not need a corresponding definition module. Furthermore, a main mod-ule 
should always contain an explicit or implicit declaration of the Start rule, i.e. 
this rule should either be defined in the start module or
imported from another module. Any implementation module can become a 
main module by inserting a start rule. This is helpful for the debugging of 
modules.

¥   Definition modules

In a definition module (name.dcl) one can specify which definitions (defined in 
the corresponding implementation module) are exported, i.e. are made visible 
to the outside world. All other definitions given in the implementation module 
remain hidden.

¥   System modules

System modules are special definition modules indicated by the keyword 
"system" instead of "definition". This indicates that the corresponding imple-
mentation modules are special system modules. These modules are prede-fined 
and can only be made by system programmers.

\dFiles

Files used by the Concurrent Clean System have certain extensions that indi-cate 
their use. The following kind of files are recognized by the Concurrent Clean 
System:

¥   name.icl

A Concurrent Clean implementation module with the name ÒnameÓ.

¥   name.dcl

A Concurrent Clean definition module.

It is assumed that a .icl file and its corresponding .dcl file are always kept in 
one and the same folder.

¥   name.abc

A (P)abc file generated by the Clean (to Pabc) compiler.

¥   name.obj0, name.obj1, name.obj2, name.o, ...

These are object files generated by the code generator. The extension indi-cates 
the type of processor that the file is generated for (e.g. obj0 = 68000, obj1 = 
68020 without Floating Point Unit, obj2 = 68020 with Floating Point Unit, 
o=powerPC).

The generated abc and object files are stored in the Clean System Files folder 
that will be generated in the folder where the corresponding .icl (and .dcl) files 
are stored.

¥   name.prj

The project file.

¥   name

An application generated by the linker.

¥   name.a, name.asm, ...

An assembly file generated by the code generator.

The generated application and assembly files will be stored in the same folder 
as the corresponding .icl (and .dcl) files.

The .icl, .dcl, .abc, .a files are text files which can be edited by the Concurrent 
Clean editor.

\dWindows

Several kinds of windows can appear on your screen.

¥   .icl window

A window on an implementation module.

¥   .dcl window

A window on a definition module.

¥   Types window

A window that displays derived and checked type information as well as
the derived and assumed strictness information.

¥   Errors window

A window that displays warnings and error messages generated by the sys-tem.

¥   Help window

A window on the Clean Help file.

¥   Project window

A dialog box that displays information on the current project.

Furthermore, the following text windows can be opened:

¥   .abc window contains a file with Pabc machine instructions
¥   any other text file can be opened in a window as well.

All windows above are so-called text windows, with the exception of the Help 
and Project window.

\dThe Text Editor

All text files (see Files) can be edited with the Text Editor using the com-mands 
available in the Edit and Search menus.

The editor has an auto indent facility. When this option is on the editor will 
remember the first non-tab, non-space position at the beginning of the line. 
When a return is typed the cursor will move to the remembered position in the 
next (new) line and the needed amount of tabs and spaces will be added. When 
an option-return is typed the cursor will move to the beginning of the next 
(new) line. The auto indent option can be switched on and off in the Format 
dialog (see Format... under the Edit menu).

The following abbreviations exist in the editor of the Clean System:

\bDeleting:

Backspace delete previous character
Delete delete next character
Option-Backspace delete to begin of word
Option-Delete delete to end of word
Command-Backspace delete to begin of line
Command-Delete delete to end of line

\bCursor movement:

Left one character left
Right one character right
Up one line up
Down one line down
Option-Left one word left
Option-Right one word right
Command-Left begin of line
Command-Right end of line
Option-Up top of window / previous page
Option-Down end of window / next page
Command-Up begin of file
Command-Down end of file

Shift + Any of the Above extend current selection

\bLocating definitions of symbols

The editor also contains two key and mouse combinations with which defini-
tions of imported Clean symbols (functions, types and constructors) can be 
found:

Command + Double-click on a Clean symbol Locates the definition of the symbol 
in its .dcl file.

Command-Shift + Double-click on a Clean symbol Locates the definition of the 
symbol in its .icl file.

The same effect can be achieved by selecting a symbol name and then choosing 
Find Definition (for the .dcl file) or Find Implementation (for the .icl file) in the 
Search menu. Warning: Functions that have no type specification cannot be 
found. When your Clean modules have a (very) unusual lay-out the search 
algorithm might also not be able to find the definitions of Clean symbols. 

Only symbols can be found in files which are located in the folders indicated in 
the path settings.

See also the commands Open Implementation and Open Definition (under the 
File menu).

\dThe Concurrent Clean Compiler

The Concurrent Clean compiler compiles an implementation module to abc-code.

It performs syntactical and semantical checks (see the Clean Language Re-port). 
The corresponding definition module is also checked, as well as the consistency 
between definition and implementation module. Errors are re-ported in the 
Errors window.

(Uniqueness) type information is inferred and checked. Strictness informa-tion is 
inferred with help of the built-in strictness analyser. On demand, the type and 
strictness information is displayed in the Types window.

If no errors are found, abc-code is generated. For each .icl module a file .abc will 
be created in the corresponding Clean System Files folder. This code is input for 
the Code Generator to build an application.

\dThe Code Generator / Linker

The Code Generator takes sequential abc-code as input (an .abc file) and pro-
duces an object file in the Clean System Files folder. The linker links all ob-ject 
files of the project together and builds a Mac application.

By default, the Code Generator generates code for the machine that you are 
working on. If you want to generate code for a different processor, check one of 
the other options. See Code GeneratorÉ in the Options menu.

When you are developing your program you should use the Check Stacks and 
Check Indices options. This will add checks for stack overflows and out-of-
bound array operations. After youÕve convinced yourself that your program 
doesnÕt violate these conditions, you can remove these checks for optimal speed.

Heap and stack space must be allocated to the application. Also other options 
can be set (see ApplicationÉ in the Options menu). These settings take effect the 
next time the application is linked. The current project name (see Execute in the 
Commands menu) determines of which application the options will be set. On 
demand, the Code Generator can produce assembly files. To produce the 
assembly code choose Generate Assembly in the Commands menu. The 
assembly file is generated in the same directory as the Clean icl module with 
the .a extension.

\D9. The Menus

This section describes each of Concurrent CleanÕs menus.

\dThe Apple Menu

\b¥   About Clean SystemÉ

This command opens Concurrent CleanÕs About window.

\dThe File Menu

\b¥   NewÉ

A new window to a new file will be opened with the default name Unti-tled.icl. 
This default name can be changed in the Dialog.

The window can be edited with the Concurrent Clean text editor and its con-
tents can be saved to the file (see Save and Save AsÉ)

\b¥   OpenÉ

Open a window on an existing file.

The standard Open dialog appears.

\b¥   Close

Closes the active (front) window.

A dialog will appear when a text window is closed with a contents different 
from the corresponding file.

\b¥   Open Definition

When a portion of text is selected (for ex-
ample the text "selection") the command is enabled and changes to Open 
"selection.dcl". When this command is chosen it will try to open the corre-
sponding .dcl file. It can be used to quickly open imported modules: just se-lect 
the name of the file in the ÒimportÓ statement and choose this command. For an 
easy way to locate the definitions of imported functions and types see Find 
Definition and Find Implementation under the Search menu.

When no module name is selected, you can specify the module name in a dialogue
box.

\b¥   Open Implementation

This command works the same as the Open Definition command, but now the 
implementation module (.icl file) will be opened.

\b¥   Open Other

This command will open the corresponding .dcl file if the front window is a .icl 
file or vice versa.

\b¥   Save

Save the contents of the active (front) window to the corresponding file.

\b¥   Save AsÉ

Save the contents of the active (front) window to the indicated file. A stan-dard 
New File dialog appears, asking you to specify the fileÕs name and loca-tion.

\b¥   Revert

Reopen the last saved version of the file corresponding to the active (front) 
window. A dialog appears to warn you that the changes made after the last 
time the text was saved will be lost.

\b¥   Quit

Quit the Concurrent Clean System.

\dThe Edit Menu

\b¥   Undo

Undo the last change made in the text of the front window.

\b¥   Cut

Cuts the text currently selected in the front window to the clipboard.

\b¥   Copy

Copies the text currently selected in the front window to the clipboard.

\b¥   Paste

Insert the contents of the clipboard at the current cursor location or replace the 
currently selected text in the front window by the contents of the clip-board.

\b¥   Clear

Clear the text currently selected in the front window.

\b¥   Shift Left / Shift Right

With these commands you can (un)indent the selected text. Warning: undo is not
implemented for these commands.

\b¥   Balance

This commands selects the smallest balanced piece of text that surrounds the 
current cursor position or currently selected text.

This feature can be used to find corresponding open and close symbols in 
Concurrent Clean programs.

The following symbols are considered: Parentheses: '(' and ')' to check expres-
sions, Brackets: '[' and ']' to check lists, Curly braces: '{' and '}'  to check anno-
tations.

\b¥   Select All

Select all text of the front window.

\b¥   FormatÉ

The dialog allows you to assign a new text font and text size to the active (front) 
text window. Also the tab width can be redefined. With the Auto In-dent 
checkbox the auto indent facility of the text editor can be switched on and off 
for the active window.

The newlines option lets you specify with which newline convention the text file
will be saved.

The Use As Default button sets the default font for new files and for files for 
which no font information is available. The Use Default Settings reverts the 
settings to the defaults.

The font settings for a file are stored in the project file. This means that the 
next time you open the file, the font settings will only be restored if you have 
the same project selected.

\dThe Search Menu

\b¥   FindÉ

A dialog appears in which one can define a text to search for (in the Find Box) 
and the text to replace the found text with (in the Replace Box).

By default the Find and Replace starts from the current cursor position or 
currently selected text to the end of the text. On demand the Find and Re-place 
goes backwards to the beginning of the text. When Wrap Around is chosen the 
Find and Replace does not stop at the beginning and end of the text in the 
active window. When Ignore Case is chosen, no distinction is made between 
upper and lower case characters in the text to search for. When the Match 
Words option is checked only whole words will be selected. When the text to 
search for appears as a part of another word it will be ignored. Whole words 
are delimited by outline characters (spaces, tabs, (semi)colons, quotes etcetera).

\b¥   Find Next

When a text has been entered in the Find Box (see Find...) this command 
changes to Find Next. It will find the next piece of text as defined in the Find 
Box. When the Option key is held down the command changes to Find Previ-ous, 
which finds the previous piece of text as defined in the Find Box. When the 
Backwards option is checked in the Find dialog it is the other way around 
(without option: Find Previous, with option: Find Next).

\b¥   Find Selection

The selected piece of text will be entered into the Find Box (see Find...) and the 
next occurrence of the selection will be found. When Option is pressed the 
previous occurrence will be found. When the Backwards option is checked in 
the Find dialog it is the other way around (without Option: find previous, with 
Option: find next).

\b¥   Replace & Find

Replace found text with the text as defined in the Replace Box and find the next 
piece of text as defined in the Find Box (see Find...). When option is be-ing held 
down the previous occurrence will be found. When the Backwards option is 
checked in the Find dialog it is the other way around (without Op-tion: find 
previous, with Option: find next).

\b¥   Find Error

This command selects the next error message in the Errors window and also 
selects the corresponding text line in which the error occurred. When an er-ror 
occurs in a file which is not opened a window on this file will be opened 
automatically. This command only has an effect when the Errors window is 
open.

\b¥   Find Def&Imp

This command searches all modules directly or indirectly imported from the 
module displayed in the active window. A dialog appears in which one can 
define an identifier whose definition or implementation must be searched for 
(in the Find Box).

Find Identifiers locates all occurrences of an identifier. You can use this for 
example to change the name of an identifier in all the modules of a program. 
The search results are displayed in the Errors window. You can use Find Er-ror 
to jump to on occurrence.

If Be Verbose is chosen the file currently being searched is listed.

\b¥   Find Definition

When a Clean symbol (function, type or constructor) is selected this com-mand 
will try to find the definition of this symbol in its definition module. Pressing 
command and double-clicking on the name has the same effect. Macros and 
functions that have no type specification cannot be found. When your Clean 
modules have a (very) unusual lay-out the search algorithm may also not be 
able to find the definitions of Clean symbols.

\b¥   Find Implementation

This command does the same as Find Definition, but now the implementation 
modules will be searched for the symbol. Holding down shift and command and 
double-clicking on the name has the same effect as this command.

\b¥   Goto Cursor

Scroll front window to show the text at the current cursor position.

\b¥   Goto LineÉ

Select the line with the indicated line number. Define the desired line num-ber 
in dialog box. The lines in a text window are numbered starting from 1. The line 
with the indicated line number is selected. For other ways of moving the cursor 
around and selecting lines see the entry Text Editor.

\dThe Commands Menu

\b¥   Compile

Compile the Concurrent Clean implementation module (name.icl) displayed in 
the active window.

Error messages will appear when inconsistencies are found. With Find Error in 
the Search menu the line in which the error was found is selected.

When no errors are found, type information is displayed in the Types win-dow 
when this option was chosen (see Clean CompilerÉ).

A file name.abc will be created in the folder Clean System Files. This folder will 
also be created if it does not yet exist in the same folder where 
name.icl/name.dcl is located.

For more information see the entry Clean. Check the compiler options in the 
Options menu when in doubt. See also the Clean Language Report.

\b¥   Check Syntax

Check the Concurrent Clean implementation module (name.icl) displayed in the 
active window.

Check Syntax does the same as compile, but now no .abc file is generated.

\b¥   Generate Assembly

Generate an assembly file corresponding to the Concurrent Clean implemen-
tation module (name.icl) displayed in the active window. The assembly file is 
placed in the same folder as the icl file and has the extension .a (for example 
name.a).

The assembly file is generated by the Code Generator taken a name.abc file as 
input. This file is generated by the Clean compiler. If the .abc file is not present 
or inconsistent the Generate Assembly command will invoke a com-pilation of 
the implementation module (see Compile).

See also the entries Files and Code Generator.

\b¥   Bring Up to Date

This command will bring the project up-to-date.

This means that, starting from the main module all implementations that are 
inconsistent will be recompiled (see Compile). Also the inconsistent object files 
are regenerated and a new application is build.

Inconsistencies can arise when implementation modules are modified or when 
implementation modules have to be recompiled because they are de-pending on 
modified or recompiled modules.

Convince yourself that the proper project is chosen, either implicitly (activate 
the window of the main module), or explicitly (via Set ProjectÉ).

After an update all files are consistent. Launching of an application can now be 
done without recompilations.

\b¥   Run project-name

This command first brings a Concurrent Clean program up-to-date and then 
launches it.

The Run command will perform the same actions as the Bring Up To Date 
command explained above. In addition the generated application is launched. 
The system will warn you when there is not enough free memory left to launch 
the generated application.

Run is displayed dimmed when no project is chosen (no .icl window in front or 
no project set).

When a launched application is finished, you will return to the Concurrent Clean 
System automatically.  Convince yourself that the proper project is cho-sen, 
either implicitly (activate the window of the  main module), or explicitly (via 
Set ProjectÉ).

\dThe Project Menu

\b¥   New Project

Let the name of the project be the name of the Concurrent Clean implemen-
tation module (name.icl) displayed in the active window. This creates a new 
project file (name.prj) in the same directory as the implementation module.

Implicitly the name of a project is determined by the implementation mod-ule 
displayed in the front window. So, by default such an implementation module is 
taken as the main module. See also the entry Project Manager.

When New Project is chosen any other open implementation module may ex-
plicitly be assigned to be the main module. This feature enables automatic 
compilation and generation of code starting while another window than the 
window on the main module is in front.

The default situation can be reset again by choosing Close Project from the 
Commands menu.

See also the entry Project Manager.

\b¥   Open Project

The standard Open dialog appears allowing one to read in a previously saved 
project. All windows which where open at the moment the project was saved 
will be opened.

\b¥   Set Main Module

Set the main module of the currently active project to the implementation 
module displayed in the front window.

\b¥   Close project

Close the current project. All edit windows containing project modules will be 
closed.

This command can be chosen when a project has been set explicitly via Set 
Project. Now again the implicit default is chosen (see Set Project).

\b¥   Project window

If a project is set, the project window is listed under the project menu. By 
choosing it a dialog box appears which will enable requesting information about 
the project.

\dThe Options Menu

\dClean CompilerÉ

A dialog appears to set the options of the Clean compiler.  Options can be set for 
the current implementation module (.icl file) as well as for new modules.

\b¥   Strictness analyzer

When this option is set the strictness analyser will try to determine whether or 
not the defined functions are strict in their arguments. Strict arguments will be 
marked with '!' in the type definition.

In general, much better code will be generated when this option is set. The 
penalty is that the compilation takes more time.

When you are exporting a function with strict arguments, it is for efficiency 
reasons better to export the strictness information also. You have to do this by 
hand. Define the type specification including the strictness information in both 
the definition and the implementation module.

Strictness annotations defined by the programmer are not checked but taken to 
be true.

\b¥   No Types

No type or strictness information is displayed when this option is chosen.

\b¥   Inferred Types

The inferred types of functions that are not typed by the programmer are 
displayed in the Types window. Strictness information is not displayed.

\b¥   Strict Export Types

The types of functions that are exported are displayed including inferred 
strictness information, but only when the type in the definition module does 
not contain the same strictness information as was found by the strictness 
analyser. This way it is easy to check for all functions if all strictness infor-
mation is exported.

\b¥   All types

The types of all functions including strictness information are displayed in the 
Types window.

\b¥   Show Attributes

Check this box if you want uniqueness attributes displayed in the listed types.

\b¥   Be Verbose

If set additional information about the compilation process is given. Turn it off 
to speed up the compilation.

\b¥   Give warnings

When this option is set also warnings are produced in the Error window. Turn it 
on when you are an inexperienced Clean programmer or when you want to be 
informed about unusual but not erroneous situations.

\b¥   Generate comments

Set this option if you want to be able to read the generated .abc file. Turn it off 
to speed up the compilation process.

\b¥   Reuse unique nodes

Enables compile-time garbage collection for certain unique nodes. See section 4.5.7 in
the Clean Language reference module for more details.

\b¥   Never time profile

Don't generate time profiling information for this module, even if time profiling is
enabled in the Application... dialogue.


\b¥   Never memory profile (PowerMac only)

Don't generate memory profiling information for this module, even if memory profiling
is enabled in the Application... dialogue.

\dCode GeneratorÉ

In this dialog the options for the Code Generator can be set. The code generator 
reads abc files and generates object files.

Options can be set for the current project as well as a default for new projects. 
See Code Generator, Application and Files.

\b¥   Checks (PowerMac only)

One can generate additional code to check the stack boundaries. When you are 
developing an application, set the Check Stacks option on. When you have tuned 
the final application (see Application) and are certain that the stack boundaries 
are not violated, you can turn the options off to speed up execu-tion.

When you are developing an application, set the Check Indices option on when 
you are using Arrays. When you have tuned the final application (see 
Application) and are certain that the index boundaries are not violated, you can 
turn the options off to speed up execution.

By default the .abc files generated by the compiler will be thrown away after 
code generation. Set the Keep abc Files option if you want to keep your .abc 
files. This can be useful when you want to generate code for another proces-sor 
without recompilation or if you are interested in the generated abc code.

\b¥   Processor (PowerMac only)

Choose the proper processor on which the application should run. Also spec-ify 
that a floating point processor is available.

By default, the Code Generator generates code for the machine that you are 
working on. If you want to generate code for another type of machine, check 
one of the other options.

For the Macintosh one has to decide on which class of machines the  applications
should run (PowerMac, 68000/Mac+ or higher, 68020 or higher). Make sure you also
change the search paths in the Paths.... dialog to include the  appropriate interface
(for example include the MacInterface and remove the  PowerMacInterface).

\dLink OptionsÉ

This option is only available when a project is opened. It is used to add extra object
modules and library description files to the project.

For Windows applications you can add ECOFF object files (generated by Microsoft
Visual C), preferably without debug information. For PowerMac applications you
can add XCOFF object files and CodeWarrior library files.

A library description file contains the name of a dynamic library and a list of
symbols that should be imported from that library. For an example of such a library
description file have a look at "kernel_library" for Windows or "library0" for the
PowerMac (both in Clean System Files  of the StdEnv folder).

\dApplicationÉ

In this dialog the run-time options for an application can be set. The application 
for which the options are set is determined by the project name. The current 
name is displayed in the Run command in the Commands menu (command R). 
The options are used when a new application is generated.

Options can be set for the current project as well as a default for new projects.

This version of the Concurrent Clean System is able to generate sequential 
applications. We are working on a code generator that produces parallel code 
for several Macs connected by an AppleTalk network.

\b¥   Configuration

Set the heap space and the maximal amount of space available for the stacks. 
The stack space is created outside the heap space. Initially not all of the
heap is used (the Initial Heap Size). If a garbage collection does not free
enough memory, the heap is expanded (with the factar Next Heap Size Factor)
up to a maximum (the Maximum Heap Size).

For the Macintosh some extra memory is needed for administration. This is
determined by the number of files and  windows that are opened. 40 to 60K
will be enough in general. An application  may crash when this value is
set too low.

The application will stop with a run-time error message when a heap turns out 
to be too small during execution. It will also stops when the stack is too small 
and code is generated to test on the stack boundaries (see Code Generation). 
When the stack boundaries are not checked the program may crash or behave 
unpredictable after a stack overflow.

Increase the space sizes when the application needs more memory. It is also 
possible that the application requires less memory. For an optimal tuning look 
at the run-time information that the application can produce (see below).

The profiling options can be used to measure the performance of your application.
With Time profiling enabled, a Clean program will write a profile file after
execution. This file ("Profile" on the PowerMac, "Profile.pcl" on Windows) can
be inspected with the ShowTimeProfile tool. The time profile file is overwritten
every time you run the profiled application. For the PowerMac you also have to
specify the target processor. You will get a run-time error message if you choose
the wrong processor.

Time profiling can also be useful for debugging. With Time Profiling a Clean
application that unexpectedly halts will print a stack trace of the functions that
lead to the error. This can be used track down stack overflows, out of bounds
array indices and "rule does not match" bugs.

For the PowerMac Memory (heap) Profiling is also available. With Memory profiling
the application writes a number of heap files (heap0 .. heap9). These files are
generated when there is a garbage collection and the heap use is above a certain limit
(the Minimum Profile Heap). The heap files can be inspected with the ShowHeapProfile
application. To generate a new profile you should remove the old heap files, because
they will not be overwritten.

\b¥   Information

An application can produce all kinds of information to make an optimal tuning 
of the memory size to be assigned to the application possible.

The execution time will be displayed when the application stops and Show 
Execution Time is chosen.

Each time the garbage collector is invoked this is displayed when Show Garbage 
Collections is chosen. The run-time system uses both a copying as well as a 
mark-scan garbage collection algorithm. It automatically switches between 
these two garbage collection strategies to obtain an optimal time/space 
behaviour (see Groningen (1991)). This option gives you information about how 
well the heap size was chosen.

In addition, also the sizes of the different stacks are printed when Print Stack 
Size is chosen. This helps to tune the sizes of the stacks.

When Write stderr to file is enabled, the messages in the errors window are copied
to a file with name "Messages" in the current directory.

\b¥   Output

With these options one has control over the way the result of the Start function 
is displayed.

Choose Show Constructors and all constructors and brackets will be shown. 
Choose Basic Values Only if you only want to display basic values only (integers, 
booleans, strings, characters, reals).

Choose No Console if the I/O of the program is handled via the I/O libraries. 
When this option is chosen no console (output window) for the program will be 
provided and the result of the Start function will not be displayed. When the 
Clean program explicitly tries to write to the console a console window will be 
opened. So, when your program terminates unexpectedly probably a run-time 
error has been detected. Choose one of the other Output options and run the 
program again to be able to read the error message.

On the PowerMac the font and size of the generated output on the console can
also be set in the  dialog that appears when the Font button is pressed. This
option has no effect when the output of the program is done via the I/O libraries
of Concurrent Clean.

\dProject ManagerÉ

\b¥   Be Verbose

If set additional information about the process of bringing the project up to 
date is given. Turn it off to speed up the updating.

\dPathsÉ

Define the search paths for the Concurrent Clean System.

A dialog appears in which you can add and remove search paths, i.e. folders in 
which the Clean System will search for files.

There are default settings for any project and settings that are project de-
pendent.

When a folder is added, a standard dialog appears to let you define the folder to 
search for. You choose the folder by selecting one of the files in the folder 
Folders are only examined one level deep, so no sub-folders are searched, 
except for the subfolder Clean System Files. This folder (if it exists) will also be 
examined inside each selected folder.

By default the System will need to find the StdEnv folder in the default paths.

For a project all files that are part of the project have to be found. By default, 
the system will search in the folder where the main module is located. Also the 
Clean System Files folder that is generated automatically in this folder will be 
searched.

When parts of a project are located elsewhere, or when special libraries have to 
be included, the corresponding folders have to be added explicitly to the search 
paths. The Clean System Files folders inside each of these included folders will 
also be searched then.

The Project Manager will complain when it cannot locate the files it needs. A 
dialog will appear that allows you to define the location of these files.

See also Installation.

\dThe Windows Menu

\b¥   Next Window

Activates the window directly under the active window and brings it to front. 
The active window is moved to the bottom of the stack of windows that are 
currently open in the Concurrent Clean System.

\b¥   Show Clipboard / Hide Clipboard

This command opens a window on the Clipboard or closes this window when it 
is already open.

¥   Help...

This command opens Concurrent Clean's Help window or brings it to the front if 
it is already open.

¥   Save All

This command saves the contents of all open windows.

See also the Save command in the Files menu.

¥   Close All

This command closes all open windows.

See also the Close command in the Files menu.

¥   Other open windows

All open windows are listed under the Windows menu. The window in front is 
marked. By choosing a window name in the menu the corresponding win-dow 
will be made active and brought to front.

\D11. Bugs

If you have bugs to report, please send us a short description with a tiny
example via electronic mail (clean@cs.kun.nl) and we will try to fix it as
soon as possible.

\D12. Authors & Credits

The Concurrent Clean System is developed by:

¥ Peter Achten, Sequential and distributed Event I/O, I/O library support
for the Mac.
¥ John van Groningen: Clean compiler, Code generators (Mac (Motorola,
PowerPC), PC (Intel), Sun (Sparc)), Low level interfaces, all machine
wizarding.
¥ Martin van Hintum: Clean IDE.
¥ Marko Kesseler: Parallel code generator (ParSyTec (Transputer)).
¥ Eric Nšcker: Strictness analyser via abstract reduction, I/O library
support for OS2.
¥ Leon Pillich:  I/O library support for the Sun.
¥ Sjaak Smetsers:  Clean compiler, All type systems (including uniqueness
typing and type classes),
¥ Ron Wichers Schreur: Programf Development System, Parser, Support
¥ Robert Holwerda: I/O library support for Windows '95
¥ Rinus Plasmeijer &  Marko van Eekelen: Clean language design.
¥ Rinus Plasmeijer: Overall design and implementation supervision.

Concurrent Clean and the Concurrent Clean System are a spin-off of the 
research performed by the research group on functional programming 
languages, Computing Science Institute, at the University of Nijmegen under the 
supervision of Rinus Plasmeijer.

\iSpecial thanks to the following people:

Christ Aarts, Steffen van Bakel, Erik Barendsen, Henk Barendregt, Pieter Hartel, 
Hans Koetsier, Pieter Koopman,  Ken McDonald, Ronan Sleep and all the Clean 
users who helped us to get a better system.

\iMany thanks to the following sponsors:

- the Dutch Foundation for Applied Technical Sciences (STW);
- the Dutch Foundation for Scientific Research (NWO);
- the International Academic Centre for Informatics (IACI);
- Kropman B.V., Installation Techniques, Nijmegen, The Netherlands.
- Hitachi Advanced Research Laboratories, Japan;
- the Dutch Ministry of Science and Education (the Parallel Reduction Machine 
project (1984-1987)) who initiated the Concurrent Clean research;
- Esprit Basic Research Action (project 3074, SemaGraph: the Semantics and 
Pragmatics of Graph Rewriting (1989-1991));
- Esprit Basic Research Action (SemaGraph II working group 3646 (1992-
1995));
- Esprit Parallel Computing Action (project 4106, (1990-1991));
- Esprit II (TIP-M project area II.3.2, Tropics: TRansparent Object-oriented 
Parallel Information Computing System (1989-1990)).

\EndHelp
