YAP 7.1.0
Predicates to access Prolog flags.

the following builins provide read-write access the Prolog flags More...

Detailed Description

the following builins provide read-write access the Prolog flags

We advise you to use the ISO buitins on ISO flags


Class Documentation

◆ prolog_flag/3

class prolog_flag/3

prolog_flag(? Flag,- OldValue,+ NewValue)

Obtain the value for a YAP Prolog flag and then set it to a new value Equivalent to first calling current_prolog_flag/2 with the second argument OldValue unbound and then calling set_prolog_flag/2 with the third argument NewValue

◆ current_prolog_flag/3

class current_prolog_flag/3

current_prolog_flag(? Flag,- Value, +_New_)

defined in the ISO standard

Obtain the value for a YAP Prolog flag, and then set the flag to the New value

◆ current_prolog_flag/2

class current_prolog_flag/2

current_prolog_flag(? Flag,- Value)

defined in the ISO standard

Obtain the value for a YAP Prolog flag Equivalent to calling yap_flag/2 with the second argument unbound, and unifying the returned second argument with Value

◆ set_prolog_flag/2

class set_prolog_flag/2

set_prolog_flag(+ Flag,+ Value)

defined in the ISO standard

Set the value for YAP Prolog flag Flag Equivalent to calling yap_flag/2 with both arguments bound

◆ source/0

class source/0

source

After executing this goal, YAP keeps information on the source of the predicates that will be consulted This enables the use of listing/0 , listing/1 and clause/2 for those clauses

The same as source_mode(_,on) or as declaring all newly defined static procedures as public

◆ no_source/0

class no_source/0

no_source

The opposite to source

The same as source_mode(_,off)

◆ source_mode/2

class source_mode/2

source_mode(- O,+ N)

The state of source mode can either be on or off When the source mode is on, all clauses are kept both as compiled code and in a "hidden" database O is unified with the previous state and the mode is set according to N

◆ prolog_flag_property/2

class prolog_flag_property/2

prolog_flag_property(+ Flag,+ Prooperties)

Report a property for a YAP Prolog flag Properties include

type(+_Type_) with Type one of boolean, integer, float, atom and term (that is, any ground term)

access(+_Access_) with Access one of read_only or read_write

scope(+_Scope_) the flag aplies to athread, to amodule, or is global` to the system

Macro Definition Documentation

◆ PAR [1/2]

#define PAR (   x,
  y,
  z,
 
)    z

Definition at line 1717 of file flags.c.

◆ PAR [2/2]

#define PAR (   x,
  y,
  z,
 
)     { x, y, z, w }

Definition at line 1717 of file flags.c.

◆ PROLOG_FLAG_PROPERTY_DEFS

#define PROLOG_FLAG_PROPERTY_DEFS ( )
Value:
PAR("access", isaccess, PROLOG_FLAG_PROPERTY_ACCESS, "read_write") \
, PAR("type", isground, PROLOG_FLAG_PROPERTY_TYPE, "term"), \
PAR("scope", flagscope, PROLOG_FLAG_PROPERTY_SCOPE, "global"), \
PAR("keep", booleanFlag, PROLOG_FLAG_PROPERTY_KEEP, "false"), \
PAR(NULL, ok, PROLOG_FLAG_PROPERTY_END, 0)

Definition at line 1702 of file flags.c.

Enumeration Type Documentation

◆ prolog_flag_property_enum_choices

enum prolog_flag_property_enum_choices

Definition at line 1711 of file flags.c.

Function Documentation

◆ getYapFlag()

Term getYapFlag ( Term  tflag)

Definition at line 1421 of file flags.c.

◆ Yap_create_prolog_flag()

X_API bool Yap_create_prolog_flag ( const char *  name,
bool  writable,
Term  ttype,
Term  v 
)

Create a new global prolog flag.

  • name
  • whether read-only or writable
  • type: boolean, integer, atom, any as a pprolog term

Definition at line 1968 of file flags.c.

◆ Yap_InitFlags()

void Yap_InitFlags ( bool  bootstrap)

Init System Prolog flags.

This is done in two phases: early on, it takes care of the atomic flags that are required by other modules; later, it looks at flags that are structured terms

Parameters
bootstrapwether this is done before stack initialization, or afterwards Complex terms can only be built in the second step

Definition at line 2002 of file flags.c.

◆ Yap_set_flag()

bool Yap_set_flag ( Term  tflag,
Term  t2 
)

Definition at line 1334 of file flags.c.

◆ Yap_setModuleFlags()

void Yap_setModuleFlags ( ModEntry new,
ModEntry cme 
)

Definition at line 1315 of file flags.c.

◆ Yap_UnknownFlag()

Term Yap_UnknownFlag ( Term  mod)

Definition at line 1407 of file flags.c.

Macros

#define PROLOG_FLAG_PROPERTY_DEFS()
 
#define PAR(x, y, z, w)   z
 
#define PAR(x, y, z, w)    { x, y, z, w }
 

Typedefs

typedef enum prolog_flag_property_enum_choices prolog_flag_property_choices_t
 

Enumerations

enum  prolog_flag_property_enum_choices { PROLOG_FLAG_PROPERTY_DEFS =() }
 

Functions

void Yap_setModuleFlags (ModEntry *new, ModEntry *cme)
 
bool Yap_set_flag (Term tflag, Term t2)
 
Term Yap_UnknownFlag (Term mod)
 
Term getYapFlag (Term tflag)
 
X_API bool Yap_create_prolog_flag (const char *name, bool writable, Term ttype, Term v)
 Create a new global prolog flag. More...
 
void Yap_InitFlags (bool bootstrap)
 Init System Prolog flags. More...