YAP 7.1.0
YAP Thread-local flags

Prolog flags that can take different values in different threads and/or modules. More...

Detailed Description

Prolog flags that can take different values in different threads and/or modules.

Enumeration Type Documentation

◆ LocalFlags [1/2]

enum LocalFlags
Enumerator
allow_variable_name_as_functor 

Allow constructs such as 'Functor( V )'.

Functor is parsed as an atom The token V is still understood as a variable

Originally a SWI-Prolog flag

autoload 

set the system to look for undefined procedures

break_level 

read-only flag, that tells if Prolog is in an inner top-level

call_counting 

Predicates compiled with this flag set maintain a counter on the numbers of proceduree calls and of retries.

These counters are decreasing counters, and they can be used as timers Three counters are available:

calls: number of predicate calls since execution started or since system was reset; retries: number of retries for predicates called since execution started or since counters were reset;

calls_and_retries: count both on predicate calls and retries These counters can be used to find out how many calls a certain goal takes to execute They can also be force the computation to stop

compiling 

Indicates YAP is running within the compiler.

debug 

whether debugging is true or false

If Value is bound to true enable debugging, and if it is bound to false disable debugging

encoding 

support for coding systens, YAP relies on UTF-8 internally

file_errors 

exit if failing to open a fail generates an excption; or fail otherwise

language_mode 

whether native mode or trying to emulate a different Prolog

multiline_quoted_text 

If true, quoted atoms, string, lists of codes and of chars may extend over several lines, without the need to escape the new-line characters.

Otherwise, unquoted line breaks cause a syntax error

Allow quoted atoms and strings to span multiple lines

The default was for it to be true, except if in iso mode YAP-6.5 changed the default, in order to ensure compatibility, and to avoid long winded syntax bugs

expand_file_name 

obtain the absolute file name before loading a file

stack_dump_on_error 

error handler should generate a report on stack status

stream_type_check 

If true show a stack dump when YAP finds an error.

The default is off

syntax_errors 

Control action to be taken after syntax errors when executing read/1 , read/2 , or read_term/3 :

  • dec10 Report the syntax error and retry reading the term
  • fail Report the syntax error and fail
  • error Report the syntax error and generate an error (default)
  • quiet Just fail
typein_module 

If bound, set the current working or type-in module to the argument, which must be an atom.

If unbound, unify the argument with the current type-in module, that is, with the module YAP will execute goals by default

verbose 

If normal allow printing of informational and banner messages, such as the ones that are printed when consulting.

If silent disable printing these messages It is normal by default 1except if YAP is booted with the -q or -L flag

verbose_file_search 

If true allow printing of informational messages when searching for file names.

If false disable printing these messages It is false by default

verbose_load 

If true allow printing of informational messages when consulting files.

If false disable printing these messages It is true by default except if YAP is booted with the -L or L flags

user_error 

If the second argument is bound to a stream, set user_error to this stream.

If the second argument is unbound, unify the argument with the current user_error stream By default, the user_error stream is set to a stream corresponding to the Unix stderr stream The next example shows how to use this flag:

?- open( '/dev/null', append, Error,
[alias(mauri_tripa)] ).
Error = '$stream'(3) ? ;
no
?- set_prolog_flag(user_error, mauri_tripa).
close(mauri_tripa).
yes
?-

We execute three commands First, we open a stream in write mode and give it an alias, in this case mauri_tripa Next, we set user_error to the stream via the alias Note that after we did so prompts from the system were redirected to the stream mauri_tripa Last, we close the stream At this point, YAP automatically redirects the user_error alias to the original stderr

user_input 

If the second argument is bound to a stream, set user_input to this stream.

If the second argument is unbound, unify the argument with the current user_input stream

user_output 

If the second argument is bound to a stream, set user_output to this stream.

If the second argument is unbound, unify the argument with the current user_output stream

numbervars_functor 

This flag allow changing the $VAR functor name, making it possible to have specialized versions of numbervar.

allow_variable_name_as_functor 

Allow constructs such as 'Functor( V )'.

Functor is parsed as an atom The token V is still understood as a variable

Originally a SWI-Prolog flag

autoload 

set the system to look for undefined procedures

break_level 

read-only flag, that tells if Prolog is in an inner top-level

call_counting 

Predicates compiled with this flag set maintain a counter on the numbers of proceduree calls and of retries.

These counters are decreasing counters, and they can be used as timers Three counters are available:

calls: number of predicate calls since execution started or since system was reset; retries: number of retries for predicates called since execution started or since counters were reset;

calls_and_retries: count both on predicate calls and retries These counters can be used to find out how many calls a certain goal takes to execute They can also be force the computation to stop

compiling 

Indicates YAP is running within the compiler.

debug 

whether debugging is true or false

If Value is bound to true enable debugging, and if it is bound to false disable debugging

encoding 

support for coding systens, YAP relies on UTF-8 internally

file_errors 

exit if failing to open a fail generates an excption; or fail otherwise

language_mode 

whether native mode or trying to emulate a different Prolog

multiline_quoted_text 

If true, quoted atoms, string, lists of codes and of chars may extend over several lines, without the need to escape the new-line characters.

Otherwise, unquoted line breaks cause a syntax error

Allow quoted atoms and strings to span multiple lines

The default was for it to be true, except if in iso mode YAP-6.5 changed the default, in order to ensure compatibility, and to avoid long winded syntax bugs

expand_file_name 

obtain the absolute file name before loading a file

stack_dump_on_error 

error handler should generate a report on stack status

stream_type_check 

If true show a stack dump when YAP finds an error.

The default is off

syntax_errors 

Control action to be taken after syntax errors when executing read/1 , read/2 , or read_term/3 :

  • dec10 Report the syntax error and retry reading the term
  • fail Report the syntax error and fail
  • error Report the syntax error and generate an error (default)
  • quiet Just fail
typein_module 

If bound, set the current working or type-in module to the argument, which must be an atom.

If unbound, unify the argument with the current type-in module, that is, with the module YAP will execute goals by default

verbose 

If normal allow printing of informational and banner messages, such as the ones that are printed when consulting.

If silent disable printing these messages It is normal by default 1except if YAP is booted with the -q or -L flag

verbose_file_search 

If true allow printing of informational messages when searching for file names.

If false disable printing these messages It is false by default

verbose_load 

If true allow printing of informational messages when consulting files.

If false disable printing these messages It is true by default except if YAP is booted with the -L or L flags

user_error 

If the second argument is bound to a stream, set user_error to this stream.

If the second argument is unbound, unify the argument with the current user_error stream By default, the user_error stream is set to a stream corresponding to the Unix stderr stream The next example shows how to use this flag:

?- open( '/dev/null', append, Error,
[alias(mauri_tripa)] ).
Error = '$stream'(3) ? ;
no
?- set_prolog_flag(user_error, mauri_tripa).
close(mauri_tripa).
yes
?-

We execute three commands First, we open a stream in write mode and give it an alias, in this case mauri_tripa Next, we set user_error to the stream via the alias Note that after we did so prompts from the system were redirected to the stream mauri_tripa Last, we close the stream At this point, YAP automatically redirects the user_error alias to the original stderr

user_input 

If the second argument is bound to a stream, set user_input to this stream.

If the second argument is unbound, unify the argument with the current user_input stream

user_output 

If the second argument is bound to a stream, set user_output to this stream.

If the second argument is unbound, unify the argument with the current user_output stream

numbervars_functor 

This flag allow changing the $VAR functor name, making it possible to have specialized versions of numbervar.

Definition at line 38 of file YapLFlagInfo.h.

◆ LocalFlags [2/2]

enum LocalFlags
Enumerator
allow_variable_name_as_functor 

Allow constructs such as 'Functor( V )'.

Functor is parsed as an atom The token V is still understood as a variable

Originally a SWI-Prolog flag

autoload 

set the system to look for undefined procedures

break_level 

read-only flag, that tells if Prolog is in an inner top-level

call_counting 

Predicates compiled with this flag set maintain a counter on the numbers of proceduree calls and of retries.

These counters are decreasing counters, and they can be used as timers Three counters are available:

calls: number of predicate calls since execution started or since system was reset; retries: number of retries for predicates called since execution started or since counters were reset;

calls_and_retries: count both on predicate calls and retries These counters can be used to find out how many calls a certain goal takes to execute They can also be force the computation to stop

compiling 

Indicates YAP is running within the compiler.

debug 

whether debugging is true or false

If Value is bound to true enable debugging, and if it is bound to false disable debugging

encoding 

support for coding systens, YAP relies on UTF-8 internally

file_errors 

exit if failing to open a fail generates an excption; or fail otherwise

language_mode 

whether native mode or trying to emulate a different Prolog

multiline_quoted_text 

If true, quoted atoms, string, lists of codes and of chars may extend over several lines, without the need to escape the new-line characters.

Otherwise, unquoted line breaks cause a syntax error

Allow quoted atoms and strings to span multiple lines

The default was for it to be true, except if in iso mode YAP-6.5 changed the default, in order to ensure compatibility, and to avoid long winded syntax bugs

expand_file_name 

obtain the absolute file name before loading a file

stack_dump_on_error 

error handler should generate a report on stack status

stream_type_check 

If true show a stack dump when YAP finds an error.

The default is off

syntax_errors 

Control action to be taken after syntax errors when executing read/1 , read/2 , or read_term/3 :

  • dec10 Report the syntax error and retry reading the term
  • fail Report the syntax error and fail
  • error Report the syntax error and generate an error (default)
  • quiet Just fail
typein_module 

If bound, set the current working or type-in module to the argument, which must be an atom.

If unbound, unify the argument with the current type-in module, that is, with the module YAP will execute goals by default

verbose 

If normal allow printing of informational and banner messages, such as the ones that are printed when consulting.

If silent disable printing these messages It is normal by default 1except if YAP is booted with the -q or -L flag

verbose_file_search 

If true allow printing of informational messages when searching for file names.

If false disable printing these messages It is false by default

verbose_load 

If true allow printing of informational messages when consulting files.

If false disable printing these messages It is true by default except if YAP is booted with the -L or L flags

user_error 

If the second argument is bound to a stream, set user_error to this stream.

If the second argument is unbound, unify the argument with the current user_error stream By default, the user_error stream is set to a stream corresponding to the Unix stderr stream The next example shows how to use this flag:

?- open( '/dev/null', append, Error,
[alias(mauri_tripa)] ).
Error = '$stream'(3) ? ;
no
?- set_prolog_flag(user_error, mauri_tripa).
close(mauri_tripa).
yes
?-

We execute three commands First, we open a stream in write mode and give it an alias, in this case mauri_tripa Next, we set user_error to the stream via the alias Note that after we did so prompts from the system were redirected to the stream mauri_tripa Last, we close the stream At this point, YAP automatically redirects the user_error alias to the original stderr

user_input 

If the second argument is bound to a stream, set user_input to this stream.

If the second argument is unbound, unify the argument with the current user_input stream

user_output 

If the second argument is bound to a stream, set user_output to this stream.

If the second argument is unbound, unify the argument with the current user_output stream

numbervars_functor 

This flag allow changing the $VAR functor name, making it possible to have specialized versions of numbervar.

allow_variable_name_as_functor 

Allow constructs such as 'Functor( V )'.

Functor is parsed as an atom The token V is still understood as a variable

Originally a SWI-Prolog flag

autoload 

set the system to look for undefined procedures

break_level 

read-only flag, that tells if Prolog is in an inner top-level

call_counting 

Predicates compiled with this flag set maintain a counter on the numbers of proceduree calls and of retries.

These counters are decreasing counters, and they can be used as timers Three counters are available:

calls: number of predicate calls since execution started or since system was reset; retries: number of retries for predicates called since execution started or since counters were reset;

calls_and_retries: count both on predicate calls and retries These counters can be used to find out how many calls a certain goal takes to execute They can also be force the computation to stop

compiling 

Indicates YAP is running within the compiler.

debug 

whether debugging is true or false

If Value is bound to true enable debugging, and if it is bound to false disable debugging

encoding 

support for coding systens, YAP relies on UTF-8 internally

file_errors 

exit if failing to open a fail generates an excption; or fail otherwise

language_mode 

whether native mode or trying to emulate a different Prolog

multiline_quoted_text 

If true, quoted atoms, string, lists of codes and of chars may extend over several lines, without the need to escape the new-line characters.

Otherwise, unquoted line breaks cause a syntax error

Allow quoted atoms and strings to span multiple lines

The default was for it to be true, except if in iso mode YAP-6.5 changed the default, in order to ensure compatibility, and to avoid long winded syntax bugs

expand_file_name 

obtain the absolute file name before loading a file

stack_dump_on_error 

error handler should generate a report on stack status

stream_type_check 

If true show a stack dump when YAP finds an error.

The default is off

syntax_errors 

Control action to be taken after syntax errors when executing read/1 , read/2 , or read_term/3 :

  • dec10 Report the syntax error and retry reading the term
  • fail Report the syntax error and fail
  • error Report the syntax error and generate an error (default)
  • quiet Just fail
typein_module 

If bound, set the current working or type-in module to the argument, which must be an atom.

If unbound, unify the argument with the current type-in module, that is, with the module YAP will execute goals by default

verbose 

If normal allow printing of informational and banner messages, such as the ones that are printed when consulting.

If silent disable printing these messages It is normal by default 1except if YAP is booted with the -q or -L flag

verbose_file_search 

If true allow printing of informational messages when searching for file names.

If false disable printing these messages It is false by default

verbose_load 

If true allow printing of informational messages when consulting files.

If false disable printing these messages It is true by default except if YAP is booted with the -L or L flags

user_error 

If the second argument is bound to a stream, set user_error to this stream.

If the second argument is unbound, unify the argument with the current user_error stream By default, the user_error stream is set to a stream corresponding to the Unix stderr stream The next example shows how to use this flag:

?- open( '/dev/null', append, Error,
[alias(mauri_tripa)] ).
Error = '$stream'(3) ? ;
no
?- set_prolog_flag(user_error, mauri_tripa).
close(mauri_tripa).
yes
?-

We execute three commands First, we open a stream in write mode and give it an alias, in this case mauri_tripa Next, we set user_error to the stream via the alias Note that after we did so prompts from the system were redirected to the stream mauri_tripa Last, we close the stream At this point, YAP automatically redirects the user_error alias to the original stderr

user_input 

If the second argument is bound to a stream, set user_input to this stream.

If the second argument is unbound, unify the argument with the current user_input stream

user_output 

If the second argument is bound to a stream, set user_output to this stream.

If the second argument is unbound, unify the argument with the current user_output stream

numbervars_functor 

This flag allow changing the $VAR functor name, making it possible to have specialized versions of numbervar.

Definition at line 38 of file YapLFlagInfo.h.

Enumerations

enum  LocalFlags {
  allow_variable_name_as_functor , autoload , break_level , call_counting ,
  compiling , debug , encoding , file_errors ,
  language_mode , multiline_quoted_text , expand_file_name , stack_dump_on_error ,
  stream_type_check , syntax_errors , typein_module , verbose ,
  verbose_file_search , verbose_load , user_error , user_input ,
  user_output , numbervars_functor , allow_variable_name_as_functor , autoload ,
  break_level , call_counting , compiling , debug ,
  encoding , file_errors , language_mode , multiline_quoted_text ,
  expand_file_name , stack_dump_on_error , stream_type_check , syntax_errors ,
  typein_module , verbose , verbose_file_search , verbose_load ,
  user_error , user_input , user_output , numbervars_functor
}
 
enum  LocalFlags {
  allow_variable_name_as_functor , autoload , break_level , call_counting ,
  compiling , debug , encoding , file_errors ,
  language_mode , multiline_quoted_text , expand_file_name , stack_dump_on_error ,
  stream_type_check , syntax_errors , typein_module , verbose ,
  verbose_file_search , verbose_load , user_error , user_input ,
  user_output , numbervars_functor , allow_variable_name_as_functor , autoload ,
  break_level , call_counting , compiling , debug ,
  encoding , file_errors , language_mode , multiline_quoted_text ,
  expand_file_name , stack_dump_on_error , stream_type_check , syntax_errors ,
  typein_module , verbose , verbose_file_search , verbose_load ,
  user_error , user_input , user_output , numbervars_functor
}