alice
library
manual.

Alice Project

The Debug structure


________ Synopsis ____________________________________________________

    signature DEBUG
    structure Debug : DEBUG

A structure that prints debug information according to a specified debug level.

See also: PROBLEM, SEARCH.


________ Import ______________________________________________________

    import signature DEBUG from "x-alice:/lib/gecode/search-factory/DEBUG-sig"
    import structure Debug from "x-alice:/lib/gecode/search-factory/Debug"

________ Interface ___________________________________________________

signature DEBUG =
sig

  type db_mask = Word31.t

  infix &&
  infix ||
  val && : db_mask * db_mask -> db_mask
  val || : db_mask * db_mask -> db_mask

  val newDB : unit -> db_mask

  val dbExc    : db_mask
  val dbRecomp : db_mask
  val dbClone  : db_mask
  val dbBaB    : db_mask
  val dbSearch : db_mask
  val dbSlow   : db_mask

  val dbZero   : db_mask
  val dbNone   : db_mask
  val dbAll    : db_mask

  val localPrint : (string -> unit) ref
  val dbPrint  : db_mask * db_mask * string -> unit

end

________ Description _________________________________________________

type db_mask

The type of debug masks (a word).

mask1 && mask2

Returns a mask equal to the logical and operation on masks. Note that if you want to have a mask containing two masks m1 and m2, you have to use || instead.

mask1 || mask2

Returns a mask equal to the logical or operation on masks. Use this operator to combine two masks.

newDB ()

Returns a new mask.

dbExc

A mask for printing exceptions.

dbRecomp

A mask for printing information related to recomputation.

dbClone

A mask for printing information related to cloning of constraint spaces.

dbBab

A mask for printing information related to Branch & Bound.

dbSearch

A mask for printing information related to search.

dbSlow

A mask that considerably slows down the search (a 800 millisecond pause is inserted between each node).

dbZero dbNone

The empty mask (no bit active).

dbAll

The full mask (all bits active).

localPrint

A reference to the function used to print stuff. By default, contains print.

dbPrint (mask1, mask2, message)

Prints the given message (using !localPrint) only if mask1 || mask2 is not empty.



last modified 2007/Mar/30 17:10