27 Miscelleanous System Support: System

The System module contains procedures providing functionality related to the Mozart Engine.

27.1 System Control

gcDo

{System.gcDo}

Invokes garbage collection.

27.2 Printing

The procedures to print values and virtual strings choose the output device for the printed text as follows:

  1. If Mozart is running standalone, the standard output or standard error device is chosen (depending on the procedure).

  2. Otherwise the Oz Programming Interface is chosen as output device.

The procedures explained here differ from those provided by Open and OS in that they can be used to print information in subordinated computation spaces to support debugging.

print

{System.print X}

The current information on X is printed without a following newline.

The output is limited in depth and width by system parameters that can be configured either by the Oz Panel (see ``Oz Panel'') or by Property.put (see Chapter 23).

A width of n means that for lists at most n elements and for records at most n fields are printed, the unprinted elements and fields are abbreviated by ,,,. A depth of n means that trees are printed to a depth limit of n only, deeper subtrees are abbreviated by ,,,.

The printed text appears on standard output.

show

{System.show X}

The current information on X is printed with a following newline.

The output is limited in depth and width as with System.print.

The printed text appears on standard output.

printError

{System.printError V}

Prints the virtual string V without a newline.

The printed text appears on standard error.

showError

{System.showError V}

Prints the virtual string V followed by a newline.

The printed text appears on standard error.

printInfo

{System.printInfo V}

Prints the virtual string V without a newline.

The printed text appears on standard output.

showInfo

{System.showInfo V}

Prints the virtual string V followed by a newline.

The printed text appears on standard output.

27.3 Miscellaneous

eq

{System.eq X Y ?B}

Tests whether X and Y refer to the same value node in the store.

nbSusps

{System.nbSusps X ?I}

Returns the number of suspensions on X, that is the number of threads and propagators that suspend on X.

onToplevel

{System.onToplevel ?B}

Returns true iff the current thread is executing in the top level space and not within a deep space.


Denys Duchier, Leif Kornstaedt, Martin Homik, Tobias Müller, Christian Schulte and Peter Van Roy
Version 1.4.0 (20080702)