Supporting the module system¶
Low-level Builtins used ro interact with the module system.
Define:¶
Functions:¶
1. static Int current_module(USES_REGS1):
1. static Int current_modul/1(USES_REGS1):
1. static ModEntry * LookupModule(Term a):
1. const char * Yap_CurrentModuleName(void):
1. static ModEntry * initMod(UInt inherit, AtomEntry *ae): : initialize module data-structure
toparent module (CurrentModule)
aemodule name.
return:
a new module structure
1. static ModEntry * initTermMod(Term t, UInt flags):
1. static ModEntry * GetModule(AtomEntry *ae): : This routine assumes a lock is held on the atom a, that a holds the name of the module.
and that inheit are the module specific properties.
1. static UInt module_Flags(Term at):
1. ModEntry * Yap_GetModuleEntry(Term at): : get predicate entry for ap/arity; create it if neccessary
at return:
module descriptorxs
1. ModEntry * Yap_GetModuleEntry_HoldingLock(Term at):
1. ModEntry * Yap_AddOpToModuleEntry(Atom at, OpEntry *info USES_REGS): : get predicate entry for ap/arity; create it if neccessary
at return:
module descriptorxs
1. void Yap_NewModulePred(struct pred_entry *ap):
1. Term Yap_getUnknownModule(ModEntry *m):
1. bool Yap_getUnknown(Term mod):
1. bool Yap_CharacterEscapes(Term mt):
1. Term Yap_Module_Name(PredEntry *ap):
1. bool Yap_isSystemModule(Term a):
1. bool Yap_isSystemModule_HoldingLock(Term a, AtomEntry *ae):
1. Term Yap_Module(Term tmod):
1. Term Yap_GetModuleFromEntry(ModEntry *me):
1. struct pred_entry * Yap_ModulePred(Term mod):
1. void Yap_NewModulePred_HoldingLock(struct pred_entry *ap):
1. void Yap_RemovePredFromModule(struct pred_entry *ap):
1. static Int change_module(USES_REGS1):
1. static Int set_source_module(USES_REGS1):
1. static Int cont_current_module(USES_REGS1):
1. static Int init_current_module(USES_REGS1):
1. static Int cont_ground_module(USES_REGS1):
1. static Int init_ground_module(USES_REGS1):
1. static Int is_system_module(USES_REGS1): : "system_module( + Mod" )
@class system_module_1
module return:
1. static Int new_system_module(USES_REGS1):
1. static Int strip_module(USES_REGS1):
1. static Int yap_strip_clause(USES_REGS1):
1. Term Yap_YapStripModule(Term t, Term *modp):
1. static Int yap_strip_module(USES_REGS1):
1. static Int context_module(USES_REGS1):
1. static Int source_module(USES_REGS1): : "source_module(-Mod" )
@class source_module_1
Modis the current text source module.
: Mod is the current read-in or source module.
1. static Int current_source_module(USES_REGS1): : "source_module(-Mod" )
@class source_module_1
Modis the current text source module.
: Mod is the current read-in or source module.
1. static Int copy_operators(USES_REGS1): : "$copy_operators(+Mode, +ModTarget" )
@class U24Ucopy_operators_2
Copy all operators in ModSource to ModTarget
: Mod is the current read-in or source module.
1. Term Yap_StripModule(Term t, Term *modp):