claire options
option index Command line help Core command line option

{-h | -help} +[<m> | <option> | <index>]

Where

Display an option index. When <module>, <option> or <index> are given the full help is displayed for the requested entities.


option index About box Core command line option

-about

Display an about message.


option index Memory initialization Core command line option

[-auto-s <main> <world>

Where

Sets parameters used to initialize CLAIRE memory. The main/world memory is increased in a chunk of a two exponent of <main>/<world> argument. The main memory is used for normal object allocation and the world memory is used to store defeasible updates.

When <-auto> is specified the memory is silently allocated to its maximum but still constrained in a chunk as specified by the <-s> option. The option <-auto> takes effect around memory congestion (near an overflow) where it let the concerned memory to be silently increased such a program that require more memory (than specified by the <-s> option) can achieve it task. A program ran in <-auto> will take advantage of modern OS that actually manage true virtual pages. The <-auto> flag only controls the memory congestion issue but never perform any de-congestion.


option index Verbose Core command line option

-v [<m><level>

Where

Sets the system verbosity level. Any trace instruction with a level lower or equal to <verbose> are issued and others prevented. When <m> is specified the verbosity of the given module is set instead.


option index Exit now Core command line option

-q [<exitcode>]

Where

Exit now, do not process the end of the command line, do not start an interpreter. When <exitcode> is specified, it is used as the program exit code which is 0 otherwise.

The <-q> option is always reached even if an exception has occurred before.


option index Early termination Core command line option

-qonerror | -errassegv

These options produce an early termination when an uncaught exception occurs. With <-qonerror> the program will exit with code 1 and with <-errassegv> it will raise a segmentation violation signal.


option index Avoid banner Core command line option

-nologo

Avoid the banner message to be displayed at startup.


option index Avoid editline Core command line option

-noel

Do not use editline for the interpreter.


option index Terminal color Core command line option

-color | -nocolor

Enable (or not) the support for terminal colors. Disabled by default.


option index Trace file Core command line option

-trace [a | append] <file>

Where

Redirect traces to <file>. The file is overwritten unless 'a' or 'append' is specified. Traces depends on the verbosity level (see option <-v>).


option index Sampling Cmemory Core command line option

-sample <period>

Where

Perform photos of Cmemory at intervals of <period> milliseconds. A file clmeormy.samples is issued and may be used with gnuplot to produce a graph.


option index Change directory Core command line option

-chdir <dir>

Where

Change the current working directory to <dir>


option index Debugger Language command line option

-debug

Make the loaded code instrumented for debug


option index Load file Reader command line option

{-f | -ef} +[<file>]

Where

Load the CLAIRE file(s) <file>. The given path may contain an extension assuming .cl by default. When the <-f> option is used, the file is assumed to contain CLAIRE definitions (variables, class, methods) whereas <-ef> attempts to read a file made of CLAIRE expression.


option index Eval expression Reader command line option

{-princ | -print | -eval<exp>

Where

Eval the CLAIRE expression <exp>. If <-princ> or <-print> is used instead of <-eval>, the result of the evaluation is princed/printed on the standard output. Often, the hosting shell support quotes allowing <exp> to contain space and/or special chars.


option index Load script Reader command line option

{-x | -xe | -x<S>-<W> | -xe<S>-<W><file> [<args>]

Where

Load the CLAIRE file <file> with implicit options -nologo and -q. If the option starts with -xe the file is assumed to contain CLAIRE expressions. When <S> and <W> are specified they are used to initialize CLAIRE memory (see -s option). Unix users may use this option for for a shell script header (e.g #!/usr/local/bin/claire -x). If the shell command contains any arguments (<args>) one should handle them in the script through the system variable 'system.params'.


option index Goto definition Reader command line option

-gotodef [<dir>] [<s>]

Where

Output definitions of <s> from directory <dir> (or . if undefined) and exit. Are accounted calls to the property <s> and definition of found restrictions. If <s> isn't specified then $TM_CURRENT_WORD is used instead (TextMate.app make this variable available).


option index Generate documentation Reader command line option

[-doclink] [-onefile | -categories] {-apidoc | -codedoc<m>

Where

Generate the documentation of the module <m> from source files. When -apidoc is used, the documentation will reference definitions that have a @doc tag in their comment whereas -codedoc considers all definitions.

The generated documentation will contain a single HTML file when -onefile is given or a per category file when -categories is specified, otherwise both are generated.

Last, when -doclink is specified then with each definition is associated a link to the source file that contain the definition.


option index No ffor construct Optimize command line option

-noffor

Compiles ffor instructions without using fork.


option index Compiler environment Generate command line option

-env <env>

Where

Sets the compiler environment to <env>. This is an expert option used for cross-compilation.


option index Link with module Generate command line option

-m <m>[/<version>] | -l <library>

Where

claire <-m> <m> loads the module <m> in the system and add it to the list of linked modules. You may specify a <version> to focus on particular version of the module.

You may additionnaly link with a particular library using the <-l> option.


option index Output directory Generate command line option

-od <directory>

Where

Sets the output directory for generated C++ files.


option index Safety Generate command line option

-safe | -os <safety>

Where

Controls compiler safety. <-safe> put the compiler in the safest mode and <-os> set the safety to a particular level :

0 : Super-safe, the type of each value returned by a method is checked against its range, and the size of the GC protection stack is minimized. All assertions are checked.

1 : Safe (default).

2 : We trust explicit types & super. The type information contained in local variable definition (inside a let) and in a super (f@c(...)) has priority over type inference and run-time checks are removed.

3 : No overflow checking (integer & arrays), in addition to level 2.

4 : We assume that there will be no selector errors or range errors at run-time. This allows the compiler to perform further static binding.

5 : We assume that there will be no type errors of any kind at run-time.

6 : Unsafe (level 5 + no GC protection). Assumes that garbage collection will never be used at run-time.


option index Output name Generate command line option

-o <name>

Where

Sets the output executable file name.


option index Optimization Generate command line option

-D | -O

Adjust the optimization level. <-D> generates a code instrumented for the CLAIRE debugger without any optimization (implicitely implies -debug). <-O> enable CLAIRE compiler optimization.


option index Profiler Generate command line option

-p

Enables profiling. The generated code is instrumented for profiling.


option index C++ compiler Generate command line option

-cpp <cxxoption> | -link <linkeroption> | -make <makeroption>

Where

Customize the generated makefile by adding some options to the C++ compiler and linker command lines and additionaly some maker option.


option index Compile module Generate command line option

{-cc | -cl | -cm} [<m>]

Where

Compile the module <m>. If <m> is unspecified the last module defined in the init.cl from the current directory is taken.

The <-cc> option is the lightest compiling strategy for a module: claire <-cc> will produce a C++ file for each claire file in <m>.made_of. It does not produce a makefile or system file, and assumes that the user want to keep a complete control over the generation of the executable.

A more friendly option is <-cl>, which adds a linking step so that all generated C++ files are compiled and linked into a library <m>.lib (the name of the library can be redefined with -o or by using the external slot of the module).

The easier way to use the compiler is the <-cm> option which produces an executable from a module. It is similar to <-cl>, but in addition it produces a system file for the module that is being compiled and a makefile which is executed by claire, producing an executable that includes the interpreter.


option index Compile module library Generate command line option

[-both] {-cls | -call [-sm <m>] [-em <m>]}

Where

<-cls> compiles a release module library for the current module. When <-both> is specified a debug version is also generated.

<-call> attempts to do so for a set of module located in subdirectories. If <-sm> (resp. <-em>) is specified (and match a module located in a sub directory) then any modules before (resp. after) this one are not recompiled.


option index Module publication Generate command line option

[-sudo] [-ov] {-publish | -export [<i> | <directory>]}

Where

Perform a module publication. A published module can be used by other modules or linked with a program (see option <-m>). The publication consist of a copy of the module (i.e. headers, library, init file and sources).

With the <-publish> option, the copy is placed in the CLAIRE home folder. It is intended for general purpose modules that may be used by any program. According to the permission of the current user, the publication may fail. One, that have sudoer privileges may specify <-sudo> option such the copy is acheived from a sudoed process.

The <-export> option is an alternative that allow local publication. The user may define a CLAIRE_LIBS environment variable that tell CLAIRE where to find exported modules. CLAIRE_LIBS should contain a list of path separated by a ':' (path separator). The path where the module is exported is determined as follow :

- The <i>th path of CLAIRE_LIBS list

- The given <directory>

- By default, the first path of CLAIRE_LIBS list

Last, one have to specify <-ov> to force the overwrite of an existing publication.


option index New module Generate command line option

-nm [<partof>/]<name> +[<m> | <f>{.cpp | .cl | .h}]

Where

Create a new module with name <name>. If <partof> is specified the new module is created as a part of <partof>. You may specify a list of used module <m> and a list of source file <f> for this module.

A new directory is created with the name of the module, it contains an init.cl that defines the CLAIRE instance, when specified subdirectories containing emtpy source files are also created.

The option <-nm> is always the last command line option, following arguments have to be a module (<m>) or a source file (<f>).


option index Module info Generate command line option

-ml | {-mi <m>[/<version>]}

Where

Provide a list of available module or with <-mi> informations relative to a partivular module.

These options are always the last command line option, following arguments are ignored.


option index Configuration file Generate command line option

-cx <test>

Where

When claire <-cx> <test> is invoked, the compiler takes a claire configuration file <test>, produces an equivalent C++ file and another C++ file called the system file. The first file is named <test>.cpp and the second file is named <test>-s.cpp. They are both placed in the directory source(compiler). The output name may be is changed with the <-o> option. The generated files are compiled and linked directly by claire. This is done by producing a makefile <test>.mk that links the generated binaries with the necessary claire modules. The option <-cx> is used to generate multi-module executable and is aimed at serious claire developers. A configuration file is a file that contains only methods without any type-checking ambiguity.


option index No init Generate command line option

-n

Prevent to load an init.cl file that is loaded by default.


option index Fast dispatch Generate command line option

-fcall

Prints a list of uniform properties candidate for fast dispatch and exits.


option index Console Generate command line option

-noConsole | -wclConsole

Do not build an interpreter. <-wclConsole> is used to generate a web agent that works behind an HTTP server (e.g. behind mod_wcl & Apache).