Prolog flags
A flag is an atom with an associated value. The following flags are currently supported:
- compiling: Instruct the compiler about the type of code to generate. This flag has three different values: compactcode (default), debugcode, and profilecode.
- debug: Turn the debugger on or off.
- double_quotes: The possible values are chars, codes, and atom. The default value is codes. If the value is codes, then a string is represented as a list of codes; if the value is chars, then a string is represented as a list of characters; if the value is atom, then a string is represented as an atom.
- gc: Turn the garbage collector on or off (see Section 10.2 on Garbage collection).
- gc_threshold: Set a new threshold constant (see Section 10.2 on Garbage collection).
- macro_expansion: The possible values are on and off. The default value is on. If this flag is on, macros (predicates that are defined with single clauses) in a program are expanded when they are compiled.
- max_arity: The maximum arity of structures (65535).
- max_integer: The maximum integer (268435455).
- min_integer: The minimum integer (-268435456).
- redefine_builtin:
The flag value can be either on or off. If it is on, then built-in predicates can be redefined; otherwise, they cannot. The default value is off.
- singleton:
This flag governs whether or not warning messages about singleton variables will be emitted. The value is either on or off, and the default value is on.
- warning:
This flag governs whether or not warning messages will be emitted in general. The value is either on or off, and the default value is on.
- contiguous_warning:
This flag governs whether or not warning messages will be emitted upon compilation or consultation of a program that contains discontiguously defined predicates. The value is either on or off, and the default value is on.
- stratified_warning:
This flag governs whether or not warning messages will be emitted upon compilation of a tabled program that contains undefined predicates. For a tabled program in a file, all of the predicates that are defined outside the file must be stratified, i.e., they cannot form a negative loop with any predicate that is defined in the file. The value is either on or off, and the default value is on.
- unknown:
The value is either fail, meaning that calls to undefined predicates will be treated as failure, or error, meaning that an exception will be raised. The default value for the flag is error.
Users can change the value of a flag to affect the behavior of the system, and to access the current value of a flag.
- set_prolog_flag(Flag,Value):
Set the value of Flag to be Value.
- current_prolog_flag(Flag,Value):
Value is the current value of Flag.
Neng-Fa Zhou
2013-01-25