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 *
|
2003-01-13 14:02:50 +00:00
|
|
|
* version: $Id: Yapproto.h,v 1.32 2003-01-13 14:02:50 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));
|
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 *));
|
|
|
|
Atom STD_PROTO(Yap_FullLookupAtom,(char *));
|
|
|
|
void STD_PROTO(Yap_LookupAtomWithAddress,(char *,AtomEntry *));
|
|
|
|
Prop STD_PROTO(Yap_NewPredPropByFunctor,(struct FunctorEntryStruct *, SMALLUNSGN));
|
|
|
|
Prop STD_PROTO(Yap_NewPredPropByAtom,(struct AtomEntryStruct *, SMALLUNSGN));
|
|
|
|
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 *));
|
|
|
|
Term STD_PROTO(Yap_StringToListOfAtoms,(char *));
|
|
|
|
|
|
|
|
long STD_PROTO(Yap_InitSlot,(Term));
|
|
|
|
long STD_PROTO(Yap_NewSlots,(int));
|
|
|
|
Term STD_PROTO(Yap_GetFromSlot,(long));
|
|
|
|
void STD_PROTO(Yap_RecoverSlots,(int));
|
|
|
|
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
|
|
|
|
|
|
|
|
2001-04-09 20:54:03 +01:00
|
|
|
#if SFUNC
|
|
|
|
Term STD_PROTO(MkSFTerm,(Functor,int,Term *,Term));
|
|
|
|
CELL STD_PROTO(*ArgsOfSFTerm,(Term));
|
|
|
|
#endif
|
|
|
|
|
2002-11-18 18:18:05 +00:00
|
|
|
Prop STD_PROTO(Yap_GetPredPropByAtom,(Atom, SMALLUNSGN));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropByFunc,(Functor, SMALLUNSGN));
|
|
|
|
Prop STD_PROTO(Yap_GetPredPropHavingLock,(Atom,unsigned int,SMALLUNSGN));
|
|
|
|
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
|
|
|
int STD_PROTO(Yap_SizeOfBlock,(CODEADDR));
|
|
|
|
void STD_PROTO(Yap_FreeCodeSpace,(char *));
|
|
|
|
char *STD_PROTO(Yap_AllocAtomSpace,(unsigned int));
|
|
|
|
char *STD_PROTO(Yap_AllocCodeSpace,(unsigned int));
|
|
|
|
ADDR STD_PROTO(Yap_AllocFromForeignArea,(Int));
|
|
|
|
int STD_PROTO(Yap_ExtendWorkSpace,(Int));
|
|
|
|
void STD_PROTO(Yap_FreeAtomSpace,(char *));
|
|
|
|
int STD_PROTO(Yap_FreeWorkSpace, (void));
|
|
|
|
void STD_PROTO(Yap_InitMemory,(int,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
|
|
|
Term STD_PROTO(Yap_CurrentAttVars,(void));
|
|
|
|
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 */
|
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));
|
2002-12-27 16:53:09 +00:00
|
|
|
Int STD_PROTO(Yap_PredForCode,(yamop *, Atom *, UInt *, SMALLUNSGN *));
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitCdMgr,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#if EMACS
|
|
|
|
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));
|
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 */
|
2002-12-27 16:53:09 +00:00
|
|
|
yamop *STD_PROTO(Yap_cclause,(Term, int, int));
|
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 *));
|
|
|
|
void STD_PROTO(Yap_mark_all_suspended_goals,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* dbase.c */
|
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 */
|
2002-11-18 18:18:05 +00:00
|
|
|
Term STD_PROTO(Yap_ExecuteCallMetaCall,(SMALLUNSGN mod));
|
|
|
|
void STD_PROTO(Yap_InitExecFs,(void));
|
|
|
|
Int STD_PROTO(Yap_JumpToEnv,(Term));
|
|
|
|
int STD_PROTO(Yap_RunTopGoal,(Term));
|
|
|
|
Int STD_PROTO(Yap_execute_goal,(Term, int, SMALLUNSGN));
|
|
|
|
int STD_PROTO(Yap_exec_absmi,(int));
|
|
|
|
void STD_PROTO(Yap_trust_last,(void));
|
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));
|
|
|
|
int STD_PROTO(Yap_growheap, (int));
|
|
|
|
int STD_PROTO(Yap_growstack, (long));
|
|
|
|
int STD_PROTO(Yap_growtrail, (long));
|
|
|
|
int STD_PROTO(Yap_growglobal, (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 *));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* init.c */
|
|
|
|
#ifdef DEBUG
|
2002-11-18 18:18:05 +00:00
|
|
|
int STD_PROTO(Yap_DebugPutc,(int,int));
|
|
|
|
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_InitStacks,(int,int,int,int,int,int));
|
|
|
|
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));
|
|
|
|
void STD_PROTO(Yap_InitYaamRegs,(void));
|
|
|
|
void STD_PROTO(Yap_ReInitWallTime, (void));
|
|
|
|
int STD_PROTO(Yap_OpDec,(int,char *,Atom));
|
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));
|
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 */
|
2002-11-18 18:18:05 +00:00
|
|
|
SMALLUNSGN STD_PROTO(Yap_LookupModule,(Term));
|
|
|
|
Term STD_PROTO(Yap_Module_Name, (CODEADDR));
|
|
|
|
void STD_PROTO(Yap_InitModules, (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
|
|
|
int STD_PROTO(Yap_IsPrefixOp,(Prop,int *,int *));
|
|
|
|
int STD_PROTO(Yap_IsInfixOp,(Prop,int *,int *,int *));
|
|
|
|
int STD_PROTO(Yap_IsPosfixOp,(Prop,int *,int *));
|
|
|
|
Term STD_PROTO(Yap_Parse,(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));
|
|
|
|
Int STD_PROTO(Yap_creep,(void));
|
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));
|
|
|
|
Int STD_PROTO(Yap_cputime,(void));
|
|
|
|
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));
|
2002-11-11 17:38:10 +00:00
|
|
|
#if MAC
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_SetTextFile,(char *));
|
2002-11-11 17:38:10 +00:00
|
|
|
#endif
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_cputime_interval,(Int *,Int *));
|
|
|
|
void STD_PROTO(Yap_walltime_interval,(Int *,Int *));
|
|
|
|
void STD_PROTO(Yap_InitSysbits,(void));
|
|
|
|
void STD_PROTO(Yap_InitSysPreds,(void));
|
|
|
|
int STD_PROTO(Yap_TrueFileName, (char *, char *, int));
|
|
|
|
int STD_PROTO(Yap_ProcessSIGINT,(void));
|
|
|
|
double STD_PROTO(Yap_random, (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
|
|
|
|
|
|
|
|
/* unify.c */
|
2002-11-18 18:18:05 +00:00
|
|
|
void STD_PROTO(Yap_InitAbsmi,(void));
|
|
|
|
void STD_PROTO(Yap_InitUnify,(void));
|
|
|
|
int STD_PROTO(Yap_IUnify,(register CELL d0,register CELL d1));
|
|
|
|
op_numbers STD_PROTO(Yap_op_from_opcode,(OPCODE));
|
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));
|
|
|
|
void STD_PROTO(Yap_InitUtilCPreds,(void));
|
2001-04-09 20:54:03 +01:00
|
|
|
|
|
|
|
/* yap.c */
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
|
|
|