Camelot the System

Compiler options

As of version 3.1 of the Camelot compiler the following compile time options are available.

-h, -help

Output this help message.

-a1, -absyn1

Print normalised abstract syntax.

-a2, -absyn2

Print monomorphised normalised abstract syntax.

-ab, -asdl-bin

Like -a2 but write the syntax to an ASDL binary pickle file (.asdl.bin).

-as, -asdl-sexp

Like -ab but write an ASDL S-expression pickle file (.asdl.sexp).

-b, -debug

Debug mode. Implies verbose. Gives some probably useless information. Pages of output per function, mainly type inference and monomorphisation related.

-c, -classnames

Rather than saying \"compiled ...\", just print out the names of the classes which have been generated (this was for use in the online demo)

-cp dirlist, -classpath dirlist

This option is for use with object-oriented Camelot extensions. <dirlist> consists of a colon-separated list of directory names in which the compiler will look for JVM classes (including the standard Java libraries). If the compiler needs to look for classfiles and no -cp option is given then directories listed in the environment variable CAMELOT_CLASSPATH will be used; if this variable is not set then the compiler will use ${HOME}/classes:. . If you're using the shell variable, don't put a ~ in any of the paths: use $HOME instead. See also the -j and -m options.

-d dir

Write the output classes into directory dir.

-D, -diamond-layout

Print information about structure of diamond class

-f, -freelist

Print debugging information about behaviour of freelist allocation during execution.

-g, -grail

Output Grail to .gr file (no class file)

-grail-cases

Compile Camelot matches using the experimental Grail case construct

-hints, -proof-hints

Output a file ...-HINTS.asdl.bin containing proof hints

-j, -java-rt

Same as -cp /group/project/mrg/java_rt_sun-1.4.1:. (For compiling with the standard Java class hierarchy on DICE machines in Edinburgh)

-l, -linear

Turn on linearity checking

-lfd

Create .lfd file and call lfd_infer

-ll, -layered

Turn on layered sharing checking and inference (needs deel_uapl_prg)

-lu, -usage-aspects, -readonly

Turn on usage aspects checking and inference (needs deel_uapl_prg ) (NOT YET),

-lb, -debug-usage

Debug the layered sharing and usage aspect inferences

-m, -midp

Same as -cp /group/project/mrg/midp-1.0.3_classes:. (Useful for compiling with the MIDP 1.0 API on DICE machines in Edinburgh)

-N, -nodiamonds

Use the original datatype scheme: one Java class for each datatype (may not work any more).

-n, -no-tail-call-elimination

Turn off tail-call elimination.

-no-consolidation

Turn off Grail local variable consolidation.

-od, -optimise-destruction, -auto-destruction

Turn on destruction inference (works only with -ld or -lu) (NOT YET).

-r, -record-freelist, --record-freelist

Record information about the freelist. Programs can recover this information by calling diamond_info: unit -> string

-readable

Omit argument lists from Grail output: the program probably won't execute, but it's easier to read.

-s, -silent

Silent mode. Suppress all textual output when compiling correct programs.

-show-all

Show adpator functions when printing abstract syntax.

-t, -time

Print the current date and time

-thy,

Emit Isabelle theory files

-v, -verbose

Verbose mode. Does nothing.

-x, -exit

Exit from compiler immediately

Hints on Performance Tuning

Internals of compilation and execution