This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/H/Yapproto.h

523 lines
17 KiB
C
Raw Normal View History

/*************************************************************************
* *
* YAP Prolog %W% %G% *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
**************************************************************************
* *
* File: Yap.proto *
* mods: *
* comments: Function declarations for YAP *
* version: $Id: Yapproto.h,v 1.90 2008-08-07 20:51:23 vsc Exp $ *
*************************************************************************/
/* prototype file for Yap */
2017-05-27 22:54:00 +01:00
/// @file Prototype Declarations
#ifndef YAP_PROTOS_H
#define YAP_PROTOS_H 1
#include "YapDefs.h"
/* absmi.c */
2016-07-31 16:31:22 +01:00
extern Int Yap_absmi(int);
extern int Yap_absmiEND(void);
/* adtdefs.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_ArrayToList(Term *, size_t);
extern int Yap_GetName(char *, UInt, Term);
extern Term Yap_GetValue(Atom);
extern int Yap_HasOp(Atom);
extern struct operator_entry *
Yap_GetOpPropForAModuleHavingALock(struct AtomEntryStruct *, Term);
extern Atom Yap_LookupAtom(const char *);
extern Atom Yap_ULookupAtom(const unsigned char *);
extern Atom Yap_LookupAtomWithLength(const char *, size_t);
extern Atom Yap_FullLookupAtom(const char *);
extern void Yap_LookupAtomWithAddress(const char *, struct AtomEntryStruct *);
extern Prop Yap_NewPredPropByFunctor(struct FunctorEntryStruct *, Term);
extern Prop Yap_NewPredPropByAtom(struct AtomEntryStruct *, Term);
extern Prop Yap_PredPropByFunctorNonThreadLocal(struct FunctorEntryStruct *, Term);
extern Prop Yap_PredPropByAtomNonThreadLocal(struct AtomEntryStruct *, Term);
extern Functor Yap_UnlockedMkFunctor(struct AtomEntryStruct *, arity_t);
extern Functor Yap_MkFunctor(Atom, arity_t);
extern void Yap_MkFunctorWithAddress(Atom, unsigned int, FunctorEntry *);
extern void Yap_PutValue(Atom, Term);
extern void Yap_ReleaseAtom(Atom);
extern int Yap_AtomIncreaseHold(Atom);
extern int Yap_AtomDecreaseHold(Atom);
extern struct operator_entry *Yap_OpPropForModule(Atom, Term);
#ifdef SFUNC
2016-07-31 16:31:22 +01:00
extern Term MkSFTerm(Functor, int, Term *, Term);
extern CELL *ArgsOfSFTerm(Term);
#endif
2016-07-31 16:31:22 +01:00
extern Prop Yap_GetPredPropByAtom(Atom, Term);
extern Prop Yap_GetPredPropByFunc(Functor, Term);
extern Prop Yap_GetPredPropByAtomInThisModule(Atom, Term);
extern Prop Yap_GetPredPropByFuncInThisModule(Functor, Term);
extern Prop Yap_GetPredPropHavingLock(Atom, unsigned int, Term);
extern Prop Yap_GetExpProp(Atom, unsigned int);
extern Prop Yap_GetExpPropHavingLock(struct AtomEntryStruct *, unsigned int);
/* agc.c */
2016-07-31 16:31:22 +01:00
extern void Yap_atom_gc(CACHE_TYPE1);
extern void Yap_init_agc(void);
/* alloc.c */
2016-07-31 16:31:22 +01:00
extern void Yap_FreeCodeSpace(void *);
extern void *Yap_AllocAtomSpace(size_t);
extern void *Yap_AllocCodeSpace(size_t);
extern void *Yap_ReallocCodeSpace(void *, size_t);
extern ADDR Yap_AllocFromForeignArea(Int);
extern int Yap_ExtendWorkSpace(Int);
extern void Yap_FreeAtomSpace(void *);
extern int Yap_FreeWorkSpace(void);
extern void Yap_InitMemory(UInt, UInt, UInt);
extern void Yap_InitExStacks(int, int, int);
/* amasm.c */
2016-07-31 16:31:22 +01:00
extern OPCODE Yap_opcode(op_numbers);
/* analyst.c */
#ifdef ANALYST
2016-07-31 16:31:22 +01:00
extern void Yap_InitAnalystPreds(void);
#endif /* ANALYST */
/* arrays.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitArrayPreds(void);
2013-05-15 23:12:01 +01:00
/* atoms.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitBackAtoms(void);
extern void Yap_InitAtomPreds(void);
2013-05-15 23:12:01 +01:00
/* attvar.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitAttVarPreds(void);
extern void Yap_MkEmptyWakeUp(Atom mod);
/* bb.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitBBPreds(void);
/* bignum.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_MkULLIntTerm(YAP_ULONG_LONG);
extern int Yap_IsStringTerm(Term);
extern int Yap_IsWideStringTerm(Term);
extern Term Yap_RatTermToApplTerm(Term);
extern void Yap_InitBigNums(void);
extern Term Yap_AllocExternalDataInStack(CELL, size_t);
extern int Yap_CleanOpaqueVariable(CELL *);
extern CELL *Yap_HeapStoreOpaqueTerm(Term t);
extern size_t Yap_OpaqueTermToString(Term t, char *str, size_t max);
/* c_interface.c */
2014-04-28 11:48:24 +01:00
#ifndef YAP_CPP_INTERFACE
2016-07-31 16:31:22 +01:00
extern X_API Int YAP_Execute(struct pred_entry *, CPredicate);
extern X_API Int YAP_ExecuteFirst(struct pred_entry *, CPredicate);
extern X_API Int YAP_ExecuteNext(struct pred_entry *, CPredicate);
extern X_API Int YAP_ExecuteOnCut(struct pred_entry *, CPredicate, struct cut_c_str *);
extern X_API Int YAP_RunGoalOnce(Term);
2014-04-28 11:48:24 +01:00
#endif
/* cdmgr.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_all_calls(void);
extern Atom Yap_ConsultingFile(USES_REGS1);
extern struct pred_entry *Yap_PredForChoicePt(choiceptr bptr, op_numbers *op);
extern void Yap_InitCdMgr(void);
extern struct pred_entry *Yap_PredFromClause(Term t USES_REGS);
extern bool Yap_discontiguous(struct pred_entry *ap, Term mode USES_REGS);
extern bool Yap_multiple(struct pred_entry *ap, Term mode USES_REGS);
extern void Yap_init_consult(int, const char *);
extern void Yap_end_consult(void);
extern void Yap_Abolish(struct pred_entry *);
extern void Yap_BuildMegaClause(struct pred_entry *);
extern void Yap_EraseMegaClause(yamop *, struct pred_entry *);
extern void Yap_ResetConsultStack(void);
extern void Yap_AssertzClause(struct pred_entry *, yamop *);
extern void Yap_HidePred(struct pred_entry *pe);
extern int Yap_SetNoTrace(char *name, UInt arity, Term tmod);
extern bool Yap_unknown(Term tflagvalue);
extern struct pred_entry *Yap_MkLogPred(struct pred_entry *pe);
/* cmppreds.c */
2016-07-31 16:31:22 +01:00
extern Int Yap_compare_terms(Term, Term);
extern Int Yap_acmp(Term, Term USES_REGS);
extern void Yap_InitCmpPreds(void);
/* compiler.c */
2016-07-31 16:31:22 +01:00
extern yamop *Yap_cclause(Term, Int, Term, Term);
/* computils.c */
2016-07-31 16:31:22 +01:00
extern int Yap_DebugPutc(FILE *, wchar_t);
extern int Yap_DebugPuts(FILE *, const char *);
extern void Yap_DebugSetIFile(char *);
extern void Yap_DebugEndline(void);
extern void Yap_DebugPlWrite(Term t);
extern void Yap_DebugPlWriteln(Term t);
/* corout.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitCoroutPreds(void);
#ifdef COROUTINING
2016-07-31 16:31:22 +01:00
extern Term Yap_ListOfWokenGoals(void);
extern void Yap_WakeUp(CELL *);
#endif
/* dbase.c */
2016-07-31 16:31:22 +01:00
extern struct pred_entry *Yap_FindLUIntKey(Int);
extern int Yap_DBTrailOverflow(void);
extern CELL Yap_EvalMasks(Term, CELL *);
extern void Yap_InitBackDB(void);
extern void Yap_InitDBPreds(void);
/* errors.c */
#if DEBUG
2016-07-31 16:31:22 +01:00
extern const char *Yap_PrintPredName(struct pred_entry *ap);
#endif
2016-07-31 16:31:22 +01:00
extern void Yap_RestartYap(int);
extern void Yap_exit(int);
extern bool Yap_Warning(const char *s, ...);
extern bool Yap_PrintWarning(Term t);
extern bool Yap_HandleError__(const char *file, const char *function, int lineno,
const char *s, ...);
#define Yap_HandleError(...) \
Yap_HandleError__(__FILE__, __FUNCTION__, __LINE__, __VA_ARGS__)
2016-07-31 16:31:22 +01:00
extern int Yap_SWIHandleError(const char *, ...);
extern void Yap_InitErrorPreds(void);
/* eval.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitEval(void);
/* exec.c */
2016-07-31 16:31:22 +01:00
extern void Yap_fail_all(choiceptr bb USES_REGS);
2017-06-05 13:06:12 +01:00
extern Term Yap_ExecuteCallMetaCall(Term,Term);
2016-07-31 16:31:22 +01:00
extern void Yap_InitExecFs(void);
extern bool Yap_JumpToEnv(Term);
extern Term Yap_RunTopGoal(Term, bool);
extern bool Yap_execute_goal(Term, int, Term, bool);
extern bool Yap_exec_absmi(bool, yap_reset_t);
extern void Yap_trust_last(void);
extern void Yap_PrepGoal(UInt, CELL *, choiceptr USES_REGS);
extern bool Yap_execute_pred(struct pred_entry *ppe, CELL *pt,
bool pass_exception USES_REGS);
2016-07-31 16:31:22 +01:00
extern int Yap_dogc(int extra_args, Term *tp USES_REGS);
extern Term Yap_PredicateIndicator(Term t, Term mod);
extern bool Yap_Execute(Term t USES_REGS);
2015-07-06 12:01:55 +01:00
2013-01-07 09:47:14 +00:00
/* exo.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitExoPreds(void);
extern void Yap_udi_Interval_init(void);
extern bool Yap_Reset(yap_reset_t mode);
2013-01-07 09:47:14 +00:00
2013-01-29 10:50:04 +00:00
/* foreign.c */
2016-07-31 16:31:22 +01:00
extern char *Yap_FindExecutable(void);
2013-01-29 10:50:04 +00:00
/* gprof.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitLowProf(void);
2015-11-09 18:22:43 +00:00
#if LOW_PROF
2016-07-31 16:31:22 +01:00
extern void Yap_inform_profiler_of_clause__(void *, void *, struct pred_entry *,
2015-11-09 18:22:43 +00:00
gprof_info);
#define Yap_inform_profiler_of_clause(CODE0, CODEF, AP, MODE) \
{ \
if (GLOBAL_FPreds) \
Yap_inform_profiler_of_clause__(CODE0, CODEF, AP, MODE); \
}
#else
2015-11-09 18:22:43 +00:00
#define Yap_inform_profiler_of_clause(CODE0, CODEF, AP, MODE)
#endif
2016-07-31 16:31:22 +01:00
extern void Yap_tell_gprof(yamop *);
/* globals.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_NewArena(UInt, CELL *);
extern CELL *Yap_GetFromArena(Term *, UInt, UInt);
extern void Yap_InitGlobals(void);
extern Term Yap_SaveTerm(Term);
extern Term Yap_SetGlobalVal(Atom, Term);
extern Term Yap_GetGlobal(Atom);
extern Int Yap_DeleteGlobal(Atom);
extern void Yap_AllocateDefaultArena(Int, Int, int);
/* grow.c */
2016-07-31 16:31:22 +01:00
extern Int Yap_total_stack_shift_time(void);
extern void Yap_InitGrowPreds(void);
extern UInt Yap_InsertInGlobal(CELL *, UInt);
extern int Yap_growheap(bool, size_t, void *);
extern int Yap_growstack(size_t);
extern int Yap_growtrail(size_t, bool);
extern int Yap_growglobal(CELL **);
extern int Yap_locked_growheap(bool, size_t, void *);
extern int Yap_locked_growstack(size_t);
extern int Yap_locked_growtrail(size_t, bool);
extern int Yap_locked_growglobal(CELL **);
extern CELL **Yap_shift_visit(CELL **, CELL ***, CELL ***);
2010-01-14 15:58:19 +00:00
#ifdef THREADS
2016-07-31 16:31:22 +01:00
extern void Yap_CopyThreadStacks(int, int, int);
2010-01-14 15:58:19 +00:00
#endif
/* heapgc.c */
2016-07-31 16:31:22 +01:00
extern Int Yap_total_gc_time(void);
extern void Yap_init_gc(void);
extern bool Yap_is_gc_verbose(void);
extern int Yap_gc(Int, CELL *, yamop *);
extern int Yap_locked_gc(Int, CELL *, yamop *);
extern int Yap_gcl(UInt, Int, CELL *, yamop *);
extern int Yap_locked_gcl(UInt, Int, CELL *, yamop *);
/* init.c */
2016-07-31 16:31:22 +01:00
extern int Yap_IsOpType(char *);
2017-05-27 22:54:00 +01:00
extern void Yap_InitWorkspace(struct yap_boot_params *, UInt, UInt, UInt, UInt, UInt, int, int, int);
2016-07-31 16:31:22 +01:00
extern bool Yap_AddCallToFli(struct pred_entry *pe, CPredicate call);
extern bool Yap_AddRetryToFli(struct pred_entry *pe, CPredicate re);
extern bool Yap_AddCutToFli(struct pred_entry *pe, CPredicate cut);
extern const char *Yap_version(void);
#ifdef YAPOR
2016-07-31 16:31:22 +01:00
extern void Yap_init_yapor_workers(void);
#endif /* YAPOR */
#if defined(YAPOR) || defined(THREADS)
2016-07-31 16:31:22 +01:00
extern void Yap_KillStacks(int);
#else
2016-07-31 16:31:22 +01:00
extern void Yap_KillStacks(int);
#endif
2016-07-31 16:31:22 +01:00
extern void Yap_InitYaamRegs(int);
extern void Yap_ReInitWTime(void);
extern int Yap_OpDec(int, char *, Atom, Term);
extern void Yap_CloseScratchPad(void);
/* inlines.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitInlines(void);
extern int Yap_eq(Term, Term);
/* iopreds.c */
2017-05-27 22:54:00 +01:00
extern void Yap_InitPlIO( struct yap_boot_params *ts );
2016-07-31 16:31:22 +01:00
extern void Yap_InitBackIO(void);
extern void Yap_InitIOPreds(void);
2015-11-09 18:22:43 +00:00
extern void Yap_DebugPlWrite(Term t);
extern void Yap_DebugPlWriteln(Term t);
extern void Yap_DebugErrorPutc(int n);
extern void Yap_DebugErrorPuts(const char *s);
extern void Yap_DebugWriteIndicator(struct pred_entry *ap);
2016-07-31 16:31:22 +01:00
extern void Yap_PlWriteToStream(Term, int, int);
extern void Yap_CloseReadline(void);
/* depth_lim.c */
2016-07-31 16:31:22 +01:00
extern bool Yap_InitReadline(Term t);
extern void Yap_InitItDeepenPreds(void);
extern struct AliasDescS *Yap_InitStandardAliases(void);
extern struct vfs *Yap_InitAssetManager(void);
2015-11-09 18:22:43 +00:00
/* load_foreign.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitLoadForeign(void);
extern bool Yap_LateInit(const char s[]);
/* mavar.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitMaVarCPreds(void);
extern Term Yap_NewTimedVar(Term);
extern Term Yap_NewEmptyTimedVar(void);
extern Term Yap_ReadTimedVar(Term);
extern Term Yap_UpdateTimedVar(Term, Term);
/* modules.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_Module(Term);
extern Term Yap_Module_Name(struct pred_entry *);
extern struct pred_entry *Yap_ModulePred(Term);
extern void Yap_NewModulePred(Term, struct pred_entry *);
extern Term Yap_StripModule(Term, Term *);
extern Term Yap_YapStripModule(Term, Term *);
extern void Yap_InitModules(void);
extern void Yap_InitModulesC(void);
extern struct mod_entry *Yap_GetModuleEntry(Term tmod);
extern Term Yap_GetModuleFromEntry(struct mod_entry *me);
extern bool Yap_CharacterEscapes(Term mt);
extern bool Yap_constPred(struct pred_entry *pt);
extern bool Yap_isSystemModule(Term mod);
#if HAVE_MPI
/* mpi.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitMPI(void);
#endif
#if HAVE_MPE
/* mpe.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitMPE(void);
#endif
/* other.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_MkApplTerm(Functor, arity_t, const Term *);
extern Term Yap_MkNewApplTerm(Functor, arity_t);
extern Term Yap_MkNewPairTerm(void);
extern Term Yap_Globalise(Term);
/* readutil.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitReadUtil(void);
2011-08-03 08:23:00 +01:00
/* qly.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitQLY(void);
extern YAP_file_type_t Yap_Restore(const char *, const char *);
extern void Yap_InitQLYR(void);
2011-08-03 08:23:00 +01:00
2012-10-23 14:55:17 +01:00
/* range.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitRange(void);
2012-10-23 14:55:17 +01:00
/* save.c */
2016-07-31 16:31:22 +01:00
extern int Yap_SavedInfo(const char *, const char *, CELL *, CELL *, CELL *);
extern int Yap_SavedStateRestore(char *, char *);
extern FILE *Yap_OpenRestore(const char *, const char *);
extern void Yap_InitSavePreds(void);
/* scanner.c */
2013-02-08 16:36:45 +00:00
/* signals.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitSignalCPreds(void);
extern void *Yap_InitSignals(int wid);
extern bool Yap_DisableInterrupts(int wid);
extern bool Yap_EnableInterrupts(int wid);
2013-02-08 16:36:45 +00:00
2016-07-31 16:31:22 +01:00
extern void Yap_InitSockets(void);
2015-06-19 00:52:03 +01:00
/* sort.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitSortPreds(void);
2015-09-21 23:05:36 +01:00
/* stack.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitStInfo(void);
extern void Yap_dump_stack(void);
extern void Yap_detect_bug_location(yamop *yap_pc, int where_from, int psize);
2015-09-25 10:57:26 +01:00
2015-09-21 23:05:36 +01:00
#if !defined(YAPOR) && !defined(THREADS)
2016-07-31 16:31:22 +01:00
extern bool Yap_search_for_static_predicate_in_use(struct pred_entry *, bool);
2015-09-21 23:05:36 +01:00
#endif
/* stdpreds.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitBackCPreds(void);
extern void Yap_InitCPreds(void);
extern void Yap_show_statistics(void);
extern int Yap_IsOpMaxPrio(Atom);
/* sysbits.c */
2016-07-31 16:31:22 +01:00
extern size_t Yap_InitPageSize(void);
extern bool Yap_set_fpu_exceptions(Term);
extern UInt Yap_cputime(void);
extern uint64_t Yap_walltime(void);
extern int Yap_dir_separator(int);
extern int Yap_volume_header(char *);
extern int Yap_signal_index(const char *);
#ifdef MAC
2016-07-31 16:31:22 +01:00
extern void Yap_SetTextFile(char *);
#endif
#if __ANDROID__
2016-04-05 02:28:56 +01:00
#include <android/asset_manager.h>
2015-11-09 18:22:43 +00:00
extern AAssetManager *Yap_assetManager;
2015-04-13 13:28:17 +01:00
2015-11-09 18:22:43 +00:00
extern void *Yap_openAssetFile(const char *path);
extern bool Yap_isAsset(const char *path);
2015-04-13 13:28:17 +01:00
#endif
2016-07-31 16:31:22 +01:00
extern const char *Yap_getcwd(const char *, size_t);
extern void Yap_cputime_interval(Int *, Int *);
extern void Yap_systime_interval(Int *, Int *);
extern void Yap_InitSysbits(int wid);
extern void Yap_InitSysPreds(void);
extern void Yap_InitcTime(int);
extern void Yap_InitTime(int);
extern double Yap_random(void);
#ifdef _WIN32
2016-07-31 16:31:22 +01:00
extern char *Yap_RegistryGetString(char *);
extern void Yap_WinError(char *);
#endif
2016-07-31 16:31:22 +01:00
extern const char *Yap_AbsoluteFile(const char *spec, char *obuf, bool ok);
extern const char *Yap_AbsoluteFileInBuffer(const char *spec, char *outp, size_t sz,
bool ok);
2016-07-31 16:31:22 +01:00
extern const char *Yap_findFile(const char *isource, const char *idef,
const char *root, char *result, bool access,
YAP_file_type_t ftype, bool expand_root, bool in_lib);
/* threads.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitThreadPreds(void);
extern void Yap_InitFirstWorkerThreadHandle(void);
extern int Yap_ThreadID(void);
extern int Yap_NOfThreads(void);
2011-03-11 19:49:32 +00:00
#if THREADS
2016-07-31 16:31:22 +01:00
extern int Yap_InitThread(int);
2011-03-11 19:49:32 +00:00
#endif
2016-07-31 16:31:22 +01:00
extern intptr_t system_thread_id(void);
/* tracer.c */
#ifdef LOW_LEVEL_TRACER
2016-07-31 16:31:22 +01:00
extern void Yap_InitLowLevelTrace(void);
#endif
extern void *Yap_InitTextAllocator( void );
2009-03-27 15:28:50 +00:00
/* udi.c */
2016-07-31 16:31:22 +01:00
extern void Yap_udi_init(void);
extern void Yap_udi_abolish(struct pred_entry *);
2009-03-27 15:28:50 +00:00
/* unify.c */
2016-07-31 16:31:22 +01:00
extern int Yap_rational_tree_loop(CELL *, CELL *, CELL **, CELL **);
extern void Yap_InitAbsmi(void);
extern void Yap_InitUnify(void);
extern void Yap_TrimTrail(void);
extern int Yap_Unifiable(Term d0, Term d1);
extern int Yap_IUnify(register CELL d0, register CELL d1);
/* userpreds.c */
2016-07-31 16:31:22 +01:00
extern void Yap_InitUserCPreds(void);
extern void Yap_InitUserBacks(void);
/* utilpreds.c */
2016-07-31 16:31:22 +01:00
extern Term Yap_CopyTerm(Term);
extern bool Yap_Variant(Term, Term);
extern size_t Yap_ExportTerm(Term, char *, size_t, UInt);
extern size_t Yap_SizeOfExportedTerm(char *);
extern Term Yap_ImportTerm(char *);
extern bool Yap_IsListTerm(Term);
extern bool Yap_IsListOrPartialListTerm(Term);
extern Term Yap_CopyTermNoShare(Term);
extern int Yap_SizeGroundTerm(Term, int);
extern bool Yap_IsGroundTerm(Term);
extern bool Yap_IsAcyclicTerm(Term);
extern void Yap_InitUtilCPreds(void);
extern Int Yap_TermHash(Term, Int, Int, int);
extern Int Yap_NumberVars(Term, Int, bool);
extern Term Yap_TermVariables(Term t, UInt arity USES_REGS);
extern Term Yap_UnNumberTerm(Term, int);
extern Int Yap_SkipList(Term *, Term **);
/* yap.c */
/* write.c */
/* yap2swi.c */
2016-07-31 16:31:22 +01:00
extern void Yap_swi_install(void);
extern void Yap_InitSWIHash(void);
extern int Yap_get_stream_handle(Term, int, int, void *);
extern Term Yap_get_stream_position(void *);
extern struct AtomEntryStruct *Yap_lookupBlob(void *blob, size_t len, void *type,
2015-11-09 18:22:43 +00:00
int *newp);
/* opt.preds.c */
2016-07-31 16:31:22 +01:00
extern void Yap_init_optyap_preds(void);
2011-03-03 11:41:21 +00:00
/* pl-file.c */
2016-01-31 10:42:08 +00:00
// struct PL_local_data *Yap_InitThreadIO(int wid);
2016-07-31 16:31:22 +01:00
extern void Yap_flush(void);
/* pl-yap.c */
2016-07-31 16:31:22 +01:00
extern Int Yap_source_line_no(void);
extern Atom Yap_source_file_name(void);
extern void Yap_install_blobs(void);
2015-06-19 00:52:03 +01:00
2016-07-31 16:31:22 +01:00
extern yamop *Yap_gcP(void);
2015-06-19 00:52:03 +01:00
2016-07-31 16:31:22 +01:00
#if USE_MYDDAS
extern void init_myddas(void);
#endif
2016-01-31 10:42:08 +00:00
#if !HAVE_STRNCAT
#define strncat(X, Y, Z) strcat(X, Y)
#endif
#if !HAVE_STRNCPY
#define strncpy(X, Y, Z) strcpy(X, Y)
#endif
2017-05-27 22:54:00 +01:00
2017-06-05 13:06:12 +01:00
#endif /* YAP_PROTOS_H */