![]() |
YAP 7.1.0
|
Term handles correspond to SWI-Prolog's term_t datatype: they are a safe representation of terms. More...
Term handles correspond to SWI-Prolog's term_t datatype: they are a safe representation of terms.
Slots are safe houses in the stack, the garbage collector and the stack shifter know about them and make sure they have correct values In this case, we use a slot to preserve t during the execution of YAP_RunGoal) When the execution of t is over we read the (possibly changed) value of t back from the slot sl and tell YAP that the slot sl is not needed and can be given back to the system
YAP supports storing and manipulating term_t like slots or handles, but in the C the programmer needs to take care as most operations still require unwrapping the term inside
For implementation details and more information, please check term_t_slots in the implementation section
#define FRG_REDO_BITS 2 |
Definition at line 1175 of file c_interface.c.
#define FRG_REDO_MASK 0x00000003L |
Definition at line 1174 of file c_interface.c.
#define REDO_INT 0x02 /* Returned an integer */ |
Definition at line 1176 of file c_interface.c.
#define REDO_PTR 0x03 /* returned a pointer */ |
Definition at line 1177 of file c_interface.c.
typedef uintptr_t(* CBPredicate0) (struct foreign_context *) |
Definition at line 978 of file c_interface.c.
typedef uintptr_t(* CBPredicate1) (yhandle_t, struct foreign_context *) |
Definition at line 980 of file c_interface.c.
typedef uintptr_t(* CBPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 1010 of file c_interface.c.
typedef uintptr_t(* CBPredicate2) (yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 982 of file c_interface.c.
typedef uintptr_t(* CBPredicate3) (yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 985 of file c_interface.c.
typedef uintptr_t(* CBPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 988 of file c_interface.c.
typedef uintptr_t(* CBPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 991 of file c_interface.c.
typedef uintptr_t(* CBPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 994 of file c_interface.c.
typedef uintptr_t(* CBPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 998 of file c_interface.c.
typedef uintptr_t(* CBPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 1002 of file c_interface.c.
typedef uintptr_t(* CBPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 1006 of file c_interface.c.
typedef Int(* CPredicate0) (void) |
Definition at line 876 of file c_interface.c.
typedef Int(* CPredicate1) (yhandle_t) |
Definition at line 878 of file c_interface.c.
typedef Int(* CPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 902 of file c_interface.c.
typedef Int(* CPredicate2) (yhandle_t, yhandle_t) |
Definition at line 880 of file c_interface.c.
typedef Int(* CPredicate3) (yhandle_t, yhandle_t, yhandle_t) |
Definition at line 882 of file c_interface.c.
typedef Int(* CPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 884 of file c_interface.c.
typedef Int(* CPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 886 of file c_interface.c.
typedef Int(* CPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 889 of file c_interface.c.
typedef Int(* CPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 892 of file c_interface.c.
typedef Int(* CPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 895 of file c_interface.c.
typedef Int(* CPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
Definition at line 898 of file c_interface.c.
typedef Int(* CPredicateV) (yhandle_t, yhandle_t, struct foreign_context *) |
Definition at line 906 of file c_interface.c.
X_API YAP_Term YAP_A | ( | int | i | ) |
Definition at line 231 of file c_interface.c.
X_API Term * YAP_AddressFromSlot | ( | YAP_handle_t | slot | ) |
get the memory address of a slot
Return the address of slot slot: please use with care
Definition at line 850 of file c_interface.c.
X_API Term * YAP_AddressOfTermInSlot | ( | YAP_handle_t | slot | ) |
get the memory address of the term actually stored in a slot
Definition at line 855 of file c_interface.c.
X_API YAP_agc_hook YAP_AGCRegisterHook | ( | YAP_agc_hook | hook | ) |
Definition at line 2558 of file c_interface.c.
X_API Term YAP_AllocExternalDataInStack | ( | size_t | bytes | ) |
Definition at line 1882 of file c_interface.c.
X_API void * YAP_AllocSpaceFromYap | ( | size_t | size | ) |
Definition at line 1335 of file c_interface.c.
X_API Term YAP_ArgOfTerm | ( | UInt | n, |
Term | t | ||
) |
Definition at line 683 of file c_interface.c.
X_API Term * YAP_ArgsOfTerm | ( | Term | t | ) |
Definition at line 685 of file c_interface.c.
X_API yhandle_t YAP_ArgsToSlots | ( | int | HowMany | ) |
copies the first new n YAAM registers to slots
Store the current first HowMany arguments in new slots
Definition at line 2850 of file c_interface.c.
X_API int YAP_Argv | ( | char *** | argvp | ) |
Definition at line 2966 of file c_interface.c.
X_API UInt YAP_ArityOfFunctor | ( | YAP_Functor | f | ) |
Definition at line 699 of file c_interface.c.
X_API void YAP_AsyncThrow | ( | Term | t | ) |
Definition at line 2411 of file c_interface.c.
X_API int YAP_AtomGetHold | ( | YAP_Atom | at | ) |
Definition at line 2554 of file c_interface.c.
X_API const char * YAP_AtomName | ( | YAP_Atom | a | ) |
Definition at line 452 of file c_interface.c.
X_API size_t YAP_AtomNameLength | ( | YAP_Atom | at | ) |
Definition at line 528 of file c_interface.c.
X_API YAP_Atom YAP_AtomOfTerm | ( | Term | t | ) |
Definition at line 439 of file c_interface.c.
X_API int YAP_AtomReleaseHold | ( | YAP_Atom | at | ) |
Definition at line 2556 of file c_interface.c.
X_API Int YAP_AtomToInt | ( | YAP_Atom | At | ) |
Definition at line 3145 of file c_interface.c.
X_API YAP_PredEntryPtr YAP_AtomToPred | ( | YAP_Atom | at | ) |
Definition at line 1714 of file c_interface.c.
X_API YAP_PredEntryPtr YAP_AtomToPredInModule | ( | YAP_Atom | at, |
Term | mod | ||
) |
Definition at line 1723 of file c_interface.c.
X_API Term YAP_AttsOfVar | ( | Term | t | ) |
Definition at line 2748 of file c_interface.c.
X_API YAP_Bool YAP_BigNumOfTerm | ( | Term | t, |
void * | b | ||
) |
Definition at line 355 of file c_interface.c.
X_API void * YAP_BlobOfTerm | ( | Term | t | ) |
Definition at line 409 of file c_interface.c.
X_API YAP_Term YAP_BufferToAtomList | ( | const char * | s | ) |
Definition at line 1511 of file c_interface.c.
X_API Term YAP_BufferToDiffList | ( | const char * | s, |
Term | t0 | ||
) |
Definition at line 1607 of file c_interface.c.
X_API Term YAP_BufferToString | ( | const char * | s | ) |
Definition at line 1389 of file c_interface.c.
X_API void YAP_ClearExceptions | ( | void | ) |
Definition at line 2118 of file c_interface.c.
X_API void YAP_CloseAllOpenStreams | ( | void | ) |
Definition at line 2389 of file c_interface.c.
X_API int YAP_CloseList | ( | Term | t0, |
Term | tail | ||
) |
Definition at line 2731 of file c_interface.c.
X_API int YAP_CompareTerms | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 2358 of file c_interface.c.
X_API bool YAP_CompileClause | ( | Term | t | ) |
Definition at line 2315 of file c_interface.c.
X_API bool YAP_ContinueGoal | ( | void | ) |
Definition at line 2079 of file c_interface.c.
X_API YAP_Term YAP_CopyTerm | ( | Term | t | ) |
Definition at line 2260 of file c_interface.c.
X_API Term YAP_CreateModule | ( | YAP_Atom | at | ) |
Definition at line 2498 of file c_interface.c.
X_API Term YAP_CurrentModule | ( | void | ) |
Definition at line 2486 of file c_interface.c.
X_API Int YAP_CurrentSlot | ( | void | ) |
report the current position of the slots, assuming that they occupy the top of the stack
Definition at line 825 of file c_interface.c.
X_API void YAP_cut_up | ( | void | ) |
Definition at line 733 of file c_interface.c.
X_API char * YAP_cwd | ( | void | ) |
Definition at line 2568 of file c_interface.c.
X_API void YAP_EndConsult | ( | int | sno, |
int * | osnop, | ||
const char * | full | ||
) |
Definition at line 2188 of file c_interface.c.
X_API void YAP_EndSlots | ( | void | ) |
discard all existing slots: operates as
StartSlots, but should be called when we're done
Definition at line 151 of file c_interface.c.
X_API bool YAP_EnterGoal | ( | YAP_PredEntryPtr | ape, |
CELL * | ptr, | ||
YAP_dogoalinfo * | dgi | ||
) |
Definition at line 1737 of file c_interface.c.
X_API int YAP_Erase | ( | void * | handle | ) |
Definition at line 2836 of file c_interface.c.
X_API void YAP_Error__ | ( | const char * | file, |
const char * | function, | ||
int | lineno, | ||
int | myerrno, | ||
Term | t, | ||
const char * | buf, | ||
... | |||
) |
Definition at line 1686 of file c_interface.c.
X_API int YAP_ExactlyEqual | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 792 of file c_interface.c.
X_API Int YAP_Execute | ( | PredEntry * | pe, |
CPredicate | exec_code | ||
) |
Definition at line 1131 of file c_interface.c.
X_API Int YAP_ExecuteFirst | ( | PredEntry * | pe, |
CPredicate | exec_code | ||
) |
Definition at line 1179 of file c_interface.c.
X_API Int YAP_ExecuteNext | ( | PredEntry * | pe, |
CPredicate | exec_code | ||
) |
Definition at line 1275 of file c_interface.c.
Definition at line 1227 of file c_interface.c.
X_API void YAP_Exit | ( | int | retval | ) |
Definition at line 2370 of file c_interface.c.
X_API size_t YAP_ExportTerm | ( | Term | inp, |
char * | buf, | ||
size_t | len | ||
) |
Definition at line 3100 of file c_interface.c.
X_API Term YAP_ExtendList | ( | Term | t0, |
Term | inp | ||
) |
Definition at line 2718 of file c_interface.c.
X_API void * YAP_ExternalDataInStackFromTerm | ( | Term | t | ) |
Definition at line 1894 of file c_interface.c.
X_API void * YAP_ExtraSpace | ( | void | ) |
Definition at line 718 of file c_interface.c.
X_API void * YAP_ExtraSpaceCut | ( | void | ) |
Definition at line 703 of file c_interface.c.
X_API void * YAP_FileDescriptorFromStream | ( | Term | t | ) |
Definition at line 2769 of file c_interface.c.
X_API int YAP_FileNoFromStream | ( | Term | t | ) |
Definition at line 2761 of file c_interface.c.
X_API YAP_Float YAP_FloatOfTerm | ( | YAP_Term | t | ) |
Definition at line 430 of file c_interface.c.
X_API Term YAP_FloatsToList | ( | double * | dblp, |
size_t | sz | ||
) |
Definition at line 2579 of file c_interface.c.
X_API void YAP_FlushAllStreams | ( | void | ) |
Definition at line 2397 of file c_interface.c.
X_API void * YAP_foreign_stream | ( | int | sno | ) |
Definition at line 3196 of file c_interface.c.
X_API void YAP_FreeSpaceFromYap | ( | void * | ptr | ) |
Definition at line 1350 of file c_interface.c.
X_API YAP_Atom YAP_FullLookupAtom | ( | const char * | c | ) |
Definition at line 510 of file c_interface.c.
X_API YAP_Functor YAP_FunctorOfTerm | ( | Term | t | ) |
Definition at line 681 of file c_interface.c.
X_API Int YAP_FunctorToInt | ( | YAP_Functor | f | ) |
Definition at line 3170 of file c_interface.c.
X_API YAP_PredEntryPtr YAP_FunctorToPred | ( | YAP_Functor | func | ) |
Definition at line 1709 of file c_interface.c.
X_API YAP_PredEntryPtr YAP_FunctorToPredInModule | ( | YAP_Functor | func, |
Term | mod | ||
) |
Definition at line 1719 of file c_interface.c.
X_API Term YAP_GetFromSlot | ( | YAP_handle_t | slot | ) |
read from a slot
Definition at line 845 of file c_interface.c.
X_API void * YAP_GetStreamFromId | ( | int | no | ) |
given a stream descriptor or stream alias (see open/3 ), return YAP's internal handle
Definition at line 2172 of file c_interface.c.
X_API Term YAP_GetValue | ( | YAP_Atom | at | ) |
Definition at line 2356 of file c_interface.c.
X_API bool YAP_GoalHasException | ( | Term * | t | ) |
Definition at line 2112 of file c_interface.c.
X_API void YAP_Halt | ( | int | i | ) |
Definition at line 2420 of file c_interface.c.
X_API int YAP_HaltRegisterHook | ( | HaltHookFunc | hook, |
void * | closure | ||
) |
Definition at line 2564 of file c_interface.c.
X_API Term YAP_HeadOfTerm | ( | Term | t | ) |
Definition at line 622 of file c_interface.c.
X_API CELL * YAP_HeapStoreOpaqueTerm | ( | Term | t | ) |
Definition at line 1943 of file c_interface.c.
X_API Term YAP_ImportTerm | ( | char * | buf | ) |
Definition at line 3106 of file c_interface.c.
X_API Term YAP_ImportTfunnumberm | ( | char * | buf | ) |
Definition at line 3116 of file c_interface.c.
void yap_init | ( | void | ) |
Definition at line 3209 of file c_interface.c.
X_API int YAP_InitConsult | ( | int | mode, |
const char * | fname, | ||
char * | full, | ||
int * | osnop | ||
) |
Definition at line 2124 of file c_interface.c.
X_API Int YAP_InitSlot | ( | Term | t | ) |
Definition at line 835 of file c_interface.c.
X_API yhandle_t YAP_InitSlot | ( | YAP_Term | t | ) |
allocate n empty new slots
Return a handle to the system's default slo t iX_API yhandle_t YAP_NewSlots(int NumberOfSlots);
allocate n empty new slots
Allocate NumberOfSlots from the stack and return an handle to the last one The other handle can be obtained by decrementing the handle
X_API int YAP_InitSocks | ( | const char * | host, |
long | port | ||
) |
Definition at line 2372 of file c_interface.c.
X_API Int YAP_IntOfTerm | ( | Term | t | ) |
Definition at line 339 of file c_interface.c.
X_API Term YAP_IntsToList | ( | Int * | dblp, |
size_t | sz | ||
) |
Definition at line 2645 of file c_interface.c.
X_API YAP_Atom YAP_IntToAtom | ( | Int | i | ) |
Definition at line 3168 of file c_interface.c.
X_API YAP_Functor YAP_IntToFunctor | ( | Int | i | ) |
Definition at line 3200 of file c_interface.c.
X_API YAP_Bool YAP_IsApplTerm | ( | Term | t | ) |
Definition at line 284 of file c_interface.c.
X_API YAP_Bool YAP_IsAtomTerm | ( | Term | t | ) |
Definition at line 280 of file c_interface.c.
X_API int YAP_IsAttVar | ( | Term | t | ) |
Definition at line 2740 of file c_interface.c.
X_API YAP_Bool YAP_IsBigNumTerm | ( | YAP_Term | t | ) |
Definition at line 249 of file c_interface.c.
X_API YAP_Bool YAP_IsCompoundTerm | ( | Term | t | ) |
Definition at line 288 of file c_interface.c.
X_API YAP_Bool YAP_IsDbRefTerm | ( | Term | t | ) |
Definition at line 278 of file c_interface.c.
X_API YAP_Bool YAP_IsExternalDataInStackTerm | ( | Term | t | ) |
Definition at line 1890 of file c_interface.c.
X_API YAP_Bool YAP_IsFloatTerm | ( | Term | t | ) |
Definition at line 276 of file c_interface.c.
X_API YAP_Bool YAP_IsIntTerm | ( | YAP_Term | t | ) |
Definition at line 241 of file c_interface.c.
X_API YAP_Bool YAP_IsLongIntTerm | ( | YAP_Term | t | ) |
Definition at line 247 of file c_interface.c.
X_API YAP_Bool YAP_IsNonVarTerm | ( | YAP_Term | t | ) |
Definition at line 274 of file c_interface.c.
X_API int YAP_IsNumberedVariable | ( | Term | t | ) |
Definition at line 3095 of file c_interface.c.
X_API YAP_Bool YAP_IsNumberTerm | ( | YAP_Term | t | ) |
Definition at line 243 of file c_interface.c.
X_API YAP_Bool YAP_IsOpaqueObjectTerm | ( | Term | t, |
YAP_opaque_tag_t | tag | ||
) |
Definition at line 1937 of file c_interface.c.
X_API YAP_Bool YAP_IsPairTerm | ( | Term | t | ) |
Definition at line 282 of file c_interface.c.
X_API YAP_Bool YAP_IsRationalTerm | ( | YAP_Term | t | ) |
Definition at line 260 of file c_interface.c.
X_API YAP_Bool YAP_IsStringTerm | ( | YAP_Term | t | ) |
Definition at line 270 of file c_interface.c.
X_API int YAP_IsTermNil | ( | Term | t | ) |
Definition at line 2552 of file c_interface.c.
X_API YAP_Bool YAP_IsVarTerm | ( | YAP_Term | t | ) |
Definition at line 272 of file c_interface.c.
X_API bool YAP_IsWideAtom | ( | YAP_Atom | a | ) |
Definition at line 441 of file c_interface.c.
X_API bool YAP_LeaveGoal | ( | bool | successful, |
YAP_dogoalinfo * | dgi | ||
) |
Definition at line 1824 of file c_interface.c.
X_API Int YAP_ListLength | ( | Term | t | ) |
Definition at line 3075 of file c_interface.c.
X_API Int YAP_ListToFloats | ( | Term | t, |
double * | dblp, | ||
size_t | sz | ||
) |
Definition at line 2612 of file c_interface.c.
X_API Int YAP_ListToInts | ( | Term | t, |
Int * | dblp, | ||
size_t | sz | ||
) |
Definition at line 2678 of file c_interface.c.
X_API YAP_Atom YAP_LookupAtom | ( | const char * | c | ) |
Definition at line 474 of file c_interface.c.
X_API YAP_Atom YAP_LookupWideAtom | ( | const wchar_t * | c | ) |
Definition at line 492 of file c_interface.c.
X_API int YAP_MaxOpPriority | ( | YAP_Atom | at, |
Term | module | ||
) |
Definition at line 2885 of file c_interface.c.
X_API Term YAP_MkApplTerm | ( | YAP_Functor | f, |
UInt | arity, | ||
Term | args[] | ||
) |
Definition at line 654 of file c_interface.c.
X_API Term YAP_MkAtomTerm | ( | YAP_Atom | n | ) |
Definition at line 432 of file c_interface.c.
X_API Term YAP_MkBigNumTerm | ( | void * | big | ) |
Definition at line 347 of file c_interface.c.
X_API Term YAP_MkBlobTerm | ( | unsigned int | sz | ) |
Definition at line 386 of file c_interface.c.
X_API Term YAP_MkCharPTerm | ( | char * | n | ) |
Definition at line 313 of file c_interface.c.
X_API Term YAP_MkFloatTerm | ( | double | n | ) |
Definition at line 419 of file c_interface.c.
X_API YAP_Functor YAP_MkFunctor | ( | YAP_Atom | a, |
UInt | n | ||
) |
Definition at line 693 of file c_interface.c.
X_API Term YAP_MkIntTerm | ( | Int | n | ) |
Definition at line 293 of file c_interface.c.
X_API Term YAP_MkListFromTerms | ( | Term * | ta, |
Int | sz | ||
) |
Definition at line 572 of file c_interface.c.
X_API Term YAP_MkNewApplTerm | ( | YAP_Functor | f, |
UInt | arity | ||
) |
Definition at line 667 of file c_interface.c.
X_API Term YAP_MkNewPairTerm | ( | void | ) |
Definition at line 608 of file c_interface.c.
X_API Term YAP_MkPairTerm | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 548 of file c_interface.c.
X_API Term YAP_MkRationalTerm | ( | void * | big | ) |
Definition at line 366 of file c_interface.c.
X_API Term YAP_MkStringTerm | ( | const char * | n | ) |
Definition at line 303 of file c_interface.c.
X_API Term YAP_MkUnsignedStringTerm | ( | const unsigned char * | n | ) |
Definition at line 323 of file c_interface.c.
X_API Term YAP_MkVarTerm | ( | void | ) |
Definition at line 537 of file c_interface.c.
X_API Term YAP_ModuleUser | ( | void | ) |
Definition at line 2877 of file c_interface.c.
X_API YAP_Atom YAP_NameOfFunctor | ( | YAP_Functor | f | ) |
Definition at line 697 of file c_interface.c.
X_API Term YAP_NBufferToAtomList | ( | const char * | s, |
size_t | len | ||
) |
Definition at line 1529 of file c_interface.c.
X_API Term YAP_NBufferToDiffList | ( | const char * | s, |
Term | t0, | ||
size_t | len | ||
) |
Definition at line 1626 of file c_interface.c.
X_API Term YAP_NBufferToString | ( | const char * | s, |
size_t | len | ||
) |
Definition at line 1407 of file c_interface.c.
X_API Term YAP_NewOpaqueObject | ( | YAP_opaque_tag_t | blob_tag, |
size_t | bytes | ||
) |
Definition at line 1917 of file c_interface.c.
X_API YAP_opaque_tag_t YAP_NewOpaqueType | ( | struct YAP_opaque_handler_struct * | f | ) |
Definition at line 1898 of file c_interface.c.
X_API Int YAP_NewSlots | ( | int | n | ) |
Definition at line 830 of file c_interface.c.
X_API YAP_handle_t YAP_NumberOfClausesForPredicate | ( | YAP_PredEntryPtr | ape | ) |
Definition at line 2880 of file c_interface.c.
X_API Int YAP_NumberVars | ( | Term | t, |
Int | nbv | ||
) |
Definition at line 3086 of file c_interface.c.
X_API Term YAP_NWideBufferToAtomDiffList | ( | const wchar_t * | s, |
Term | t0, | ||
size_t | len | ||
) |
Definition at line 1585 of file c_interface.c.
X_API Term YAP_NWideBufferToAtomList | ( | const wchar_t * | s, |
size_t | len | ||
) |
Definition at line 1566 of file c_interface.c.
X_API Term YAP_NWideBufferToDiffList | ( | const wchar_t * | s, |
Term | t0, | ||
size_t | len | ||
) |
Definition at line 1666 of file c_interface.c.
X_API Term YAP_NWideBufferToString | ( | const wchar_t * | s, |
size_t | len | ||
) |
Definition at line 1444 of file c_interface.c.
X_API void * YAP_OpaqueObjectFromTerm | ( | Term | t | ) |
Definition at line 1941 of file c_interface.c.
X_API Term YAP_OpenList | ( | int | n | ) |
Definition at line 2700 of file c_interface.c.
X_API int YAP_OpInfo | ( | YAP_Atom | at, |
Term | module, | ||
int | opkind, | ||
int * | yap_type, | ||
int * | prio | ||
) |
Definition at line 2903 of file c_interface.c.
X_API void * YAP_PointerOfTerm | ( | Term | t | ) |
Definition at line 3017 of file c_interface.c.
X_API void * YAP_Predicate | ( | YAP_Atom | a, |
UInt | arity, | ||
Term | m | ||
) |
Definition at line 2427 of file c_interface.c.
X_API void YAP_PredicateInfo | ( | void * | p, |
YAP_Atom * | a, | ||
UInt * | arity, | ||
Term * | m | ||
) |
Definition at line 2436 of file c_interface.c.
X_API void YAP_PruneGoal | ( | YAP_dogoalinfo * | gi | ) |
Definition at line 2092 of file c_interface.c.
X_API void YAP_PutInSlot | ( | Int | slot, |
Term | t | ||
) |
Definition at line 871 of file c_interface.c.
X_API void YAP_PutValue | ( | YAP_Atom | at, |
Term | t | ||
) |
Definition at line 2354 of file c_interface.c.
X_API YAP_Bool YAP_RationalOfTerm | ( | Term | t, |
void * | b | ||
) |
Definition at line 375 of file c_interface.c.
X_API Term YAP_Read | ( | FILE * | f | ) |
read a Prolog term from an operating system stream $s$
Definition at line 2206 of file c_interface.c.
X_API Term YAP_ReadBuffer | ( | const char * | s, |
Term * | tp | ||
) |
Definition at line 1463 of file c_interface.c.
X_API Term YAP_ReadClauseFromStream | ( | int | sno, |
Term | vs, | ||
Term | pos | ||
) |
Definition at line 2234 of file c_interface.c.
X_API Term YAP_ReadFromStream | ( | int | s | ) |
read a Prolog term from a Prolog opened stream $s$
Check YAP_OpenStream() for how to open Prolog streams in C
Definition at line 2217 of file c_interface.c.
X_API void * YAP_ReallocSpaceFromYap | ( | void * | ptr, |
size_t | size | ||
) |
Definition at line 1321 of file c_interface.c.
X_API void * YAP_Record | ( | Term | t | ) |
Definition at line 2777 of file c_interface.c.
X_API Term YAP_Recorded | ( | void * | handle | ) |
Definition at line 2803 of file c_interface.c.
X_API int YAP_RecoverSlots | ( | int | n, |
YAP_handle_t | topSlot | ||
) |
Succeeds if it recovers the space allocated for $n$ contiguous slots starting at topSlot.
Set the contents of slot slot to t
Definition at line 840 of file c_interface.c.
X_API void * YAP_RepStreamFromId | ( | int | sno | ) |
Obtain a pointer to the YAP representation of a stream.
Utility routine to Obtain a pointer to the YAP representation of a stream.
sno | Stream Id |
Definition at line 2387 of file c_interface.c.
X_API int YAP_RequiresExtraStack | ( | size_t | sz | ) |
Definition at line 3118 of file c_interface.c.
X_API int YAP_Reset | ( | yap_reset_t | mode, |
bool | reset_global | ||
) |
Definition at line 2362 of file c_interface.c.
X_API bool YAP_RestartGoal | ( | void | ) |
Definition at line 2017 of file c_interface.c.
X_API bool YAP_RetryGoal | ( | YAP_dogoalinfo * | dgi | ) |
Definition at line 1782 of file c_interface.c.
X_API Int YAP_RunGoal | ( | Term | t | ) |
Definition at line 1862 of file c_interface.c.
X_API Int YAP_RunGoalOnce | ( | Term | t | ) |
Definition at line 1947 of file c_interface.c.
X_API YAP_Term YAP_SetA | ( | int | i, |
YAP_Term | t | ||
) |
Definition at line 236 of file c_interface.c.
X_API Term YAP_SetCurrentModule | ( | Term | new | ) |
Definition at line 2491 of file c_interface.c.
X_API void YAP_SetOutputMessage | ( | void | ) |
Definition at line 2374 of file c_interface.c.
X_API int YAP_SetYAPFlag | ( | Term | flag, |
Term | val | ||
) |
Definition at line 2865 of file c_interface.c.
X_API bool YAP_ShutdownGoal | ( | int | backtrack | ) |
Definition at line 2038 of file c_interface.c.
X_API void YAP_signal | ( | int | sig | ) |
Definition at line 2863 of file c_interface.c.
X_API size_t YAP_SizeOfExportedTerm | ( | char * | buf | ) |
Definition at line 3110 of file c_interface.c.
X_API Int YAP_SkipList | ( | Term * | l, |
Term ** | tailp | ||
) |
Definition at line 626 of file c_interface.c.
X_API void YAP_SlotsToArgs | ( | int | HowMany, |
YAP_handle_t | slot | ||
) |
copies n slots such that sl is copied to the last abstract ,achine register
Set the first HowMany arguments to the HowMany slots
X_API void YAP_SlotsToArgs | ( | int | n, |
yhandle_t | slot | ||
) |
Definition at line 2855 of file c_interface.c.
X_API void YAP_StartSlots | ( | void | ) |
initialize the slot data-structure: all existing slots will be discarded
Typically, this would be used at the beginning top-level or other outer quqqery
Definition at line 144 of file c_interface.c.
X_API int YAP_StreamToFileNo | ( | Term | t | ) |
Definition at line 2380 of file c_interface.c.
X_API const char * YAP_StringOfTerm | ( | Term | t | ) |
Definition at line 333 of file c_interface.c.
X_API char * YAP_StringToBuffer | ( | Term | t, |
char * | buf, | ||
unsigned int | bufsize | ||
) |
copy a string to a buffer, the buffer must have been malloced
t | the text, or string |
buf | the user-provided buffer |
bufsize | bu |
Definition at line 1362 of file c_interface.c.
X_API Term YAP_StripModule | ( | Term | t, |
Term * | modp | ||
) |
Definition at line 2506 of file c_interface.c.
X_API YAP_tag_t YAP_TagOfTerm | ( | Term | t | ) |
Definition at line 2973 of file c_interface.c.
X_API Term YAP_TailOfTerm | ( | Term | t | ) |
Definition at line 624 of file c_interface.c.
X_API Int YAP_TermHash | ( | Term | t, |
Int | sz, | ||
Int | depth, | ||
int | variant | ||
) |
Definition at line 814 of file c_interface.c.
X_API Term YAP_TermNil | ( | void | ) |
Definition at line 2550 of file c_interface.c.
X_API FILE * YAP_TermToStream | ( | Term | t | ) |
Definition at line 2174 of file c_interface.c.
X_API int YAP_ThreadAttachEngine | ( | int | wid | ) |
Definition at line 2526 of file c_interface.c.
X_API int YAP_ThreadCreateEngine | ( | struct YAP_thread_attr_struct * | attr | ) |
Definition at line 2518 of file c_interface.c.
X_API int YAP_ThreadDestroyEngine | ( | int | wid | ) |
Definition at line 2542 of file c_interface.c.
X_API int YAP_ThreadDetachEngine | ( | int | wid | ) |
Definition at line 2534 of file c_interface.c.
X_API int YAP_ThreadSelf | ( | void | ) |
Definition at line 2510 of file c_interface.c.
X_API void YAP_Throw | ( | Term | t | ) |
Definition at line 2405 of file c_interface.c.
X_API YAP_PredEntryPtr YAP_TopGoal | ( | void | ) |
Definition at line 3202 of file c_interface.c.
X_API CELL * YAP_TopOfLocalStack | ( | void | ) |
Definition at line 2422 of file c_interface.c.
X_API int YAP_Unifiable | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 781 of file c_interface.c.
X_API bool YAP_Unify | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 771 of file c_interface.c.
X_API Term YAP_UnNumberVars | ( | Term | t | ) |
Definition at line 3090 of file c_interface.c.
X_API const unsigned char * YAP_UnsignedStringOfTerm | ( | Term | t | ) |
Definition at line 335 of file c_interface.c.
X_API void YAP_UserBackCPredicate | ( | const char * | name, |
YAP_UserCPred | init, | ||
YAP_UserCPred | cont, | ||
arity_t | arity, | ||
arity_t | extra | ||
) |
Definition at line 2470 of file c_interface.c.
X_API void YAP_UserBackCPredicate_ | ( | const char * | name, |
YAP_UserCPred | init, | ||
YAP_UserCPred | cont, | ||
YAP_Arity | arity, | ||
YAP_Arity | extra | ||
) |
Definition at line 2456 of file c_interface.c.
X_API void YAP_UserBackCutCPredicate | ( | const char * | name, |
YAP_UserCPred | init, | ||
YAP_UserCPred | cont, | ||
YAP_UserCPred | cut, | ||
YAP_Arity | arity, | ||
YAP_Arity | extra | ||
) |
Definition at line 2463 of file c_interface.c.
X_API void YAP_UserCPredicate | ( | const char * | name, |
YAP_UserCPred | def, | ||
YAP_Arity | arity | ||
) |
Definition at line 2451 of file c_interface.c.
X_API void YAP_UserCPredicateWithArgs | ( | const char * | a, |
YAP_UserCPred | f, | ||
arity_t | arity, | ||
Term | mod | ||
) |
Definition at line 2477 of file c_interface.c.
X_API size_t YAP_UTF8_TextLength | ( | Term | t | ) |
Output the number of bytes needed to represent a string in UTF-8 Note that the terminating zero is not included.
No error checking is performed (the programmer should have that done)
t | a list of codes, chars, string or atom |
Definition at line 3041 of file c_interface.c.
X_API int YAP_Variant | ( | Term | t1, |
Term | t2 | ||
) |
Definition at line 803 of file c_interface.c.
X_API yhandle_t YAP_VarSlotToNumber | ( | yhandle_t | s | ) |
Definition at line 2868 of file c_interface.c.
X_API const wchar_t * YAP_WideAtomName | ( | YAP_Atom | a | ) |
Definition at line 459 of file c_interface.c.
X_API Term YAP_WideBufferToAtomList | ( | const wchar_t * | s | ) |
Definition at line 1548 of file c_interface.c.
X_API Term YAP_WideBufferToDiffList | ( | const wchar_t * | s, |
Term | t0 | ||
) |
Definition at line 1647 of file c_interface.c.
X_API Term YAP_WideBufferToString | ( | const wchar_t * | s | ) |
Definition at line 1426 of file c_interface.c.
X_API void YAP_Write | ( | Term | t, |
FILE * | f, | ||
int | flags | ||
) |
Definition at line 2250 of file c_interface.c.
X_API char * YAP_WriteBuffer | ( | Term | t, |
char * | buf, | ||
size_t | sze, | ||
int | flags | ||
) |
Definition at line 2271 of file c_interface.c.
X_API char * YAP_WriteDynamicBuffer | ( | YAP_Term | t, |
encoding_t | enc, | ||
int | flags | ||
) |
write a a term to n user-provided buffer: make sure not tp overflow the buffer even if the text is much larger
Definition at line 2305 of file c_interface.c.
size_t AtomTranslations |
Definition at line 3142 of file c_interface.c.
size_t FunctorTranslations |
Definition at line 3143 of file c_interface.c.
size_t MaxAtomTranslations |
Definition at line 3142 of file c_interface.c.
size_t MaxFunctorTranslations |
Definition at line 3143 of file c_interface.c.
atom_t* TR_Atoms |
Definition at line 3140 of file c_interface.c.
functor_t* TR_Functors |
Definition at line 3141 of file c_interface.c.
Term YAP_BPROLOG_curr_toam_status |
Definition at line 3030 of file c_interface.c.
int YAP_BPROLOG_exception |
Definition at line 3029 of file c_interface.c.
Macros | |
#define | FRG_REDO_MASK 0x00000003L |
#define | FRG_REDO_BITS 2 |
#define | REDO_INT 0x02 /* Returned an integer */ |
#define | REDO_PTR 0x03 /* returned a pointer */ |
Typedefs | |
typedef Int(* | CPredicate0) (void) |
typedef Int(* | CPredicate1) (yhandle_t) |
typedef Int(* | CPredicate2) (yhandle_t, yhandle_t) |
typedef Int(* | CPredicate3) (yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t) |
typedef Int(* | CPredicateV) (yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate0) (struct foreign_context *) |
typedef uintptr_t(* | CBPredicate1) (yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate2) (yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate3) (yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
typedef uintptr_t(* | CBPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *) |
Functions | |
X_API void | YAP_StartSlots (void) |
initialize the slot data-structure: all existing slots will be discarded More... | |
X_API void | YAP_EndSlots (void) |
discard all existing slots: operates as More... | |
X_API yhandle_t | YAP_CurrentSlot (void) |
report the current position of the slots, assuming that they occupy the top of the stack More... | |
X_API yhandle_t | YAP_InitSlot (YAP_Term t) |
allocate n empty new slots More... | |
X_API YAP_Term | YAP_GetFromSlot (YAP_handle_t slot) |
read from a slot More... | |
X_API YAP_Term * | YAP_AddressFromSlot (YAP_handle_t) |
get the memory address of a slot More... | |
X_API YAP_Term * | YAP_AddressOfTermInSlot (YAP_handle_t) |
get the memory address of the term actually stored in a slot More... | |
X_API void | YAP_PutInSlot (YAP_handle_t slot, YAP_Term t) |
store term in a slot | |
X_API int | YAP_RecoverSlots (int, YAP_handle_t topSlot) |
Succeeds if it recovers the space allocated for $n$ contiguous slots starting at topSlot. More... | |
X_API YAP_handle_t | YAP_ArgsToSlots (int HowMany) |
copies the first new n YAAM registers to slots More... | |
X_API void | YAP_SlotsToArgs (int HowMany, YAP_handle_t slot) |
copies n slots such that sl is copied to the last abstract ,achine register More... | |
X_API YAP_Term | YAP_A (int i) |
X_API YAP_Term | YAP_SetA (int i, YAP_Term t) |
X_API YAP_Bool | YAP_IsIntTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsNumberTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsLongIntTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsBigNumTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsRationalTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsStringTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsVarTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsNonVarTerm (YAP_Term t) |
X_API YAP_Bool | YAP_IsFloatTerm (Term t) |
X_API YAP_Bool | YAP_IsDbRefTerm (Term t) |
X_API YAP_Bool | YAP_IsAtomTerm (Term t) |
X_API YAP_Bool | YAP_IsPairTerm (Term t) |
X_API YAP_Bool | YAP_IsApplTerm (Term t) |
X_API YAP_Bool | YAP_IsCompoundTerm (Term t) |
X_API Term | YAP_MkIntTerm (Int n) |
X_API Term | YAP_MkStringTerm (const char *n) |
X_API Term | YAP_MkCharPTerm (char *n) |
X_API Term | YAP_MkUnsignedStringTerm (const unsigned char *n) |
X_API const char * | YAP_StringOfTerm (Term t) |
X_API const unsigned char * | YAP_UnsignedStringOfTerm (Term t) |
X_API Int | YAP_IntOfTerm (Term t) |
X_API Term | YAP_MkBigNumTerm (void *big) |
X_API YAP_Bool | YAP_BigNumOfTerm (Term t, void *b) |
X_API Term | YAP_MkRationalTerm (void *big) |
X_API YAP_Bool | YAP_RationalOfTerm (Term t, void *b) |
X_API Term | YAP_MkBlobTerm (unsigned int sz) |
X_API void * | YAP_BlobOfTerm (Term t) |
X_API Term | YAP_MkFloatTerm (double n) |
X_API YAP_Float | YAP_FloatOfTerm (YAP_Term t) |
X_API Term | YAP_MkAtomTerm (YAP_Atom n) |
X_API YAP_Atom | YAP_AtomOfTerm (Term t) |
X_API bool | YAP_IsWideAtom (YAP_Atom a) |
X_API const char * | YAP_AtomName (YAP_Atom a) |
X_API const wchar_t * | YAP_WideAtomName (YAP_Atom a) |
X_API YAP_Atom | YAP_LookupAtom (const char *c) |
X_API YAP_Atom | YAP_LookupWideAtom (const wchar_t *c) |
X_API YAP_Atom | YAP_FullLookupAtom (const char *c) |
X_API size_t | YAP_AtomNameLength (YAP_Atom at) |
X_API Term | YAP_MkVarTerm (void) |
X_API Term | YAP_MkPairTerm (Term t1, Term t2) |
X_API Term | YAP_MkListFromTerms (Term *ta, Int sz) |
X_API Term | YAP_MkNewPairTerm () |
X_API Term | YAP_HeadOfTerm (Term t) |
X_API Term | YAP_TailOfTerm (Term t) |
X_API Int | YAP_SkipList (Term *l, Term **tailp) |
X_API Term | YAP_MkApplTerm (YAP_Functor f, UInt arity, Term args[]) |
X_API Term | YAP_MkNewApplTerm (YAP_Functor f, UInt arity) |
X_API YAP_Functor | YAP_FunctorOfTerm (Term t) |
X_API Term | YAP_ArgOfTerm (UInt n, Term t) |
X_API Term * | YAP_ArgsOfTerm (Term t) |
X_API YAP_Functor | YAP_MkFunctor (YAP_Atom a, UInt n) |
X_API YAP_Atom | YAP_NameOfFunctor (YAP_Functor f) |
X_API UInt | YAP_ArityOfFunctor (YAP_Functor f) |
X_API void * | YAP_ExtraSpaceCut (void) |
X_API void * | YAP_ExtraSpace (void) |
X_API void | YAP_cut_up (void) |
X_API bool | YAP_Unify (Term t1, Term t2) |
X_API int | YAP_Unifiable (Term t1, Term t2) |
X_API int | YAP_ExactlyEqual (Term t1, Term t2) |
X_API int | YAP_Variant (Term t1, Term t2) |
X_API Int | YAP_TermHash (Term t, Int sz, Int depth, int variant) |
X_API Int | YAP_NewSlots (int n) |
X_API Int | YAP_InitSlot (Term t) |
X_API void | YAP_PutInSlot (Int slot, Term t) |
X_API Int | YAP_Execute (PredEntry *pe, CPredicate exec_code) |
X_API Int | YAP_ExecuteFirst (PredEntry *pe, CPredicate exec_code) |
X_API Int | YAP_ExecuteOnCut (PredEntry *pe, CPredicate exec_code, struct cut_c_str *top) |
X_API Int | YAP_ExecuteNext (PredEntry *pe, CPredicate exec_code) |
X_API void * | YAP_ReallocSpaceFromYap (void *ptr, size_t size) |
X_API void * | YAP_AllocSpaceFromYap (size_t size) |
X_API void | YAP_FreeSpaceFromYap (void *ptr) |
X_API char * | YAP_StringToBuffer (Term t, char *buf, unsigned int bufsize) |
copy a string to a buffer, the buffer must have been malloced More... | |
X_API Term | YAP_BufferToString (const char *s) |
X_API Term | YAP_NBufferToString (const char *s, size_t len) |
X_API Term | YAP_WideBufferToString (const wchar_t *s) |
X_API Term | YAP_NWideBufferToString (const wchar_t *s, size_t len) |
X_API Term | YAP_ReadBuffer (const char *s, Term *tp) |
X_API YAP_Term | YAP_BufferToAtomList (const char *s) |
X_API Term | YAP_NBufferToAtomList (const char *s, size_t len) |
X_API Term | YAP_WideBufferToAtomList (const wchar_t *s) |
X_API Term | YAP_NWideBufferToAtomList (const wchar_t *s, size_t len) |
X_API Term | YAP_NWideBufferToAtomDiffList (const wchar_t *s, Term t0, size_t len) |
X_API Term | YAP_BufferToDiffList (const char *s, Term t0) |
X_API Term | YAP_NBufferToDiffList (const char *s, Term t0, size_t len) |
X_API Term | YAP_WideBufferToDiffList (const wchar_t *s, Term t0) |
X_API Term | YAP_NWideBufferToDiffList (const wchar_t *s, Term t0, size_t len) |
X_API void | YAP_Error__ (const char *file, const char *function, int lineno, int myerrno, Term t, const char *buf,...) |
X_API YAP_PredEntryPtr | YAP_FunctorToPred (YAP_Functor func) |
X_API YAP_PredEntryPtr | YAP_AtomToPred (YAP_Atom at) |
X_API YAP_PredEntryPtr | YAP_FunctorToPredInModule (YAP_Functor func, Term mod) |
X_API YAP_PredEntryPtr | YAP_AtomToPredInModule (YAP_Atom at, Term mod) |
X_API bool | YAP_EnterGoal (YAP_PredEntryPtr ape, CELL *ptr, YAP_dogoalinfo *dgi) |
X_API bool | YAP_RetryGoal (YAP_dogoalinfo *dgi) |
X_API bool | YAP_LeaveGoal (bool successful, YAP_dogoalinfo *dgi) |
X_API Int | YAP_RunGoal (Term t) |
X_API Term | YAP_AllocExternalDataInStack (size_t bytes) |
X_API YAP_Bool | YAP_IsExternalDataInStackTerm (Term t) |
X_API void * | YAP_ExternalDataInStackFromTerm (Term t) |
X_API YAP_opaque_tag_t | YAP_NewOpaqueType (struct YAP_opaque_handler_struct *f) |
X_API Term | YAP_NewOpaqueObject (YAP_opaque_tag_t blob_tag, size_t bytes) |
X_API YAP_Bool | YAP_IsOpaqueObjectTerm (Term t, YAP_opaque_tag_t tag) |
X_API void * | YAP_OpaqueObjectFromTerm (Term t) |
X_API CELL * | YAP_HeapStoreOpaqueTerm (Term t) |
X_API Int | YAP_RunGoalOnce (Term t) |
X_API bool | YAP_RestartGoal (void) |
X_API bool | YAP_ShutdownGoal (int backtrack) |
X_API bool | YAP_ContinueGoal (void) |
X_API void | YAP_PruneGoal (YAP_dogoalinfo *gi) |
X_API bool | YAP_GoalHasException (Term *t) |
X_API void | YAP_ClearExceptions (void) |
X_API int | YAP_InitConsult (int mode, const char *fname, char *full, int *osnop) |
X_API void * | YAP_GetStreamFromId (int no) |
given a stream descriptor or stream alias (see open/3 ), return YAP's internal handle More... | |
X_API FILE * | YAP_TermToStream (Term t) |
X_API void | YAP_EndConsult (int sno, int *osnop, const char *full) |
X_API Term | YAP_Read (FILE *f) |
read a Prolog term from an operating system stream $s$ More... | |
X_API Term | YAP_ReadFromStream (int sno) |
read a Prolog term from a Prolog opened stream $s$ More... | |
X_API Term | YAP_ReadClauseFromStream (int sno, Term vs, Term pos) |
X_API void | YAP_Write (Term t, FILE *f, int flags) |
X_API YAP_Term | YAP_CopyTerm (Term t) |
X_API char * | YAP_WriteBuffer (Term t, char *buf, size_t sze, int flags) |
X_API char * | YAP_WriteDynamicBuffer (YAP_Term t, encoding_t enc, int flags) |
write a a term to n user-provided buffer: make sure not tp overflow the buffer even if the text is much larger More... | |
X_API bool | YAP_CompileClause (Term t) |
X_API void | YAP_PutValue (YAP_Atom at, Term t) |
X_API Term | YAP_GetValue (YAP_Atom at) |
X_API int | YAP_CompareTerms (Term t1, Term t2) |
X_API int | YAP_Reset (yap_reset_t mode, bool reset_global) |
X_API void | YAP_Exit (int retval) |
X_API int | YAP_InitSocks (const char *host, long port) |
X_API void | YAP_SetOutputMessage (void) |
X_API int | YAP_StreamToFileNo (Term t) |
X_API void * | YAP_RepStreamFromId (int sno) |
Obtain a pointer to the YAP representation of a stream. More... | |
X_API void | YAP_CloseAllOpenStreams (void) |
X_API void | YAP_FlushAllStreams (void) |
X_API void | YAP_Throw (Term t) |
X_API void | YAP_AsyncThrow (Term t) |
X_API void | YAP_Halt (int i) |
X_API CELL * | YAP_TopOfLocalStack (void) |
X_API void * | YAP_Predicate (YAP_Atom a, UInt arity, Term m) |
X_API void | YAP_PredicateInfo (void *p, YAP_Atom *a, UInt *arity, Term *m) |
X_API void | YAP_UserCPredicate (const char *name, YAP_UserCPred def, YAP_Arity arity) |
X_API void | YAP_UserBackCPredicate_ (const char *name, YAP_UserCPred init, YAP_UserCPred cont, YAP_Arity arity, YAP_Arity extra) |
X_API void | YAP_UserBackCutCPredicate (const char *name, YAP_UserCPred init, YAP_UserCPred cont, YAP_UserCPred cut, YAP_Arity arity, YAP_Arity extra) |
X_API void | YAP_UserBackCPredicate (const char *name, YAP_UserCPred init, YAP_UserCPred cont, arity_t arity, arity_t extra) |
X_API void | YAP_UserCPredicateWithArgs (const char *a, YAP_UserCPred f, arity_t arity, Term mod) |
X_API Term | YAP_CurrentModule (void) |
X_API Term | YAP_SetCurrentModule (Term new) |
X_API Term | YAP_CreateModule (YAP_Atom at) |
X_API Term | YAP_StripModule (Term t, Term *modp) |
X_API int | YAP_ThreadSelf (void) |
X_API int | YAP_ThreadCreateEngine (struct YAP_thread_attr_struct *attr) |
X_API int | YAP_ThreadAttachEngine (int wid) |
X_API int | YAP_ThreadDetachEngine (int wid) |
X_API int | YAP_ThreadDestroyEngine (int wid) |
X_API Term | YAP_TermNil (void) |
X_API int | YAP_IsTermNil (Term t) |
X_API int | YAP_AtomGetHold (YAP_Atom at) |
X_API int | YAP_AtomReleaseHold (YAP_Atom at) |
X_API YAP_agc_hook | YAP_AGCRegisterHook (YAP_agc_hook hook) |
X_API int | YAP_HaltRegisterHook (HaltHookFunc hook, void *closure) |
X_API char * | YAP_cwd (void) |
X_API Term | YAP_FloatsToList (double *dblp, size_t sz) |
X_API Int | YAP_ListToFloats (Term t, double *dblp, size_t sz) |
X_API Term | YAP_IntsToList (Int *dblp, size_t sz) |
X_API Int | YAP_ListToInts (Term t, Int *dblp, size_t sz) |
X_API Term | YAP_OpenList (int n) |
X_API Term | YAP_ExtendList (Term t0, Term inp) |
X_API int | YAP_CloseList (Term t0, Term tail) |
X_API int | YAP_IsAttVar (Term t) |
X_API Term | YAP_AttsOfVar (Term t) |
X_API int | YAP_FileNoFromStream (Term t) |
X_API void * | YAP_FileDescriptorFromStream (Term t) |
X_API void * | YAP_Record (Term t) |
X_API Term | YAP_Recorded (void *handle) |
X_API int | YAP_Erase (void *handle) |
X_API void | YAP_SlotsToArgs (int n, yhandle_t slot) |
X_API void | YAP_signal (int sig) |
X_API int | YAP_SetYAPFlag (Term flag, Term val) |
X_API yhandle_t | YAP_VarSlotToNumber (yhandle_t s) |
X_API Term | YAP_ModuleUser (void) |
X_API YAP_handle_t | YAP_NumberOfClausesForPredicate (YAP_PredEntryPtr ape) |
X_API int | YAP_MaxOpPriority (YAP_Atom at, Term module) |
X_API int | YAP_OpInfo (YAP_Atom at, Term module, int opkind, int *yap_type, int *prio) |
X_API int | YAP_Argv (char ***argvp) |
X_API YAP_tag_t | YAP_TagOfTerm (Term t) |
X_API void * | YAP_PointerOfTerm (Term t) |
X_API size_t | YAP_UTF8_TextLength (Term t) |
Output the number of bytes needed to represent a string in UTF-8 Note that the terminating zero is not included. More... | |
X_API Int | YAP_ListLength (Term t) |
X_API Int | YAP_NumberVars (Term t, Int nbv) |
X_API Term | YAP_UnNumberVars (Term t) |
X_API int | YAP_IsNumberedVariable (Term t) |
X_API size_t | YAP_ExportTerm (Term inp, char *buf, size_t len) |
X_API Term | YAP_ImportTerm (char *buf) |
X_API size_t | YAP_SizeOfExportedTerm (char *buf) |
X_API Term | YAP_ImportTfunnumberm (char *buf) |
X_API int | YAP_RequiresExtraStack (size_t sz) |
X_API Int | YAP_AtomToInt (YAP_Atom At) |
X_API YAP_Atom | YAP_IntToAtom (Int i) |
X_API Int | YAP_FunctorToInt (YAP_Functor f) |
X_API void * | YAP_foreign_stream (int sno) |
X_API YAP_Functor | YAP_IntToFunctor (Int i) |
X_API YAP_PredEntryPtr | YAP_TopGoal (void) |
void | yap_init (void) |
Variables | |
int | YAP_BPROLOG_exception |
Term | YAP_BPROLOG_curr_toam_status |
atom_t * | TR_Atoms |
functor_t * | TR_Functors |
size_t | AtomTranslations |
size_t | MaxAtomTranslations |
size_t | FunctorTranslations |
size_t | MaxFunctorTranslations |