Prolog Flags¶
Flags can be used to configure and to query the Prolog engine.
Inquiring and setting YAP state.
- create_prolog_flag/4
- prolog_flag/4
- prolog_flag_property/2
-
[no_source
-
[source
- current_prolog_flag/2
Define:¶
Functions:¶
1. Term booleanFlag(Term inp):
1. static Term list_option(Term inp):
1. static Term argv(Term inp):
1. static Term os_argv(Term inp):
1. static bool agc_threshold(Term inp):
1. static bool gc_margin(Term inp):
1. static Term executable(Term inp):
1. static Term sys_thread_id(Term inp):
1. static Term sys_pid(Term inp):
1. static bool mkprompt(Term inp):
1. static Term indexer(Term inp):
1. static Term stream(Term inp):
1. static bool getenc(Term inp):
1. static bool typein(Term inp):
1. static bool set_error_stream(Term inp):
1. static bool set_input_stream(Term inp):
1. static bool set_output_stream(Term inp):
1. static bool dollar_to_lc(Term inp):
1. static bool setSignals(Term inp): : set or reset signal handlers.
The act is only performed if the flag changed values.
inpWhether to enable or disable
return:
always true
1. static void newFlag(Term fl, Term val):
1. static Int set_prolog_flag(USES_REGS1):
1. static Term compiling(Term inp):
1. static Term mkplus(Term val):
1. Term febooleanFlag(Term inp):
1. static Term quote(mod_entry_flags_t qt):
1. static Term snglq(Term val):
1. static Term dblq(Term val):
1. static Term bckq(Term val):
1. static Term multil(Term val):
1. static Term undefph(Term val):
1. static Term isaccess(Term inp):
1. static Term isground(Term inp):
1. static Term flagscope(Term inp):
1. static Term mk_argc_list(USES_REGS1):
1. static Term mk_os_argc_list(USES_REGS1):
1. static FlagEntry * GetFlagProp(Atom a):
1. static void initFlag(flag_info *f, int fnum, bool global):
1. static Int cont_current_prolog_flag(USES_REGS1):
1. static Int current_prolog_flag(USES_REGS1):
1. bool Yap_set_flag(Term tflag, Term t2):
1. Term Yap_UnknownFlag(Term mod):
1. Term getYapFlag(Term tflag):
1. static Int source(USES_REGS1):
1. static Int no_source(USES_REGS1):
1. static Int source_mode(USES_REGS1): : "source_mode(- O,+ N" )
@class source_mode_2
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.
1. static bool setInitialValue(bool bootstrap, flag_func f, const char s, flag_term tarr):
1. static Int do_prolog_flag_property(Term tflag, Term opts USES_REGS):
1. static Int cont_prolog_flag_property(USES_REGS1):
1. static Int prolog_flag_property(USES_REGS1):
1. static Int do_create_prolog_flag(USES_REGS1):
1. 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
1. 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
bootstrapwether this is done before stack initialization, or afterwards. Complex terms can only be built in the second step.
Var:¶
1. flag_info local_flags_setup[][]:
1. flag_info global_flags_setup[][]:
1. const param2_t prolog_flag_property_defs[][]:
Typedef:¶
1. typedef enum prolog_flag_property_enum_choices prolog_flag_property_choices_t: