2001-04-09 20:54:03 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* *
|
|
|
|
* 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 *
|
2008-08-07 21:51:23 +01:00
|
|
|
* version: $Id: Yapproto.h,v 1.90 2008-08-07 20:51:23 vsc Exp $ *
|
2001-04-09 20:54:03 +01:00
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
/* prototype file for Yap */
|
|
|
|
|
|
|
|
#define STD_PROTO(F,A) F A
|
|
|
|
#define STATIC_PROTO(F,A) static F A
|
|
|
|
|
|
|
|
|
|
|
|
/* absmi.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Int STD_PROTO(Yap_absmi,(int));
|
2008-03-26 14:37:08 +00:00
|
|
|
int STD_PROTO(Yap_absmiEND,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* adtdefs.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_ArrayToList,(Term *,int));
|
|
|
|
int STD_PROTO(Yap_GetName,(char *,UInt,Term));
|
|
|
|
Term STD_PROTO(Yap_GetValue,(Atom));
|
|
|
|
Atom STD_PROTO(Yap_LookupAtom,(char *));
|
2008-03-27 00:41:33 +00:00
|
|
|
Atom STD_PROTO(Yap_LookupMaybeWideAtom,(wchar_t *));
|
2002-11-18 18:18:05 +00:00
|
|
|
Atom STD_PROTO(Yap_FullLookupAtom,(char *));
|
|
|
|
void STD_PROTO(Yap_LookupAtomWithAddress,(char *,AtomEntry *));
|
2004-02-12 12:37:12 +00:00
|
|
|
Prop STD_PROTO(Yap_NewPredPropByFunctor,(struct FunctorEntryStruct *, Term));
|
|
|
|
Prop STD_PROTO(Yap_NewPredPropByAtom,(struct AtomEntryStruct *, Term));
|
|
|
|
Prop STD_PROTO(Yap_PredPropByFunctorNonThreadLocal,(struct FunctorEntryStruct *, Term));
|
|
|
|
Prop STD_PROTO(Yap_PredPropByAtomNonThreadLocal,(struct AtomEntryStruct *, Term));
|
2002-11-18 18:18:05 +00:00
|
|
|
Functor STD_PROTO(Yap_UnlockedMkFunctor,(AtomEntry *,unsigned int));
|
|
|
|
Functor STD_PROTO(Yap_MkFunctor,(Atom,unsigned int));
|
|
|
|
void STD_PROTO(Yap_MkFunctorWithAddress,(Atom,unsigned int,FunctorEntry *));
|
|
|
|
void STD_PROTO(Yap_PutValue,(Atom,Term));
|
|
|
|
void STD_PROTO(Yap_ReleaseAtom,(Atom));
|
|
|
|
Term STD_PROTO(Yap_StringToList,(char *));
|
2008-07-24 17:02:04 +01:00
|
|
|
Term STD_PROTO(Yap_NStringToList,(char *, size_t));
|
|
|
|
Term STD_PROTO(Yap_WideStringToList,(wchar_t *));
|
|
|
|
Term STD_PROTO(Yap_NWideStringToList,(wchar_t *, size_t));
|
2006-08-02 19:18:31 +01:00
|
|
|
Term STD_PROTO(Yap_StringToDiffList,(char *,Term));
|
2008-07-24 17:02:04 +01:00
|
|
|
Term STD_PROTO(Yap_NStringToDiffList,(char *,Term, size_t));
|
|
|
|
Term STD_PROTO(Yap_WideStringToDiffList,(wchar_t *,Term));
|
|
|
|
Term STD_PROTO(Yap_NWideStringToDiffList,(wchar_t *,Term, size_t));
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_StringToListOfAtoms,(char *));
|
2008-07-24 17:02:04 +01:00
|
|
|
Term STD_PROTO(Yap_NStringToListOfAtoms,(char *, size_t));
|
|
|
|
Term STD_PROTO(Yap_WideStringToListOfAtoms,(wchar_t *));
|
|
|
|
Term STD_PROTO(Yap_NWideStringToListOfAtoms,(wchar_t *, size_t));
|
2008-12-17 14:47:05 +00:00
|
|
|
Term STD_PROTO(Yap_NWideStringToDiffListOfAtoms,(wchar_t *, Term, size_t));
|
2007-12-05 12:17:25 +00:00
|
|
|
struct hold_entry *STD_PROTO(Yap_InitAtomHold,(void));
|
|
|
|
int STD_PROTO(Yap_AtomGetHold,(Atom));
|
|
|
|
int STD_PROTO(Yap_AtomReleaseHold,(Atom));
|
2002-11-18 18:18:05 +00:00
|
|
|
|
2004-08-16 22:02:04 +01:00
|
|
|
#define Yap_StartSlots() (*--ASP = MkIntTerm(0))
|
2007-05-14 17:44:12 +01:00
|
|
|
#define Yap_CurrentSlot() IntOfTerm(ASP[0])
|
2002-11-18 18:18:05 +00:00
|
|
|
long STD_PROTO(Yap_InitSlot,(Term));
|
|
|
|
long STD_PROTO(Yap_NewSlots,(int));
|
|
|
|
Term STD_PROTO(Yap_GetFromSlot,(long));
|
2008-06-17 14:37:51 +01:00
|
|
|
int STD_PROTO(Yap_RecoverSlots,(int));
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_GetFromSlot,(long));
|
|
|
|
Term *STD_PROTO(Yap_AddressFromSlot,(long));
|
|
|
|
void STD_PROTO(Yap_PutInSlot,(long, Term));
|
2002-10-17 01:05:29 +01:00
|
|
|
|
|
|
|
|
2008-03-25 22:03:14 +00:00
|
|
|
#ifdef SFUNC
|
2001-04-09 20:54:03 +01:00
|
|
|
Term STD_PROTO(MkSFTerm,(Functor,int,Term *,Term));
|
|
|
|
CELL STD_PROTO(*ArgsOfSFTerm,(Term));
|
|
|
|
#endif
|
|
|
|
|
2004-02-12 12:37:12 +00:00
|
|
|
Prop STD_PROTO(Yap_GetPredPropByAtom,(Atom, Term));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropByFunc,(Functor, Term));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropByAtomInThisModule,(Atom, Term));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropByFuncInThisModule,(Functor, Term));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropHavingLock,(Atom,unsigned int, Term));
|
2002-11-18 18:18:05 +00:00
|
|
|
Prop STD_PROTO(Yap_GetExpProp,(Atom,unsigned int));
|
|
|
|
Prop STD_PROTO(Yap_GetExpPropHavingLock,(AtomEntry *,unsigned int));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2002-06-04 19:21:55 +01:00
|
|
|
/* agc.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_atom_gc, (void));
|
|
|
|
void STD_PROTO(Yap_init_agc, (void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* alloc.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_FreeCodeSpace,(char *));
|
2009-03-27 14:45:40 +00:00
|
|
|
char *STD_PROTO(Yap_AllocAtomSpace,(unsigned long int));
|
|
|
|
char *STD_PROTO(Yap_AllocCodeSpace,(unsigned long int));
|
2002-11-18 18:18:05 +00:00
|
|
|
ADDR STD_PROTO(Yap_AllocFromForeignArea,(Int));
|
|
|
|
int STD_PROTO(Yap_ExtendWorkSpace,(Int));
|
|
|
|
void STD_PROTO(Yap_FreeAtomSpace,(char *));
|
|
|
|
int STD_PROTO(Yap_FreeWorkSpace, (void));
|
2009-03-27 14:45:40 +00:00
|
|
|
void STD_PROTO(Yap_InitMemory,(UInt,UInt,UInt));
|
2004-01-23 02:23:51 +00:00
|
|
|
void STD_PROTO(Yap_InitExStacks,(int,int));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* amasm.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
OPCODE STD_PROTO(Yap_opcode,(op_numbers));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* analyst.c */
|
|
|
|
#ifdef ANALYST
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitAnalystPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif /* ANALYST */
|
|
|
|
|
|
|
|
/* arrays.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitArrayPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* attvar.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitAttVarPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* bb.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitBBPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* bignum.c */
|
2003-03-20 15:10:18 +00:00
|
|
|
Term STD_PROTO(Yap_MkULLIntTerm,(YAP_ULONG_LONG));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitBigNums,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* c_interface.c */
|
2002-09-09 18:40:12 +01:00
|
|
|
Int STD_PROTO(YAP_Execute,(struct pred_entry *, CPredicate));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* cdmgr.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_all_calls,(void));
|
|
|
|
Atom STD_PROTO(Yap_ConsultingFile,(void));
|
2004-09-27 21:45:04 +01:00
|
|
|
struct pred_entry *STD_PROTO(Yap_PredForChoicePt,(choiceptr));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitCdMgr,(void));
|
2008-03-25 22:03:14 +00:00
|
|
|
#ifdef EMACS
|
2001-04-09 20:54:03 +01:00
|
|
|
int STD_PROTO(where_new_clause, (Prop, int));
|
|
|
|
#endif
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_init_consult,(int, char *));
|
|
|
|
void STD_PROTO(Yap_end_consult,(void));
|
2004-02-11 01:20:56 +00:00
|
|
|
void STD_PROTO(Yap_Abolish,(struct pred_entry *));
|
2004-09-27 21:45:04 +01:00
|
|
|
void STD_PROTO(Yap_BuildMegaClause,(struct pred_entry *));
|
|
|
|
void STD_PROTO(Yap_EraseMegaClause,(yamop *,struct pred_entry *));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* cmppreds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_compare_terms,(Term,Term));
|
|
|
|
void STD_PROTO(Yap_InitCmpPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* compiler.c */
|
2009-04-07 15:44:46 +01:00
|
|
|
yamop *STD_PROTO(Yap_cclause,(Term, int, Term, Term));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* computils.c */
|
|
|
|
|
|
|
|
/* corout.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitCoroutPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#ifdef COROUTINING
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_ListOfWokenGoals,(void));
|
|
|
|
void STD_PROTO(Yap_WakeUp,(CELL *));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* dbase.c */
|
2008-09-15 04:30:09 +01:00
|
|
|
struct pred_entry *STD_PROTO(Yap_FindLUIntKey,(Int));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_DBTrailOverflow,(void));
|
|
|
|
CELL STD_PROTO(Yap_EvalMasks,(Term,CELL *));
|
|
|
|
void STD_PROTO(Yap_InitBackDB,(void));
|
|
|
|
void STD_PROTO(Yap_InitDBPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* errors.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_exit,(int));
|
|
|
|
yamop *STD_PROTO(Yap_Error,(yap_error_number,Term,char *msg, ...));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* eval.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitEval,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* exec.c */
|
2004-02-12 12:37:12 +00:00
|
|
|
Term STD_PROTO(Yap_ExecuteCallMetaCall,(Term));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitExecFs,(void));
|
|
|
|
Int STD_PROTO(Yap_JumpToEnv,(Term));
|
2004-06-05 04:37:01 +01:00
|
|
|
Term STD_PROTO(Yap_RunTopGoal,(Term));
|
2004-02-12 12:37:12 +00:00
|
|
|
Int STD_PROTO(Yap_execute_goal,(Term, int, Term));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_exec_absmi,(int));
|
|
|
|
void STD_PROTO(Yap_trust_last,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2005-12-17 03:25:39 +00:00
|
|
|
/* gprof.c */
|
|
|
|
void STD_PROTO(Yap_InitLowProf,(void));
|
|
|
|
#if LOW_PROF
|
|
|
|
void STD_PROTO(Yap_inform_profiler_of_clause,(struct yami *,struct yami *,struct pred_entry *,int));
|
|
|
|
#else
|
|
|
|
#define Yap_inform_profiler_of_clause(A,B,C,D)
|
|
|
|
#endif
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2006-08-22 17:12:46 +01:00
|
|
|
/* globals.c */
|
|
|
|
Term STD_PROTO(Yap_NewArena,(UInt,CELL *));
|
|
|
|
void STD_PROTO(Yap_InitGlobals,(void));
|
2008-12-29 00:11:05 +00:00
|
|
|
int STD_PROTO(Yap_SetGlobalVal, (Atom, Term));
|
|
|
|
void STD_PROTO(Yap_AllocateDefaultArena, (Int, Int));
|
2006-08-22 17:12:46 +01:00
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* grow.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Int STD_PROTO(Yap_total_stack_shift_time,(void));
|
|
|
|
void STD_PROTO(Yap_InitGrowPreds, (void));
|
2006-12-13 16:10:26 +00:00
|
|
|
UInt STD_PROTO(Yap_InsertInGlobal, (CELL *, UInt));
|
2004-01-23 02:23:51 +00:00
|
|
|
int STD_PROTO(Yap_growheap, (int, UInt, void *));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_growstack, (long));
|
2004-12-28 22:20:37 +00:00
|
|
|
int STD_PROTO(Yap_growtrail, (long, int));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_growglobal, (CELL **));
|
2004-02-05 16:57:02 +00:00
|
|
|
CELL **STD_PROTO(Yap_shift_visit, (CELL **, CELL ***));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* heapgc.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Int STD_PROTO(Yap_total_gc_time,(void));
|
|
|
|
void STD_PROTO(Yap_init_gc,(void));
|
|
|
|
int STD_PROTO(Yap_is_gc_verbose, (void));
|
|
|
|
int STD_PROTO(Yap_gc, (Int, CELL *, yamop *));
|
2003-05-19 14:04:09 +01:00
|
|
|
int STD_PROTO(Yap_gcl, (UInt, Int, CELL *, yamop *));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* init.c */
|
|
|
|
#ifdef DEBUG
|
2007-01-28 14:26:37 +00:00
|
|
|
int STD_PROTO(Yap_DebugPutc,(int,wchar_t));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_DebugSetIFile,(char *));
|
|
|
|
void STD_PROTO(Yap_DebugEndline,(void));
|
|
|
|
int STD_PROTO(Yap_DebugGetc,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_IsOpType,(char *));
|
|
|
|
void STD_PROTO(Yap_InitCPred,(char *, unsigned long int, CPredicate, int));
|
|
|
|
void STD_PROTO(Yap_InitAsmPred,(char *, unsigned long int, int, CPredicate, int));
|
2003-01-13 14:02:50 +00:00
|
|
|
void STD_PROTO(Yap_InitCmpPred,(char *, unsigned long int, CmpPredicate, int));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitCPredBack,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,int));
|
2005-11-18 18:52:41 +00:00
|
|
|
#ifdef CUT_C
|
|
|
|
void STD_PROTO(Yap_InitCPredBackCut,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,int));
|
|
|
|
void STD_PROTO(Yap_InitCPredBack_,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,int));
|
|
|
|
#endif
|
2009-03-27 15:15:54 +00:00
|
|
|
void STD_PROTO(Yap_InitWorkspace,(UInt,UInt,UInt,UInt,UInt,int,int,int));
|
2004-02-19 19:24:46 +00:00
|
|
|
|
|
|
|
#if defined(YAPOR) || defined(THREADS)
|
|
|
|
void STD_PROTO(Yap_KillStacks,(int));
|
|
|
|
#else
|
2004-01-23 02:23:51 +00:00
|
|
|
void STD_PROTO(Yap_KillStacks,(void));
|
2004-02-19 19:24:46 +00:00
|
|
|
#endif
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitYaamRegs,(void));
|
|
|
|
void STD_PROTO(Yap_ReInitWallTime, (void));
|
2005-10-21 17:09:03 +01:00
|
|
|
int STD_PROTO(Yap_OpDec,(int,char *,Atom,Term));
|
2002-11-11 17:38:10 +00:00
|
|
|
|
|
|
|
/* inlines.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitInlines,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* iopreds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitPlIO,(void));
|
|
|
|
void STD_PROTO(Yap_InitBackIO,(void));
|
|
|
|
void STD_PROTO(Yap_InitIOPreds,(void));
|
2005-12-05 17:16:12 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
extern void Yap_DebugPlWrite (Term t);
|
|
|
|
extern void Yap_DebugErrorPutc (int n);
|
|
|
|
#endif
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* depth_lim.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitItDeepenPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* load_foreign.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitLoadForeign,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* mavar.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitMaVarCPreds,(void));
|
|
|
|
Term STD_PROTO(Yap_NewTimedVar,(Term));
|
|
|
|
Term STD_PROTO(Yap_NewEmptyTimedVar,(void));
|
|
|
|
Term STD_PROTO(Yap_ReadTimedVar,(Term));
|
|
|
|
Term STD_PROTO(Yap_UpdateTimedVar,(Term, Term));
|
2002-11-11 17:38:10 +00:00
|
|
|
|
|
|
|
/* modules.c */
|
2004-08-11 17:14:55 +01:00
|
|
|
Term STD_PROTO(Yap_Module, (Term));
|
2004-02-12 12:37:12 +00:00
|
|
|
Term STD_PROTO(Yap_Module_Name, (struct pred_entry *));
|
|
|
|
struct pred_entry *STD_PROTO(Yap_ModulePred, (Term));
|
|
|
|
void STD_PROTO(Yap_NewModulePred, (Term, struct pred_entry *));
|
2008-08-07 21:51:23 +01:00
|
|
|
Term STD_PROTO(Yap_StripModule, (Term, Term *));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitModules, (void));
|
2004-02-06 02:26:23 +00:00
|
|
|
void STD_PROTO(Yap_InitModulesC, (void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2002-02-11 20:46:41 +00:00
|
|
|
#if HAVE_MPI
|
|
|
|
/* mpi.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitMPI,(void));
|
2002-02-11 20:46:41 +00:00
|
|
|
#endif
|
|
|
|
|
2002-10-03 18:29:46 +01:00
|
|
|
#if HAVE_MPE
|
|
|
|
/* mpe.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitMPE,(void));
|
2002-10-03 18:29:46 +01:00
|
|
|
#endif
|
|
|
|
|
2002-11-11 17:38:10 +00:00
|
|
|
|
|
|
|
/* other.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_MkApplTerm,(Functor,unsigned int,Term *));
|
|
|
|
Term STD_PROTO(Yap_MkNewApplTerm,(Functor,unsigned int));
|
|
|
|
Term STD_PROTO(Yap_MkNewPairTerm,(void));
|
2002-11-11 17:38:10 +00:00
|
|
|
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* parser.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_Parse,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2006-08-02 19:18:31 +01:00
|
|
|
/* readutil.c */
|
|
|
|
void STD_PROTO(Yap_InitReadUtil,(void));
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* save.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_SavedInfo,(char *,char *,CELL *,CELL *,CELL *));
|
|
|
|
int STD_PROTO(Yap_Restore,(char *, char *));
|
|
|
|
void STD_PROTO(Yap_InitSavePreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* scanner.c */
|
|
|
|
|
|
|
|
/* sort.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitSortPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* stdpreds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitBackCPreds,(void));
|
|
|
|
void STD_PROTO(Yap_InitCPreds,(void));
|
|
|
|
void STD_PROTO(Yap_show_statistics,(void));
|
2004-01-23 02:23:51 +00:00
|
|
|
void STD_PROTO(Yap_signal,(yap_signals));
|
2005-10-28 18:38:50 +01:00
|
|
|
void STD_PROTO(Yap_undo_signal,(yap_signals));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* sysbits.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_set_fpu_exceptions,(int));
|
2004-03-02 16:44:58 +00:00
|
|
|
UInt STD_PROTO(Yap_cputime,(void));
|
2002-11-18 18:18:05 +00:00
|
|
|
Int STD_PROTO(Yap_walltime,(void));
|
|
|
|
int STD_PROTO(Yap_dir_separator,(int));
|
|
|
|
int STD_PROTO(Yap_volume_header,(char *));
|
|
|
|
void STD_PROTO(Yap_InitSysPath,(void));
|
2008-03-25 22:03:14 +00:00
|
|
|
#ifdef MAC
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_SetTextFile,(char *));
|
2002-11-11 17:38:10 +00:00
|
|
|
#endif
|
2008-12-13 16:07:55 +00:00
|
|
|
int STD_PROTO(Yap_getcwd,(const char *, int));
|
2009-02-09 21:56:40 +00:00
|
|
|
void STD_PROTO(Yap_cputime_interval,(Int *,Int *));
|
|
|
|
void STD_PROTO(Yap_systime_interval,(Int *,Int *));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_walltime_interval,(Int *,Int *));
|
|
|
|
void STD_PROTO(Yap_InitSysbits,(void));
|
|
|
|
void STD_PROTO(Yap_InitSysPreds,(void));
|
2004-03-02 16:44:58 +00:00
|
|
|
void STD_PROTO(Yap_InitTime,(void));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_TrueFileName, (char *, char *, int));
|
|
|
|
int STD_PROTO(Yap_ProcessSIGINT,(void));
|
|
|
|
double STD_PROTO(Yap_random, (void));
|
2008-03-27 00:41:33 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
char *STD_PROTO(Yap_RegistryGetString,(char *));
|
|
|
|
#endif
|
2001-04-09 20:54:03 +01:00
|
|
|
|
2004-01-23 02:23:51 +00:00
|
|
|
/* threads.c */
|
|
|
|
void STD_PROTO(Yap_InitThreadPreds,(void));
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* tracer.c */
|
|
|
|
#ifdef LOW_LEVEL_TRACER
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitLowLevelTrace,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif
|
|
|
|
|
2009-03-27 15:28:50 +00:00
|
|
|
/* udi.c */
|
|
|
|
void STD_PROTO(Yap_udi_init,(void));
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* unify.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitAbsmi,(void));
|
|
|
|
void STD_PROTO(Yap_InitUnify,(void));
|
2008-06-04 15:47:18 +01:00
|
|
|
void STD_PROTO(Yap_TrimTrail,(void));
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_IUnify,(register CELL d0,register CELL d1));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* userpreds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitUserCPreds,(void));
|
|
|
|
void STD_PROTO(Yap_InitUserBacks,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* utilpreds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_CopyTerm,(Term));
|
2008-08-06 18:32:22 +01:00
|
|
|
Term STD_PROTO(Yap_CopyTermNoShare,(Term));
|
2007-11-06 17:02:13 +00:00
|
|
|
int STD_PROTO(Yap_SizeGroundTerm,(Term, int));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitUtilCPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* yap.c */
|
|
|
|
|
2006-03-09 15:52:06 +00:00
|
|
|
/* MYDDAS */
|
|
|
|
|
2006-03-10 16:58:39 +00:00
|
|
|
#if defined MYDDAS_MYSQL || defined MYDDAS_ODBC
|
|
|
|
|
2006-03-09 15:52:06 +00:00
|
|
|
/* myddas_initialization.c */
|
2006-06-06 15:11:36 +01:00
|
|
|
MYDDAS_GLOBAL STD_PROTO(myddas_init_initialize_myddas,(void));
|
|
|
|
MYDDAS_UTIL_CONNECTION STD_PROTO(myddas_init_initialize_connection,(void *,void *,MYDDAS_UTIL_CONNECTION));
|
|
|
|
MYDDAS_UTIL_PREDICATE STD_PROTO(myddas_init_initialize_predicate,(char *, int, char *,MYDDAS_UTIL_PREDICATE));
|
|
|
|
|
|
|
|
#ifdef MYDDAS_STATS
|
|
|
|
/* myddas_statistics.c */
|
|
|
|
MYDDAS_GLOBAL STD_PROTO(myddas_stats_initialize_global_stats,(MYDDAS_GLOBAL));
|
|
|
|
MYDDAS_STATS_STRUCT STD_PROTO(myddas_stats_initialize_connection_stats,(void));
|
|
|
|
void STD_PROTO(myddas_stats_delete_stats_list,(MYDDAS_STATS_STRUCT));
|
|
|
|
#endif /* MYDDAS_STATS */
|
2006-03-09 15:52:06 +00:00
|
|
|
|
2006-04-24 13:04:21 +01:00
|
|
|
#ifdef MYDDAS_MYSQL
|
2006-03-09 15:52:06 +00:00
|
|
|
/* myddas_util.c */
|
|
|
|
void STD_PROTO(myddas_util_table_write,(MYSQL_RES *));
|
2006-04-24 13:04:21 +01:00
|
|
|
#endif
|
2006-03-09 15:52:06 +00:00
|
|
|
Short STD_PROTO(myddas_util_connection_type,(void *));
|
|
|
|
MYDDAS_UTIL_CONNECTION STD_PROTO(myddas_util_add_connection,(void *,void *));
|
|
|
|
MYDDAS_UTIL_CONNECTION STD_PROTO(myddas_util_search_connection,(void *));
|
|
|
|
void STD_PROTO(myddas_util_delete_connection,(void *));
|
|
|
|
MYDDAS_UTIL_CONNECTION STD_PROTO(myddas_util_add_predicate,(char * ,Int , char *,void *));
|
|
|
|
MYDDAS_UTIL_PREDICATE STD_PROTO(myddas_util_search_predicate,(char * ,Int , char *));
|
|
|
|
void STD_PROTO(myddas_util_delete_predicate,(MYDDAS_UTIL_PREDICATE));
|
|
|
|
|
|
|
|
/* Get's the number of queries to save */
|
|
|
|
UInt STD_PROTO(myddas_util_get_total_multi_queries_number,(MYDDAS_UTIL_CONNECTION));
|
|
|
|
void STD_PROTO(myddas_util_set_total_multi_queries_number,(MYDDAS_UTIL_CONNECTION,UInt));
|
|
|
|
#ifdef MYDDAS_ODBC
|
|
|
|
/* Return enviromment identifier*/
|
|
|
|
SQLHENV STD_PROTO(myddas_util_get_odbc_enviromment,(SQLHDBC));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void * STD_PROTO(myddas_util_get_list_pred,(MYDDAS_UTIL_CONNECTION));
|
|
|
|
void * STD_PROTO(myddas_util_get_pred_next,(void *));
|
|
|
|
char * STD_PROTO(myddas_util_get_pred_module,(void *));
|
|
|
|
char * STD_PROTO(myddas_util_get_pred_name,(void *));
|
2006-06-06 15:11:36 +01:00
|
|
|
MyddasInt STD_PROTO(myddas_util_get_pred_arity,(void *));
|
2006-03-09 15:52:06 +00:00
|
|
|
//DELETE THIS WHEN DB_STATS IS COMPLETED
|
2006-06-06 15:11:36 +01:00
|
|
|
MyddasInt STD_PROTO(get_myddas_top,(void));
|
2006-03-09 15:52:06 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
void check_int(void);
|
|
|
|
#endif
|
|
|
|
|
2006-03-10 16:58:39 +00:00
|
|
|
#endif /* MYDDAS_MYSQL || MYDDAS_ODBC */
|
|
|
|
|
2006-03-09 15:52:06 +00:00
|
|
|
/* myddas_mysql.c */
|
|
|
|
#if defined MYDDAS_MYSQL
|
2005-11-22 11:25:59 +00:00
|
|
|
void STD_PROTO(Yap_InitMYDDAS_MySQLPreds,(void));
|
|
|
|
void STD_PROTO(Yap_InitBackMYDDAS_MySQLPreds,(void));
|
|
|
|
#endif
|
2006-03-09 15:52:06 +00:00
|
|
|
|
|
|
|
/* myddas_odbc.c */
|
|
|
|
#if defined MYDDAS_ODBC
|
2005-11-22 11:25:59 +00:00
|
|
|
void STD_PROTO(Yap_InitMYDDAS_ODBCPreds,(void));
|
|
|
|
void STD_PROTO(Yap_InitBackMYDDAS_ODBCPreds,(void));
|
|
|
|
#endif
|
2006-03-09 15:52:06 +00:00
|
|
|
|
|
|
|
/* myddas_shared.c */
|
|
|
|
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
|
2006-06-06 15:11:36 +01:00
|
|
|
void STD_PROTO(Yap_MYDDAS_delete_all_myddas_structs,(void));
|
2005-11-22 11:25:59 +00:00
|
|
|
void STD_PROTO(Yap_InitMYDDAS_SharedPreds,(void));
|
|
|
|
void STD_PROTO(Yap_InitBackMYDDAS_SharedPreds,(void));
|
|
|
|
#endif
|
2006-03-09 15:52:06 +00:00
|
|
|
|
|
|
|
/* myddas_top_level.c */
|
2006-02-05 02:19:15 +00:00
|
|
|
#if defined MYDDAS_TOP_LEVEL && defined MYDDAS_MYSQL //&& defined HAVE_LIBREADLINE
|
|
|
|
void STD_PROTO(Yap_InitMYDDAS_TopLevelPreds,(void));
|
|
|
|
#endif
|
2005-11-18 18:52:41 +00:00
|
|
|
|
2007-10-18 09:24:16 +01:00
|
|
|
/* yap2swi.c */
|
|
|
|
void STD_PROTO(Yap_swi_install,(void));
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
/* ypsocks.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitSockets,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#ifdef USE_SOCKET
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_init_socks,(char *, long));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* opt.preds.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_init_optyap_preds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
|
2008-08-28 04:43:00 +01:00
|
|
|
static inline
|
|
|
|
yamop *
|
|
|
|
gc_P(yamop *p, yamop *cp)
|
|
|
|
{
|
|
|
|
return (p->opc == Yap_opcode(_execute_cpred) ? cp : p);
|
|
|
|
}
|