get rid of PROTO
This commit is contained in:
parent
24a75525c0
commit
743c9c69fb
@ -26,9 +26,8 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
#include "Yap.h"
|
||||
ADDR STD_PROTO(Yap_PreAllocCodeSpace, (void));
|
||||
Prop STD_PROTO(PredPropByFunc,(Functor, Term));
|
||||
Prop STD_PROTO(PredPropByAtom,(Atom, Term));
|
||||
static Prop PredPropByFunc(Functor, Term);
|
||||
static Prop PredPropByAtom(Atom, Term);
|
||||
#include "Yatom.h"
|
||||
#include "yapio.h"
|
||||
#include <stdio.h>
|
||||
|
4
C/agc.c
4
C/agc.c
@ -32,8 +32,8 @@ static char SccsId[] = "@(#)agc.c 1.3 3/15/90";
|
||||
#define errout GLOBAL_stderr
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(void RestoreEntries, (PropEntry *, int USES_REGS));
|
||||
STATIC_PROTO(void CleanCode, (PredEntry * USES_REGS));
|
||||
static void RestoreEntries(PropEntry *, int USES_REGS);
|
||||
static void CleanCode(PredEntry * USES_REGS);
|
||||
|
||||
#define AtomMarkedBit 1
|
||||
|
||||
|
12
C/alloc.c
12
C/alloc.c
@ -482,11 +482,11 @@ Yap_givemallinfo(void)
|
||||
|
||||
#if !USE_DL_MALLOC
|
||||
|
||||
STATIC_PROTO(void FreeBlock, (BlockHeader *));
|
||||
STATIC_PROTO(BlockHeader *GetBlock, (unsigned long int));
|
||||
STATIC_PROTO(char *AllocHeap, (unsigned long int));
|
||||
STATIC_PROTO(void RemoveFromFreeList, (BlockHeader *));
|
||||
STATIC_PROTO(void AddToFreeList, (BlockHeader *));
|
||||
static void FreeBlock(BlockHeader *);
|
||||
static BlockHeader *GetBlock(unsigned long int);
|
||||
static char *AllocHeap(unsigned long int);
|
||||
static void RemoveFromFreeList(BlockHeader *);
|
||||
static void AddToFreeList(BlockHeader *);
|
||||
|
||||
#define MinHGap 256*K
|
||||
|
||||
@ -1273,7 +1273,7 @@ Yap_FreeWorkSpace(void)
|
||||
\***********************************************************************/
|
||||
|
||||
#ifdef _AIX
|
||||
char *STD_PROTO(sbrk, (int));
|
||||
char *sbrk(int);
|
||||
|
||||
#endif
|
||||
|
||||
|
120
C/amasm.c
120
C/amasm.c
@ -214,73 +214,73 @@ typedef struct clause_info_struct {
|
||||
struct pred_entry *CurrentPred;
|
||||
} clause_info;
|
||||
|
||||
STATIC_PROTO(OPREG Var_Ref, (Ventry *, int));
|
||||
STATIC_PROTO(wamreg emit_xreg, (CELL));
|
||||
STATIC_PROTO(yslot emit_yreg, (CELL));
|
||||
STATIC_PROTO(wamreg emit_x, (CELL));
|
||||
STATIC_PROTO(yslot emit_y, (Ventry *));
|
||||
STATIC_PROTO(yamop *emit_a, (CELL));
|
||||
STATIC_PROTO(CELL *emit_bmlabel, (CELL, struct intermediates *));
|
||||
STATIC_PROTO(yamop *emit_ilabel, (CELL, struct intermediates *));
|
||||
STATIC_PROTO(Functor emit_f, (CELL));
|
||||
STATIC_PROTO(CELL emit_c, (CELL));
|
||||
STATIC_PROTO(COUNT emit_count, (CELL));
|
||||
STATIC_PROTO(OPCODE emit_op, (op_numbers));
|
||||
STATIC_PROTO(yamop *a_cle, (op_numbers, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_e, (op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_ue, (op_numbers, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_v, (op_numbers, op_numbers, yamop *, int, struct PSEUDO *));
|
||||
STATIC_PROTO(yamop *a_uv, (Ventry *,op_numbers, op_numbers, op_numbers, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_vr, (op_numbers, op_numbers, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_rv, (op_numbers, op_numbers, OPREG, yamop *, int, struct PSEUDO *));
|
||||
STATIC_PROTO(yamop *a_vv, (op_numbers, op_numbers, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_glist, (int *, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(void a_pair, (CELL *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_f, (CELL, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_c, (CELL, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_uc, (CELL, op_numbers, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_n, (op_numbers, int, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_un, (op_numbers, op_numbers, int, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_nc, (CELL, op_numbers, int, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_unc, (CELL, op_numbers, op_numbers, int, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_r, (CELL, op_numbers, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_p, (op_numbers, clause_info *, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_pl, (op_numbers, PredEntry *, yamop *, int));
|
||||
STATIC_PROTO(yamop *a_l, (CELL, op_numbers, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_hx, (op_numbers, union clause_obj *, int, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_if, (op_numbers, union clause_obj *, int, yamop *, int, struct intermediates *cip));
|
||||
STATIC_PROTO(yamop *a_cut, (clause_info *,yamop *, int, struct intermediates *));
|
||||
static OPREG Var_Ref(Ventry *, int);
|
||||
static wamreg emit_xreg(CELL);
|
||||
static yslot emit_yreg(CELL);
|
||||
static wamreg emit_x(CELL);
|
||||
static yslot emit_y(Ventry *);
|
||||
static yamop *emit_a(CELL);
|
||||
static CELL *emit_bmlabel(CELL, struct intermediates *);
|
||||
static yamop *emit_ilabel(CELL, struct intermediates *);
|
||||
static Functor emit_f(CELL);
|
||||
static CELL emit_c(CELL);
|
||||
static COUNT emit_count(CELL);
|
||||
static OPCODE emit_op(op_numbers);
|
||||
static yamop *a_cle(op_numbers, yamop *, int, struct intermediates *);
|
||||
static yamop *a_e(op_numbers, yamop *, int);
|
||||
static yamop *a_ue(op_numbers, op_numbers, yamop *, int);
|
||||
static yamop *a_v(op_numbers, op_numbers, yamop *, int, struct PSEUDO *);
|
||||
static yamop *a_uv(Ventry *,op_numbers, op_numbers, op_numbers, op_numbers, yamop *, int);
|
||||
static yamop *a_vr(op_numbers, op_numbers, yamop *, int, struct intermediates *);
|
||||
static yamop *a_rv(op_numbers, op_numbers, OPREG, yamop *, int, struct PSEUDO *);
|
||||
static yamop *a_vv(op_numbers, op_numbers, yamop *, int, struct intermediates *);
|
||||
static yamop *a_glist(int *, yamop *, int, struct intermediates *);
|
||||
static void a_pair(CELL *, int, struct intermediates *);
|
||||
static yamop *a_f(CELL, op_numbers, yamop *, int);
|
||||
static yamop *a_c(CELL, op_numbers, yamop *, int);
|
||||
static yamop *a_uc(CELL, op_numbers, op_numbers, yamop *, int);
|
||||
static yamop *a_n(op_numbers, int, yamop *, int);
|
||||
static yamop *a_un(op_numbers, op_numbers, int, yamop *, int);
|
||||
static yamop *a_nc(CELL, op_numbers, int, yamop *, int);
|
||||
static yamop *a_unc(CELL, op_numbers, op_numbers, int, yamop *, int);
|
||||
static yamop *a_r(CELL, op_numbers, yamop *, int);
|
||||
static yamop *a_p(op_numbers, clause_info *, yamop *, int, struct intermediates *);
|
||||
static yamop *a_pl(op_numbers, PredEntry *, yamop *, int);
|
||||
static yamop *a_l(CELL, op_numbers, yamop *, int, struct intermediates *);
|
||||
static yamop *a_hx(op_numbers, union clause_obj *, int, yamop *, int, struct intermediates *);
|
||||
static yamop *a_if(op_numbers, union clause_obj *, int, yamop *, int, struct intermediates *cip);
|
||||
static yamop *a_cut(clause_info *,yamop *, int, struct intermediates *);
|
||||
#ifdef YAPOR
|
||||
STATIC_PROTO(yamop *a_try, (op_numbers, CELL, CELL, int, int, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_either, (op_numbers, CELL, CELL, int, yamop *, int, struct intermediates *));
|
||||
static yamop *a_try(op_numbers, CELL, CELL, int, int, yamop *, int, struct intermediates *);
|
||||
static yamop *a_either(op_numbers, CELL, CELL, int, yamop *, int, struct intermediates *);
|
||||
#else
|
||||
STATIC_PROTO(yamop *a_try, (op_numbers, CELL, CELL, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_either, (op_numbers, CELL, CELL, yamop *, int, struct intermediates *));
|
||||
static yamop *a_try(op_numbers, CELL, CELL, yamop *, int, struct intermediates *);
|
||||
static yamop *a_either(op_numbers, CELL, CELL, yamop *, int, struct intermediates *);
|
||||
#endif /* YAPOR */
|
||||
STATIC_PROTO(yamop *a_gl, (op_numbers, yamop *, int, struct PSEUDO *, struct intermediates * CACHE_TYPE));
|
||||
STATIC_PROTO(yamop *a_bfunc, (CELL, clause_info *, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(
|
||||
COUNT compile_cmp_flags, (char *));
|
||||
STATIC_PROTO(yamop *a_igl, (CELL, op_numbers, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_xigl, (op_numbers, yamop *, int, struct PSEUDO *));
|
||||
STATIC_PROTO(yamop *a_ucons, (int *, compiler_vm_op, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_uvar, (yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_wvar, (yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *do_pass, (int, yamop **, int, int *, int *,struct intermediates *, UInt CACHE_TYPE));
|
||||
static yamop *a_gl(op_numbers, yamop *, int, struct PSEUDO *, struct intermediates * CACHE_TYPE);
|
||||
static yamop *a_bfunc(CELL, clause_info *, yamop *, int, struct intermediates *);
|
||||
static
|
||||
COUNT compile_cmp_flags(char *);
|
||||
static yamop *a_igl(CELL, op_numbers, yamop *, int, struct intermediates *);
|
||||
static yamop *a_xigl(op_numbers, yamop *, int, struct PSEUDO *);
|
||||
static yamop *a_ucons(int *, compiler_vm_op, yamop *, int, struct intermediates *);
|
||||
static yamop *a_uvar(yamop *, int, struct intermediates *);
|
||||
static yamop *a_wvar(yamop *, int, struct intermediates *);
|
||||
static yamop *do_pass(int, yamop **, int, int *, int *,struct intermediates *, UInt CACHE_TYPE);
|
||||
#ifdef DEBUG_OPCODES
|
||||
STATIC_PROTO(void DumpOpCodes, (void));
|
||||
static void DumpOpCodes(void);
|
||||
#endif
|
||||
#ifdef SFUNC
|
||||
STATIC_PROTO(void a_vsf, (int, yamop *, int, struct PSEUDO *));
|
||||
STATIC_PROTO(void a_asf, (int, yamop *, int, struct PSEUDO *));
|
||||
static void a_vsf(int, yamop *, int, struct PSEUDO *);
|
||||
static void a_asf(int, yamop *, int, struct PSEUDO *);
|
||||
#endif
|
||||
STATIC_PROTO(yamop *check_alloc, (clause_info *, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_deallocate, (clause_info *, yamop *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_bmap, (yamop *, int, struct PSEUDO *));
|
||||
STATIC_PROTO(void a_fetch_vv, (cmp_op_info *, int, struct intermediates *));
|
||||
STATIC_PROTO(void a_fetch_cv, (cmp_op_info *, int, struct intermediates *));
|
||||
STATIC_PROTO(void a_fetch_vc, (cmp_op_info *, int, struct intermediates *));
|
||||
STATIC_PROTO(yamop *a_f2, (cmp_op_info *, yamop *, int, struct intermediates *));
|
||||
static yamop *check_alloc(clause_info *, yamop *, int, struct intermediates *);
|
||||
static yamop *a_deallocate(clause_info *, yamop *, int, struct intermediates *);
|
||||
static yamop *a_bmap(yamop *, int, struct PSEUDO *);
|
||||
static void a_fetch_vv(cmp_op_info *, int, struct intermediates *);
|
||||
static void a_fetch_cv(cmp_op_info *, int, struct intermediates *);
|
||||
static void a_fetch_vc(cmp_op_info *, int, struct intermediates *);
|
||||
static yamop *a_f2(cmp_op_info *, yamop *, int, struct intermediates *);
|
||||
|
||||
#define CELLSIZE sizeof(CELL)
|
||||
|
||||
|
@ -31,9 +31,9 @@ static char SccsId[] = "%W% %G%";
|
||||
|
||||
|
||||
|
||||
STATIC_PROTO(Int p_reset_op_counters, (void));
|
||||
STATIC_PROTO(Int p_show_op_counters, (void));
|
||||
STATIC_PROTO(Int p_show_ops_by_group, (void));
|
||||
static Int p_reset_op_counters(void);
|
||||
static Int p_show_op_counters(void);
|
||||
static Int p_show_ops_by_group(void);
|
||||
|
||||
static Int
|
||||
p_reset_op_counters()
|
||||
|
24
C/arrays.c
24
C/arrays.c
@ -34,9 +34,9 @@ extern int errno;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(Int p_compile_array_refs, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_array_refs_compiled, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_sync_mmapped_arrays, ( USES_REGS1 ));
|
||||
static Int p_compile_array_refs( USES_REGS1 );
|
||||
static Int p_array_refs_compiled( USES_REGS1 );
|
||||
static Int p_sync_mmapped_arrays( USES_REGS1 );
|
||||
|
||||
/*
|
||||
*
|
||||
@ -122,15 +122,15 @@ STATIC_PROTO(Int p_sync_mmapped_arrays, ( USES_REGS1 ));
|
||||
*
|
||||
*/
|
||||
|
||||
STATIC_PROTO(Int p_create_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_create_mmapped_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_array_references, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_create_static_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_resize_static_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_close_static_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_access_array, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_assign_static, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_assign_dynamic, ( USES_REGS1 ));
|
||||
static Int p_create_array( USES_REGS1 );
|
||||
static Int p_create_mmapped_array( USES_REGS1 );
|
||||
static Int p_array_references( USES_REGS1 );
|
||||
static Int p_create_static_array( USES_REGS1 );
|
||||
static Int p_resize_static_array( USES_REGS1 );
|
||||
static Int p_close_static_array( USES_REGS1 );
|
||||
static Int p_access_array( USES_REGS1 );
|
||||
static Int p_assign_static( USES_REGS1 );
|
||||
static Int p_assign_dynamic( USES_REGS1 );
|
||||
|
||||
#if HAVE_MMAP
|
||||
|
||||
|
376
C/c_interface.c
376
C/c_interface.c
@ -377,196 +377,196 @@
|
||||
#define X_API
|
||||
#endif
|
||||
|
||||
X_API Term STD_PROTO(YAP_A,(int));
|
||||
X_API Term STD_PROTO(YAP_Deref,(Term));
|
||||
X_API Term STD_PROTO(YAP_MkVarTerm,(void));
|
||||
X_API Bool STD_PROTO(YAP_IsVarTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsNonVarTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsIntTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsLongIntTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsBigNumTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsNumberTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsRationalTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsFloatTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsDbRefTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsAtomTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsPairTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsApplTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsCompoundTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsExternalDataInStackTerm,(Term));
|
||||
X_API Bool STD_PROTO(YAP_IsOpaqueObjectTerm,(Term, int));
|
||||
X_API Term STD_PROTO(YAP_MkIntTerm,(Int));
|
||||
X_API Term STD_PROTO(YAP_MkBigNumTerm,(void *));
|
||||
X_API Term STD_PROTO(YAP_MkRationalTerm,(void *));
|
||||
X_API Int STD_PROTO(YAP_IntOfTerm,(Term));
|
||||
X_API void STD_PROTO(YAP_BigNumOfTerm,(Term, void *));
|
||||
X_API void STD_PROTO(YAP_RationalOfTerm,(Term, void *));
|
||||
X_API Term STD_PROTO(YAP_MkFloatTerm,(flt));
|
||||
X_API flt STD_PROTO(YAP_FloatOfTerm,(Term));
|
||||
X_API Term STD_PROTO(YAP_MkAtomTerm,(Atom));
|
||||
X_API Atom STD_PROTO(YAP_AtomOfTerm,(Term));
|
||||
X_API Atom STD_PROTO(YAP_LookupAtom,(char *));
|
||||
X_API Atom STD_PROTO(YAP_LookupWideAtom,(wchar_t *));
|
||||
X_API size_t STD_PROTO(YAP_AtomNameLength,(Atom));
|
||||
X_API Atom STD_PROTO(YAP_FullLookupAtom,(char *));
|
||||
X_API int STD_PROTO(YAP_IsWideAtom,(Atom));
|
||||
X_API char *STD_PROTO(YAP_AtomName,(Atom));
|
||||
X_API wchar_t *STD_PROTO(YAP_WideAtomName,(Atom));
|
||||
X_API Term STD_PROTO(YAP_MkPairTerm,(Term,Term));
|
||||
X_API Term STD_PROTO(YAP_MkListFromTerms,(Term *,Int));
|
||||
X_API Term STD_PROTO(YAP_MkNewPairTerm,(void));
|
||||
X_API Term STD_PROTO(YAP_HeadOfTerm,(Term));
|
||||
X_API Term STD_PROTO(YAP_TailOfTerm,(Term));
|
||||
X_API Int STD_PROTO(YAP_SkipList,(Term *, Term **));
|
||||
X_API Term STD_PROTO(YAP_MkApplTerm,(Functor,UInt,Term *));
|
||||
X_API Term STD_PROTO(YAP_MkNewApplTerm,(Functor,UInt));
|
||||
X_API Functor STD_PROTO(YAP_FunctorOfTerm,(Term));
|
||||
X_API Term STD_PROTO(YAP_ArgOfTerm,(Int,Term));
|
||||
X_API Term *STD_PROTO(YAP_ArgsOfTerm,(Term));
|
||||
X_API Functor STD_PROTO(YAP_MkFunctor,(Atom,Int));
|
||||
X_API Atom STD_PROTO(YAP_NameOfFunctor,(Functor));
|
||||
X_API Int STD_PROTO(YAP_ArityOfFunctor,(Functor));
|
||||
X_API void *STD_PROTO(YAP_ExtraSpace,(void));
|
||||
X_API void STD_PROTO(YAP_cut_up,(void));
|
||||
X_API Int STD_PROTO(YAP_Unify,(Term,Term));
|
||||
X_API int STD_PROTO(YAP_Unifiable,(Term,Term));
|
||||
X_API int STD_PROTO(YAP_Reset,(void));
|
||||
X_API Int STD_PROTO(YAP_ListLength,(Term));
|
||||
X_API Int STD_PROTO(YAP_Init,(YAP_init_args *));
|
||||
X_API Int STD_PROTO(YAP_FastInit,(char *));
|
||||
X_API PredEntry *STD_PROTO(YAP_FunctorToPred,(Functor));
|
||||
X_API PredEntry *STD_PROTO(YAP_AtomToPred,(Atom));
|
||||
X_API PredEntry *STD_PROTO(YAP_FunctorToPredInModule,(Functor, Term));
|
||||
X_API PredEntry *STD_PROTO(YAP_AtomToPredInModule,(Atom, Term));
|
||||
X_API Int STD_PROTO(YAP_CallProlog,(Term));
|
||||
X_API void *STD_PROTO(YAP_AllocSpaceFromYap,(size_t));
|
||||
X_API void *STD_PROTO(YAP_ReallocSpaceFromYap,(void*,size_t));
|
||||
X_API void STD_PROTO(YAP_FreeSpaceFromYap,(void *));
|
||||
X_API int STD_PROTO(YAP_StringToBuffer, (Term, char *, unsigned int));
|
||||
X_API Term STD_PROTO(YAP_ReadBuffer, (char *,Term *));
|
||||
X_API Term STD_PROTO(YAP_FloatsToList, (double *, size_t));
|
||||
X_API Int STD_PROTO(YAP_ListToFloats, (Term, double *, size_t));
|
||||
X_API Term STD_PROTO(YAP_IntsToList, (Int *, size_t));
|
||||
X_API Int STD_PROTO(YAP_ListToInts, (Term, Int *, size_t));
|
||||
X_API Term STD_PROTO(YAP_BufferToString, (char *));
|
||||
X_API Term STD_PROTO(YAP_NBufferToString, (char *, size_t));
|
||||
X_API Term STD_PROTO(YAP_WideBufferToString, (wchar_t *));
|
||||
X_API Term STD_PROTO(YAP_NWideBufferToString, (wchar_t *, size_t));
|
||||
X_API Term STD_PROTO(YAP_BufferToAtomList, (char *));
|
||||
X_API Term STD_PROTO(YAP_NBufferToAtomList, (char *,size_t));
|
||||
X_API Term STD_PROTO(YAP_WideBufferToAtomList, (wchar_t *));
|
||||
X_API Term STD_PROTO(YAP_NWideBufferToAtomList, (wchar_t *, size_t));
|
||||
X_API Term STD_PROTO(YAP_NWideBufferToAtomDiffList, (wchar_t *, Term, size_t));
|
||||
X_API Term STD_PROTO(YAP_BufferToDiffList, (char *, Term));
|
||||
X_API Term STD_PROTO(YAP_NBufferToDiffList, (char *, Term, size_t));
|
||||
X_API Term STD_PROTO(YAP_WideBufferToDiffList, (wchar_t *, Term));
|
||||
X_API Term STD_PROTO(YAP_NWideBufferToDiffList, (wchar_t *, Term, size_t));
|
||||
X_API void STD_PROTO(YAP_Error,(int, Term, char *, ...));
|
||||
X_API Int STD_PROTO(YAP_RunPredicate,(PredEntry *, Term *));
|
||||
X_API Int STD_PROTO(YAP_RunGoal,(Term));
|
||||
X_API Int STD_PROTO(YAP_RunGoalOnce,(Term));
|
||||
X_API int STD_PROTO(YAP_RestartGoal,(void));
|
||||
X_API int STD_PROTO(YAP_ShutdownGoal,(int));
|
||||
X_API int STD_PROTO(YAP_EnterGoal,(PredEntry *, Term *, YAP_dogoalinfo *));
|
||||
X_API int STD_PROTO(YAP_RetryGoal,(YAP_dogoalinfo *));
|
||||
X_API int STD_PROTO(YAP_LeaveGoal,(int, YAP_dogoalinfo *));
|
||||
X_API int STD_PROTO(YAP_GoalHasException,(Term *));
|
||||
X_API void STD_PROTO(YAP_ClearExceptions,(void));
|
||||
X_API int STD_PROTO(YAP_ContinueGoal,(void));
|
||||
X_API void STD_PROTO(YAP_PruneGoal,(YAP_dogoalinfo *));
|
||||
X_API IOSTREAM *STD_PROTO(YAP_TermToStream,(Term));
|
||||
X_API IOSTREAM *STD_PROTO(YAP_InitConsult,(int, char *));
|
||||
X_API void STD_PROTO(YAP_EndConsult,(IOSTREAM *));
|
||||
X_API Term STD_PROTO(YAP_Read, (IOSTREAM *));
|
||||
X_API void STD_PROTO(YAP_Write, (Term, IOSTREAM *, int));
|
||||
X_API Term STD_PROTO(YAP_CopyTerm, (Term));
|
||||
X_API int STD_PROTO(YAP_WriteBuffer, (Term, char *, size_t, int));
|
||||
X_API char *STD_PROTO(YAP_WriteDynamicBuffer, (Term, char *, size_t, size_t *, int *, int));
|
||||
X_API char *STD_PROTO(YAP_CompileClause, (Term));
|
||||
X_API void STD_PROTO(YAP_PutValue, (Atom,Term));
|
||||
X_API Term STD_PROTO(YAP_GetValue, (Atom));
|
||||
X_API int STD_PROTO(YAP_CompareTerms, (Term,Term));
|
||||
X_API void STD_PROTO(YAP_Exit, (int));
|
||||
X_API void STD_PROTO(YAP_InitSocks, (char *, long));
|
||||
X_API void STD_PROTO(YAP_SetOutputMessage, (void));
|
||||
X_API int STD_PROTO(YAP_StreamToFileNo, (Term));
|
||||
X_API void STD_PROTO(YAP_CloseAllOpenStreams,(void));
|
||||
X_API void STD_PROTO(YAP_FlushAllStreams,(void));
|
||||
X_API Int STD_PROTO(YAP_CurrentSlot,(void));
|
||||
X_API Int STD_PROTO(YAP_NewSlots,(int));
|
||||
X_API Int STD_PROTO(YAP_InitSlot,(Term));
|
||||
X_API Term STD_PROTO(YAP_GetFromSlot,(Int));
|
||||
X_API Term *STD_PROTO(YAP_AddressFromSlot,(Int));
|
||||
X_API Term *STD_PROTO(YAP_AddressOfTermInSlot,(Int));
|
||||
X_API void STD_PROTO(YAP_PutInSlot,(Int, Term));
|
||||
X_API int STD_PROTO(YAP_RecoverSlots,(int));
|
||||
X_API Int STD_PROTO(YAP_ArgsToSlots,(int));
|
||||
X_API void STD_PROTO(YAP_SlotsToArgs,(int, Int));
|
||||
X_API void STD_PROTO(YAP_Throw,(Term));
|
||||
X_API void STD_PROTO(YAP_AsyncThrow,(Term));
|
||||
X_API void STD_PROTO(YAP_Halt,(int));
|
||||
X_API Term *STD_PROTO(YAP_TopOfLocalStack,(void));
|
||||
X_API void *STD_PROTO(YAP_Predicate,(Atom,UInt,Term));
|
||||
X_API void STD_PROTO(YAP_PredicateInfo,(void *,Atom *,UInt *,Term *));
|
||||
X_API void STD_PROTO(YAP_UserCPredicate,(char *,CPredicate,UInt));
|
||||
X_API void STD_PROTO(YAP_UserBackCPredicate,(char *,CPredicate,CPredicate,UInt,unsigned int));
|
||||
X_API void STD_PROTO(YAP_UserCPredicateWithArgs,(char *,CPredicate,UInt,Term));
|
||||
X_API Term YAP_A(int);
|
||||
X_API Term YAP_Deref(Term);
|
||||
X_API Term YAP_MkVarTerm(void);
|
||||
X_API Bool YAP_IsVarTerm(Term);
|
||||
X_API Bool YAP_IsNonVarTerm(Term);
|
||||
X_API Bool YAP_IsIntTerm(Term);
|
||||
X_API Bool YAP_IsLongIntTerm(Term);
|
||||
X_API Bool YAP_IsBigNumTerm(Term);
|
||||
X_API Bool YAP_IsNumberTerm(Term);
|
||||
X_API Bool YAP_IsRationalTerm(Term);
|
||||
X_API Bool YAP_IsFloatTerm(Term);
|
||||
X_API Bool YAP_IsDbRefTerm(Term);
|
||||
X_API Bool YAP_IsAtomTerm(Term);
|
||||
X_API Bool YAP_IsPairTerm(Term);
|
||||
X_API Bool YAP_IsApplTerm(Term);
|
||||
X_API Bool YAP_IsCompoundTerm(Term);
|
||||
X_API Bool YAP_IsExternalDataInStackTerm(Term);
|
||||
X_API Bool YAP_IsOpaqueObjectTerm(Term, int);
|
||||
X_API Term YAP_MkIntTerm(Int);
|
||||
X_API Term YAP_MkBigNumTerm(void *);
|
||||
X_API Term YAP_MkRationalTerm(void *);
|
||||
X_API Int YAP_IntOfTerm(Term);
|
||||
X_API void YAP_BigNumOfTerm(Term, void *);
|
||||
X_API void YAP_RationalOfTerm(Term, void *);
|
||||
X_API Term YAP_MkFloatTerm(flt);
|
||||
X_API flt YAP_FloatOfTerm(Term);
|
||||
X_API Term YAP_MkAtomTerm(Atom);
|
||||
X_API Atom YAP_AtomOfTerm(Term);
|
||||
X_API Atom YAP_LookupAtom(char *);
|
||||
X_API Atom YAP_LookupWideAtom(wchar_t *);
|
||||
X_API size_t YAP_AtomNameLength(Atom);
|
||||
X_API Atom YAP_FullLookupAtom(char *);
|
||||
X_API int YAP_IsWideAtom(Atom);
|
||||
X_API char *YAP_AtomName(Atom);
|
||||
X_API wchar_t *YAP_WideAtomName(Atom);
|
||||
X_API Term YAP_MkPairTerm(Term,Term);
|
||||
X_API Term YAP_MkListFromTerms(Term *,Int);
|
||||
X_API Term YAP_MkNewPairTerm(void);
|
||||
X_API Term YAP_HeadOfTerm(Term);
|
||||
X_API Term YAP_TailOfTerm(Term);
|
||||
X_API Int YAP_SkipList(Term *, Term **);
|
||||
X_API Term YAP_MkApplTerm(Functor,UInt,Term *);
|
||||
X_API Term YAP_MkNewApplTerm(Functor,UInt);
|
||||
X_API Functor YAP_FunctorOfTerm(Term);
|
||||
X_API Term YAP_ArgOfTerm(Int,Term);
|
||||
X_API Term *YAP_ArgsOfTerm(Term);
|
||||
X_API Functor YAP_MkFunctor(Atom,Int);
|
||||
X_API Atom YAP_NameOfFunctor(Functor);
|
||||
X_API Int YAP_ArityOfFunctor(Functor);
|
||||
X_API void *YAP_ExtraSpace(void);
|
||||
X_API void YAP_cut_up(void);
|
||||
X_API Int YAP_Unify(Term,Term);
|
||||
X_API int YAP_Unifiable(Term,Term);
|
||||
X_API int YAP_Reset(void);
|
||||
X_API Int YAP_ListLength(Term);
|
||||
X_API Int YAP_Init(YAP_init_args *);
|
||||
X_API Int YAP_FastInit(char *);
|
||||
X_API PredEntry *YAP_FunctorToPred(Functor);
|
||||
X_API PredEntry *YAP_AtomToPred(Atom);
|
||||
X_API PredEntry *YAP_FunctorToPredInModule(Functor, Term);
|
||||
X_API PredEntry *YAP_AtomToPredInModule(Atom, Term);
|
||||
X_API Int YAP_CallProlog(Term);
|
||||
X_API void *YAP_AllocSpaceFromYap(size_t);
|
||||
X_API void *YAP_ReallocSpaceFromYap(void*,size_t);
|
||||
X_API void YAP_FreeSpaceFromYap(void *);
|
||||
X_API int YAP_StringToBuffer(Term, char *, unsigned int);
|
||||
X_API Term YAP_ReadBuffer(char *,Term *);
|
||||
X_API Term YAP_FloatsToList(double *, size_t);
|
||||
X_API Int YAP_ListToFloats(Term, double *, size_t);
|
||||
X_API Term YAP_IntsToList(Int *, size_t);
|
||||
X_API Int YAP_ListToInts(Term, Int *, size_t);
|
||||
X_API Term YAP_BufferToString(char *);
|
||||
X_API Term YAP_NBufferToString(char *, size_t);
|
||||
X_API Term YAP_WideBufferToString(wchar_t *);
|
||||
X_API Term YAP_NWideBufferToString(wchar_t *, size_t);
|
||||
X_API Term YAP_BufferToAtomList(char *);
|
||||
X_API Term YAP_NBufferToAtomList(char *,size_t);
|
||||
X_API Term YAP_WideBufferToAtomList(wchar_t *);
|
||||
X_API Term YAP_NWideBufferToAtomList(wchar_t *, size_t);
|
||||
X_API Term YAP_NWideBufferToAtomDiffList(wchar_t *, Term, size_t);
|
||||
X_API Term YAP_BufferToDiffList(char *, Term);
|
||||
X_API Term YAP_NBufferToDiffList(char *, Term, size_t);
|
||||
X_API Term YAP_WideBufferToDiffList(wchar_t *, Term);
|
||||
X_API Term YAP_NWideBufferToDiffList(wchar_t *, Term, size_t);
|
||||
X_API void YAP_Error(int, Term, char *, ...);
|
||||
X_API Int YAP_RunPredicate(PredEntry *, Term *);
|
||||
X_API Int YAP_RunGoal(Term);
|
||||
X_API Int YAP_RunGoalOnce(Term);
|
||||
X_API int YAP_RestartGoal(void);
|
||||
X_API int YAP_ShutdownGoal(int);
|
||||
X_API int YAP_EnterGoal(PredEntry *, Term *, YAP_dogoalinfo *);
|
||||
X_API int YAP_RetryGoal(YAP_dogoalinfo *);
|
||||
X_API int YAP_LeaveGoal(int, YAP_dogoalinfo *);
|
||||
X_API int YAP_GoalHasException(Term *);
|
||||
X_API void YAP_ClearExceptions(void);
|
||||
X_API int YAP_ContinueGoal(void);
|
||||
X_API void YAP_PruneGoal(YAP_dogoalinfo *);
|
||||
X_API IOSTREAM *YAP_TermToStream(Term);
|
||||
X_API IOSTREAM *YAP_InitConsult(int, char *);
|
||||
X_API void YAP_EndConsult(IOSTREAM *);
|
||||
X_API Term YAP_Read(IOSTREAM *);
|
||||
X_API void YAP_Write(Term, IOSTREAM *, int);
|
||||
X_API Term YAP_CopyTerm(Term);
|
||||
X_API int YAP_WriteBuffer(Term, char *, size_t, int);
|
||||
X_API char *YAP_WriteDynamicBuffer(Term, char *, size_t, size_t *, int *, int);
|
||||
X_API char *YAP_CompileClause(Term);
|
||||
X_API void YAP_PutValue(Atom,Term);
|
||||
X_API Term YAP_GetValue(Atom);
|
||||
X_API int YAP_CompareTerms(Term,Term);
|
||||
X_API void YAP_Exit(int);
|
||||
X_API void YAP_InitSocks(char *, long);
|
||||
X_API void YAP_SetOutputMessage(void);
|
||||
X_API int YAP_StreamToFileNo(Term);
|
||||
X_API void YAP_CloseAllOpenStreams(void);
|
||||
X_API void YAP_FlushAllStreams(void);
|
||||
X_API Int YAP_CurrentSlot(void);
|
||||
X_API Int YAP_NewSlots(int);
|
||||
X_API Int YAP_InitSlot(Term);
|
||||
X_API Term YAP_GetFromSlot(Int);
|
||||
X_API Term *YAP_AddressFromSlot(Int);
|
||||
X_API Term *YAP_AddressOfTermInSlot(Int);
|
||||
X_API void YAP_PutInSlot(Int, Term);
|
||||
X_API int YAP_RecoverSlots(int);
|
||||
X_API Int YAP_ArgsToSlots(int);
|
||||
X_API void YAP_SlotsToArgs(int, Int);
|
||||
X_API void YAP_Throw(Term);
|
||||
X_API void YAP_AsyncThrow(Term);
|
||||
X_API void YAP_Halt(int);
|
||||
X_API Term *YAP_TopOfLocalStack(void);
|
||||
X_API void *YAP_Predicate(Atom,UInt,Term);
|
||||
X_API void YAP_PredicateInfo(void *,Atom *,UInt *,Term *);
|
||||
X_API void YAP_UserCPredicate(char *,CPredicate,UInt);
|
||||
X_API void YAP_UserBackCPredicate(char *,CPredicate,CPredicate,UInt,unsigned int);
|
||||
X_API void YAP_UserCPredicateWithArgs(char *,CPredicate,UInt,Term);
|
||||
#ifdef CUT_C
|
||||
X_API void STD_PROTO(YAP_UserBackCutCPredicate,(char *,CPredicate,CPredicate,CPredicate,UInt,unsigned int));
|
||||
X_API void *STD_PROTO(YAP_ExtraSpaceCut,(void));
|
||||
X_API void YAP_UserBackCutCPredicate(char *,CPredicate,CPredicate,CPredicate,UInt,unsigned int);
|
||||
X_API void *YAP_ExtraSpaceCut(void);
|
||||
#endif
|
||||
X_API Term STD_PROTO(YAP_SetCurrentModule,(Term));
|
||||
X_API Term STD_PROTO(YAP_CurrentModule,(void));
|
||||
X_API Term STD_PROTO(YAP_CreateModule,(Atom));
|
||||
X_API Term STD_PROTO(YAP_StripModule,(Term, Term *));
|
||||
X_API int STD_PROTO(YAP_ThreadSelf,(void));
|
||||
X_API int STD_PROTO(YAP_ThreadCreateEngine,(struct thread_attr_struct *));
|
||||
X_API int STD_PROTO(YAP_ThreadAttachEngine,(int));
|
||||
X_API int STD_PROTO(YAP_ThreadDetachEngine,(int));
|
||||
X_API int STD_PROTO(YAP_ThreadDestroyEngine,(int));
|
||||
X_API Term STD_PROTO(YAP_MkBlobTerm,(unsigned int));
|
||||
X_API void *STD_PROTO(YAP_BlobOfTerm,(Term));
|
||||
X_API Term STD_PROTO(YAP_TermNil,(void));
|
||||
X_API int STD_PROTO(YAP_IsTermNil,(Term));
|
||||
X_API int STD_PROTO(YAP_AtomGetHold,(Atom));
|
||||
X_API int STD_PROTO(YAP_AtomReleaseHold,(Atom));
|
||||
X_API Agc_hook STD_PROTO(YAP_AGCRegisterHook,(Agc_hook));
|
||||
X_API int STD_PROTO(YAP_HaltRegisterHook,(HaltHookFunc, void *));
|
||||
X_API char *STD_PROTO(YAP_cwd,(void));
|
||||
X_API Term STD_PROTO(YAP_OpenList,(int));
|
||||
X_API Term STD_PROTO(YAP_ExtendList,(Term, Term));
|
||||
X_API int STD_PROTO(YAP_CloseList,(Term, Term));
|
||||
X_API int STD_PROTO(YAP_IsAttVar,(Term));
|
||||
X_API Term STD_PROTO(YAP_AttsOfVar,(Term));
|
||||
X_API int STD_PROTO(YAP_FileNoFromStream,(Term));
|
||||
X_API void *STD_PROTO(YAP_FileDescriptorFromStream,(Term));
|
||||
X_API void *STD_PROTO(YAP_Record,(Term));
|
||||
X_API Term STD_PROTO(YAP_Recorded,(void *));
|
||||
X_API int STD_PROTO(YAP_Erase,(void *));
|
||||
X_API int STD_PROTO(YAP_Variant,(Term, Term));
|
||||
X_API Int STD_PROTO(YAP_NumberVars,(Term, Int));
|
||||
X_API Term STD_PROTO(YAP_UnNumberVars,(Term));
|
||||
X_API int STD_PROTO(YAP_IsNumberedVariable,(Term));
|
||||
X_API int STD_PROTO(YAP_ExactlyEqual,(Term, Term));
|
||||
X_API Int STD_PROTO(YAP_TermHash,(Term, Int, Int, int));
|
||||
X_API void STD_PROTO(YAP_signal,(int));
|
||||
X_API int STD_PROTO(YAP_SetYAPFlag,(yap_flag_t, int));
|
||||
X_API Int STD_PROTO(YAP_VarSlotToNumber,(Int));
|
||||
X_API Term STD_PROTO(YAP_ModuleUser,(void));
|
||||
X_API Int STD_PROTO(YAP_NumberOfClausesForPredicate,(PredEntry *));
|
||||
X_API int STD_PROTO(YAP_MaxOpPriority,(Atom, Term));
|
||||
X_API int STD_PROTO(YAP_OpInfo,(Atom, Term, int, int *, int *));
|
||||
X_API Term STD_PROTO(YAP_AllocExternalDataInStack,(size_t));
|
||||
X_API void *STD_PROTO(YAP_ExternalDataInStackFromTerm,(Term));
|
||||
X_API int STD_PROTO(YAP_NewOpaqueType,(void *));
|
||||
X_API Term STD_PROTO(YAP_NewOpaqueObject,(int, size_t));
|
||||
X_API void *STD_PROTO(YAP_OpaqueObjectFromTerm,(Term));
|
||||
X_API int STD_PROTO(YAP_Argv,(char *** argvp));
|
||||
X_API YAP_tag_t STD_PROTO(YAP_TagOfTerm,(Term));
|
||||
X_API size_t STD_PROTO(YAP_ExportTerm,(Term, char *, size_t));
|
||||
X_API size_t STD_PROTO(YAP_SizeOfExportedTerm,(char *));
|
||||
X_API Term STD_PROTO(YAP_ImportTerm,(char *));
|
||||
X_API int STD_PROTO(YAP_RequiresExtraStack,(size_t));
|
||||
X_API Term YAP_SetCurrentModule(Term);
|
||||
X_API Term YAP_CurrentModule(void);
|
||||
X_API Term YAP_CreateModule(Atom);
|
||||
X_API Term YAP_StripModule(Term, Term *);
|
||||
X_API int YAP_ThreadSelf(void);
|
||||
X_API int YAP_ThreadCreateEngine(struct thread_attr_struct *);
|
||||
X_API int YAP_ThreadAttachEngine(int);
|
||||
X_API int YAP_ThreadDetachEngine(int);
|
||||
X_API int YAP_ThreadDestroyEngine(int);
|
||||
X_API Term YAP_MkBlobTerm(unsigned int);
|
||||
X_API void *YAP_BlobOfTerm(Term);
|
||||
X_API Term YAP_TermNil(void);
|
||||
X_API int YAP_IsTermNil(Term);
|
||||
X_API int YAP_AtomGetHold(Atom);
|
||||
X_API int YAP_AtomReleaseHold(Atom);
|
||||
X_API Agc_hook YAP_AGCRegisterHook(Agc_hook);
|
||||
X_API int YAP_HaltRegisterHook(HaltHookFunc, void *);
|
||||
X_API char *YAP_cwd(void);
|
||||
X_API Term YAP_OpenList(int);
|
||||
X_API Term YAP_ExtendList(Term, Term);
|
||||
X_API int YAP_CloseList(Term, Term);
|
||||
X_API int YAP_IsAttVar(Term);
|
||||
X_API Term YAP_AttsOfVar(Term);
|
||||
X_API int YAP_FileNoFromStream(Term);
|
||||
X_API void *YAP_FileDescriptorFromStream(Term);
|
||||
X_API void *YAP_Record(Term);
|
||||
X_API Term YAP_Recorded(void *);
|
||||
X_API int YAP_Erase(void *);
|
||||
X_API int YAP_Variant(Term, Term);
|
||||
X_API Int YAP_NumberVars(Term, Int);
|
||||
X_API Term YAP_UnNumberVars(Term);
|
||||
X_API int YAP_IsNumberedVariable(Term);
|
||||
X_API int YAP_ExactlyEqual(Term, Term);
|
||||
X_API Int YAP_TermHash(Term, Int, Int, int);
|
||||
X_API void YAP_signal(int);
|
||||
X_API int YAP_SetYAPFlag(yap_flag_t, int);
|
||||
X_API Int YAP_VarSlotToNumber(Int);
|
||||
X_API Term YAP_ModuleUser(void);
|
||||
X_API Int YAP_NumberOfClausesForPredicate(PredEntry *);
|
||||
X_API int YAP_MaxOpPriority(Atom, Term);
|
||||
X_API int YAP_OpInfo(Atom, Term, int, int *, int *);
|
||||
X_API Term YAP_AllocExternalDataInStack(size_t);
|
||||
X_API void *YAP_ExternalDataInStackFromTerm(Term);
|
||||
X_API int YAP_NewOpaqueType(void *);
|
||||
X_API Term YAP_NewOpaqueObject(int, size_t);
|
||||
X_API void *YAP_OpaqueObjectFromTerm(Term);
|
||||
X_API int YAP_Argv(char *** argvp);
|
||||
X_API YAP_tag_t YAP_TagOfTerm(Term);
|
||||
X_API size_t YAP_ExportTerm(Term, char *, size_t);
|
||||
X_API size_t YAP_SizeOfExportedTerm(char *);
|
||||
X_API Term YAP_ImportTerm(char *);
|
||||
X_API int YAP_RequiresExtraStack(size_t);
|
||||
|
||||
static UInt
|
||||
current_arity(void)
|
||||
|
90
C/cdmgr.c
90
C/cdmgr.c
@ -473,53 +473,53 @@ static char SccsId[] = "@(#)cdmgr.c 1.1 05/02/98";
|
||||
#endif
|
||||
|
||||
|
||||
STATIC_PROTO(void retract_all, (PredEntry *, int));
|
||||
STATIC_PROTO(void add_first_static, (PredEntry *, yamop *, int));
|
||||
STATIC_PROTO(void add_first_dynamic, (PredEntry *, yamop *, int));
|
||||
STATIC_PROTO(void asserta_stat_clause, (PredEntry *, yamop *, int));
|
||||
STATIC_PROTO(void asserta_dynam_clause, (PredEntry *, yamop *));
|
||||
STATIC_PROTO(void assertz_stat_clause, (PredEntry *, yamop *, int));
|
||||
STATIC_PROTO(void assertz_dynam_clause, (PredEntry *, yamop *));
|
||||
STATIC_PROTO(void expand_consult, ( void ));
|
||||
STATIC_PROTO(int not_was_reconsulted, (PredEntry *, Term, int));
|
||||
STATIC_PROTO(int RemoveIndexation, (PredEntry *));
|
||||
STATIC_PROTO(int static_in_use, (PredEntry *, int));
|
||||
static void retract_all(PredEntry *, int);
|
||||
static void add_first_static(PredEntry *, yamop *, int);
|
||||
static void add_first_dynamic(PredEntry *, yamop *, int);
|
||||
static void asserta_stat_clause(PredEntry *, yamop *, int);
|
||||
static void asserta_dynam_clause(PredEntry *, yamop *);
|
||||
static void assertz_stat_clause(PredEntry *, yamop *, int);
|
||||
static void assertz_dynam_clause(PredEntry *, yamop *);
|
||||
static void expand_consult( void );
|
||||
static int not_was_reconsulted(PredEntry *, Term, int);
|
||||
static int RemoveIndexation(PredEntry *);
|
||||
static int static_in_use(PredEntry *, int);
|
||||
#if !defined(YAPOR) && !defined(THREADS)
|
||||
STATIC_PROTO(Int search_for_static_predicate_in_use, (PredEntry *, int));
|
||||
STATIC_PROTO(void mark_pred, (int, PredEntry *));
|
||||
STATIC_PROTO(void do_toggle_static_predicates_in_use, (int));
|
||||
static Int search_for_static_predicate_in_use(PredEntry *, int);
|
||||
static void mark_pred(int, PredEntry *);
|
||||
static void do_toggle_static_predicates_in_use(int);
|
||||
#endif
|
||||
STATIC_PROTO(Int p_number_of_clauses, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_compile, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_compile_dynamic, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_purge_clauses, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_setspy, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_rmspy, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_startconsult, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_showconslultlev, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_endconsult, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_undefined, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_in_use, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_new_multifile, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_is_multifile, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_optimizer_on, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_optimizer_off, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_is_dynamic, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_kill_dynamic, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_compile_mode, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_is_profiled, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_profile_info, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_profile_reset, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_is_call_counted, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_call_count_info, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_call_count_set, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_call_count_reset, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_toggle_static_predicates_in_use, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Atom YapConsultingFile, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int PredForCode,(yamop *, Atom *, UInt *, Term *));
|
||||
STATIC_PROTO(void kill_first_log_iblock,(LogUpdIndex *, LogUpdIndex *, PredEntry *));
|
||||
STATIC_PROTO(LogUpdIndex *find_owner_log_index,(LogUpdIndex *, yamop *));
|
||||
STATIC_PROTO(StaticIndex *find_owner_static_index,(StaticIndex *, yamop *));
|
||||
static Int p_number_of_clauses( USES_REGS1 );
|
||||
static Int p_compile( USES_REGS1 );
|
||||
static Int p_compile_dynamic( USES_REGS1 );
|
||||
static Int p_purge_clauses( USES_REGS1 );
|
||||
static Int p_setspy( USES_REGS1 );
|
||||
static Int p_rmspy( USES_REGS1 );
|
||||
static Int p_startconsult( USES_REGS1 );
|
||||
static Int p_showconslultlev( USES_REGS1 );
|
||||
static Int p_endconsult( USES_REGS1 );
|
||||
static Int p_undefined( USES_REGS1 );
|
||||
static Int p_in_use( USES_REGS1 );
|
||||
static Int p_new_multifile( USES_REGS1 );
|
||||
static Int p_is_multifile( USES_REGS1 );
|
||||
static Int p_optimizer_on( USES_REGS1 );
|
||||
static Int p_optimizer_off( USES_REGS1 );
|
||||
static Int p_is_dynamic( USES_REGS1 );
|
||||
static Int p_kill_dynamic( USES_REGS1 );
|
||||
static Int p_compile_mode( USES_REGS1 );
|
||||
static Int p_is_profiled( USES_REGS1 );
|
||||
static Int p_profile_info( USES_REGS1 );
|
||||
static Int p_profile_reset( USES_REGS1 );
|
||||
static Int p_is_call_counted( USES_REGS1 );
|
||||
static Int p_call_count_info( USES_REGS1 );
|
||||
static Int p_call_count_set( USES_REGS1 );
|
||||
static Int p_call_count_reset( USES_REGS1 );
|
||||
static Int p_toggle_static_predicates_in_use( USES_REGS1 );
|
||||
static Atom YapConsultingFile( USES_REGS1 );
|
||||
static Int PredForCode(yamop *, Atom *, UInt *, Term *);
|
||||
static void kill_first_log_iblock(LogUpdIndex *, LogUpdIndex *, PredEntry *);
|
||||
static LogUpdIndex *find_owner_log_index(LogUpdIndex *, yamop *);
|
||||
static StaticIndex *find_owner_static_index(StaticIndex *, yamop *);
|
||||
|
||||
#define PredArity(p) (p->ArityOfPE)
|
||||
#define TRYCODE(G,F,N) ( (N)<5 ? (op_numbers)((int)F+(N)*3) : G)
|
||||
|
28
C/cmppreds.c
28
C/cmppreds.c
@ -27,20 +27,20 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
STATIC_PROTO(Int compare, (Term, Term));
|
||||
STATIC_PROTO(Int p_compare, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_acomp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int a_eq, (Term,Term));
|
||||
STATIC_PROTO(Int a_dif, (Term,Term));
|
||||
STATIC_PROTO(Int a_gt, (Term, Term));
|
||||
STATIC_PROTO(Int a_ge, (Term,Term));
|
||||
STATIC_PROTO(Int a_lt, (Term,Term));
|
||||
STATIC_PROTO(Int a_le, (Term,Term));
|
||||
STATIC_PROTO(Int a_noteq, (Term,Term));
|
||||
STATIC_PROTO(Int a_gen_lt, (Term,Term));
|
||||
STATIC_PROTO(Int a_gen_le, (Term,Term));
|
||||
STATIC_PROTO(Int a_gen_gt, (Term,Term));
|
||||
STATIC_PROTO(Int a_gen_ge, (Term,Term));
|
||||
static Int compare(Term, Term);
|
||||
static Int p_compare( USES_REGS1 );
|
||||
static Int p_acomp( USES_REGS1 );
|
||||
static Int a_eq(Term,Term);
|
||||
static Int a_dif(Term,Term);
|
||||
static Int a_gt(Term, Term);
|
||||
static Int a_ge(Term,Term);
|
||||
static Int a_lt(Term,Term);
|
||||
static Int a_le(Term,Term);
|
||||
static Int a_noteq(Term,Term);
|
||||
static Int a_gen_lt(Term,Term);
|
||||
static Int a_gen_le(Term,Term);
|
||||
static Int a_gen_gt(Term,Term);
|
||||
static Int a_gen_ge(Term,Term);
|
||||
|
||||
#define rfloat(X) ( X > 0.0 ? 1 : ( X == 0.0 ? 0 : -1))
|
||||
|
||||
|
50
C/compiler.c
50
C/compiler.c
@ -224,35 +224,35 @@ typedef struct compiler_struct_struct {
|
||||
CIntermediates cint;
|
||||
} compiler_struct;
|
||||
|
||||
STATIC_PROTO(int active_branch, (int, int));
|
||||
STATIC_PROTO(void c_var, (Term, Int, unsigned int, unsigned int, compiler_struct *));
|
||||
STATIC_PROTO(void reset_vars, (Ventry *));
|
||||
STATIC_PROTO(Term optimize_ce, (Term, unsigned int, unsigned int, compiler_struct *));
|
||||
STATIC_PROTO(void c_arg, (Int, Term, unsigned int, unsigned int, compiler_struct *));
|
||||
STATIC_PROTO(void c_args, (Term, unsigned int, compiler_struct *));
|
||||
STATIC_PROTO(void c_eq, (Term, Term, compiler_struct *));
|
||||
STATIC_PROTO(void c_test, (Int, Term, compiler_struct *));
|
||||
STATIC_PROTO(void c_bifun, (basic_preds, Term, Term, Term, Term, Term, compiler_struct *));
|
||||
STATIC_PROTO(void c_goal, (Term, Term, compiler_struct *));
|
||||
STATIC_PROTO(void c_body, (Term, Term, compiler_struct *));
|
||||
STATIC_PROTO(void c_head, (Term, compiler_struct *));
|
||||
STATIC_PROTO(int usesvar, (compiler_vm_op));
|
||||
STATIC_PROTO(CELL *init_bvarray, (int, compiler_struct *));
|
||||
static int active_branch(int, int);
|
||||
static void c_var(Term, Int, unsigned int, unsigned int, compiler_struct *);
|
||||
static void reset_vars(Ventry *);
|
||||
static Term optimize_ce(Term, unsigned int, unsigned int, compiler_struct *);
|
||||
static void c_arg(Int, Term, unsigned int, unsigned int, compiler_struct *);
|
||||
static void c_args(Term, unsigned int, compiler_struct *);
|
||||
static void c_eq(Term, Term, compiler_struct *);
|
||||
static void c_test(Int, Term, compiler_struct *);
|
||||
static void c_bifun(basic_preds, Term, Term, Term, Term, Term, compiler_struct *);
|
||||
static void c_goal(Term, Term, compiler_struct *);
|
||||
static void c_body(Term, Term, compiler_struct *);
|
||||
static void c_head(Term, compiler_struct *);
|
||||
static int usesvar(compiler_vm_op);
|
||||
static CELL *init_bvarray(int, compiler_struct *);
|
||||
#ifdef DEBUG
|
||||
STATIC_PROTO(void clear_bvarray, (int, CELL *, compiler_struct *));
|
||||
static void clear_bvarray(int, CELL *, compiler_struct *);
|
||||
#else
|
||||
STATIC_PROTO(void clear_bvarray, (int, CELL *));
|
||||
static void clear_bvarray(int, CELL *);
|
||||
#endif
|
||||
STATIC_PROTO(void add_bvarray_op, (PInstr *,CELL *, int, compiler_struct *));
|
||||
STATIC_PROTO(void AssignPerm, (PInstr *, compiler_struct *));
|
||||
STATIC_PROTO(void CheckUnsafe, (PInstr *, compiler_struct *));
|
||||
STATIC_PROTO(void CheckVoids, (compiler_struct *));
|
||||
STATIC_PROTO( int checktemp, (Int, Int, compiler_vm_op, compiler_struct *));
|
||||
STATIC_PROTO( Int checkreg, (Int, Int, compiler_vm_op, int, compiler_struct *));
|
||||
STATIC_PROTO(void c_layout, (compiler_struct *));
|
||||
STATIC_PROTO(void c_optimize, (PInstr *));
|
||||
static void add_bvarray_op(PInstr *,CELL *, int, compiler_struct *);
|
||||
static void AssignPerm(PInstr *, compiler_struct *);
|
||||
static void CheckUnsafe(PInstr *, compiler_struct *);
|
||||
static void CheckVoids(compiler_struct *);
|
||||
static int checktemp(Int, Int, compiler_vm_op, compiler_struct *);
|
||||
static Int checkreg(Int, Int, compiler_vm_op, int, compiler_struct *);
|
||||
static void c_layout(compiler_struct *);
|
||||
static void c_optimize(PInstr *);
|
||||
#ifdef SFUNC
|
||||
STATIC_PROTO(void compile_sf_term, (Term, int));
|
||||
static void compile_sf_term(Term, int);
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -67,7 +67,7 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
STATIC_PROTO (void ShowOp, (char *, struct PSEUDO *));
|
||||
static void ShowOp(char *, struct PSEUDO *);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
|
118
C/dbase.c
118
C/dbase.c
@ -174,70 +174,70 @@ typedef table {
|
||||
} hash_db_table;
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(CELL *cpcells,(CELL *,CELL*,Int));
|
||||
STATIC_PROTO(void linkblk,(link_entry *,CELL *,CELL));
|
||||
STATIC_PROTO(Int cmpclls,(CELL *,CELL *,Int));
|
||||
STATIC_PROTO(Prop FindDBProp,(AtomEntry *, int, unsigned int, Term));
|
||||
STATIC_PROTO(CELL CalcKey, (Term));
|
||||
static CELL *cpcells(CELL *,CELL*,Int);
|
||||
static void linkblk(link_entry *,CELL *,CELL);
|
||||
static Int cmpclls(CELL *,CELL *,Int);
|
||||
static Prop FindDBProp(AtomEntry *, int, unsigned int, Term);
|
||||
static CELL CalcKey(Term);
|
||||
#ifdef COROUTINING
|
||||
STATIC_PROTO(CELL *MkDBTerm, (CELL *, CELL *, CELL *, CELL *, CELL *, CELL *,int *, struct db_globs *));
|
||||
static CELL *MkDBTerm(CELL *, CELL *, CELL *, CELL *, CELL *, CELL *,int *, struct db_globs *);
|
||||
#else
|
||||
STATIC_PROTO(CELL *MkDBTerm, (CELL *, CELL *, CELL *, CELL *, CELL *, int *, struct db_globs *));
|
||||
static CELL *MkDBTerm(CELL *, CELL *, CELL *, CELL *, CELL *, int *, struct db_globs *);
|
||||
#endif
|
||||
STATIC_PROTO(DBRef CreateDBStruct, (Term, DBProp, int, int *, UInt, struct db_globs *));
|
||||
STATIC_PROTO(DBRef record, (int, Term, Term, Term CACHE_TYPE));
|
||||
STATIC_PROTO(DBRef check_if_cons, (DBRef, Term));
|
||||
STATIC_PROTO(DBRef check_if_var, (DBRef));
|
||||
STATIC_PROTO(DBRef check_if_wvars, (DBRef, unsigned int, CELL *));
|
||||
STATIC_PROTO(int scheckcells, (int, CELL *, CELL *, link_entry *, CELL));
|
||||
STATIC_PROTO(DBRef check_if_nvars, (DBRef, unsigned int, CELL *, struct db_globs *));
|
||||
STATIC_PROTO(Int p_rcda, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_rcdap, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_rcdz, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_rcdzp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_drcdap, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_drcdzp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Term GetDBTerm, (DBTerm * CACHE_TYPE));
|
||||
STATIC_PROTO(DBProp FetchDBPropFromKey, (Term, int, int, char *));
|
||||
STATIC_PROTO(Int i_recorded, (DBProp,Term CACHE_TYPE));
|
||||
STATIC_PROTO(Int c_recorded, (int CACHE_TYPE));
|
||||
STATIC_PROTO(Int co_rded, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int in_rdedp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int co_rdedp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_first_instance, ( USES_REGS1 ));
|
||||
STATIC_PROTO(void ErasePendingRefs, (DBTerm * CACHE_TYPE));
|
||||
STATIC_PROTO(void RemoveDBEntry, (DBRef CACHE_TYPE));
|
||||
STATIC_PROTO(void EraseLogUpdCl, (LogUpdClause *));
|
||||
STATIC_PROTO(void MyEraseClause, (DynamicClause * CACHE_TYPE));
|
||||
STATIC_PROTO(void PrepareToEraseClause, (DynamicClause *, DBRef));
|
||||
STATIC_PROTO(void EraseEntry, (DBRef));
|
||||
STATIC_PROTO(Int p_erase, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_eraseall, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_erased, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_instance, ( USES_REGS1 ));
|
||||
STATIC_PROTO(int NotActiveDB, (DBRef));
|
||||
STATIC_PROTO(DBEntry *NextDBProp, (PropEntry *));
|
||||
STATIC_PROTO(Int init_current_key, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int cont_current_key, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int cont_current_key_integer, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_rcdstatp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_somercdedp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(yamop * find_next_clause, (DBRef USES_REGS));
|
||||
STATIC_PROTO(Int p_jump_to_next_dynamic_clause, ( USES_REGS1 ));
|
||||
static DBRef CreateDBStruct(Term, DBProp, int, int *, UInt, struct db_globs *);
|
||||
static DBRef record(int, Term, Term, Term CACHE_TYPE);
|
||||
static DBRef check_if_cons(DBRef, Term);
|
||||
static DBRef check_if_var(DBRef);
|
||||
static DBRef check_if_wvars(DBRef, unsigned int, CELL *);
|
||||
static int scheckcells(int, CELL *, CELL *, link_entry *, CELL);
|
||||
static DBRef check_if_nvars(DBRef, unsigned int, CELL *, struct db_globs *);
|
||||
static Int p_rcda( USES_REGS1 );
|
||||
static Int p_rcdap( USES_REGS1 );
|
||||
static Int p_rcdz( USES_REGS1 );
|
||||
static Int p_rcdzp( USES_REGS1 );
|
||||
static Int p_drcdap( USES_REGS1 );
|
||||
static Int p_drcdzp( USES_REGS1 );
|
||||
static Term GetDBTerm(DBTerm * CACHE_TYPE);
|
||||
static DBProp FetchDBPropFromKey(Term, int, int, char *);
|
||||
static Int i_recorded(DBProp,Term CACHE_TYPE);
|
||||
static Int c_recorded(int CACHE_TYPE);
|
||||
static Int co_rded( USES_REGS1 );
|
||||
static Int in_rdedp( USES_REGS1 );
|
||||
static Int co_rdedp( USES_REGS1 );
|
||||
static Int p_first_instance( USES_REGS1 );
|
||||
static void ErasePendingRefs(DBTerm * CACHE_TYPE);
|
||||
static void RemoveDBEntry(DBRef CACHE_TYPE);
|
||||
static void EraseLogUpdCl(LogUpdClause *);
|
||||
static void MyEraseClause(DynamicClause * CACHE_TYPE);
|
||||
static void PrepareToEraseClause(DynamicClause *, DBRef);
|
||||
static void EraseEntry(DBRef);
|
||||
static Int p_erase( USES_REGS1 );
|
||||
static Int p_eraseall( USES_REGS1 );
|
||||
static Int p_erased( USES_REGS1 );
|
||||
static Int p_instance( USES_REGS1 );
|
||||
static int NotActiveDB(DBRef);
|
||||
static DBEntry *NextDBProp(PropEntry *);
|
||||
static Int init_current_key( USES_REGS1 );
|
||||
static Int cont_current_key( USES_REGS1 );
|
||||
static Int cont_current_key_integer( USES_REGS1 );
|
||||
static Int p_rcdstatp( USES_REGS1 );
|
||||
static Int p_somercdedp( USES_REGS1 );
|
||||
static yamop * find_next_clause(DBRef USES_REGS);
|
||||
static Int p_jump_to_next_dynamic_clause( USES_REGS1 );
|
||||
#ifdef SFUNC
|
||||
STATIC_PROTO(void SFVarIn, (Term));
|
||||
STATIC_PROTO(void sf_include, (SFKeep *));
|
||||
static void SFVarIn(Term);
|
||||
static void sf_include(SFKeep *);
|
||||
#endif
|
||||
STATIC_PROTO(Int p_init_queue, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_enqueue, ( USES_REGS1 ));
|
||||
STATIC_PROTO(void keepdbrefs, (DBTerm * CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_dequeue, ( USES_REGS1 ));
|
||||
STATIC_PROTO(void ErDBE, (DBRef CACHE_TYPE));
|
||||
STATIC_PROTO(void ReleaseTermFromDB, (DBTerm * CACHE_TYPE));
|
||||
STATIC_PROTO(PredEntry *new_lu_entry, (Term));
|
||||
STATIC_PROTO(PredEntry *new_lu_int_key, (Int));
|
||||
STATIC_PROTO(PredEntry *find_lu_entry, (Term));
|
||||
STATIC_PROTO(DBProp find_int_key, (Int));
|
||||
static Int p_init_queue( USES_REGS1 );
|
||||
static Int p_enqueue( USES_REGS1 );
|
||||
static void keepdbrefs(DBTerm * CACHE_TYPE);
|
||||
static Int p_dequeue( USES_REGS1 );
|
||||
static void ErDBE(DBRef CACHE_TYPE);
|
||||
static void ReleaseTermFromDB(DBTerm * CACHE_TYPE);
|
||||
static PredEntry *new_lu_entry(Term);
|
||||
static PredEntry *new_lu_int_key(Int);
|
||||
static PredEntry *find_lu_entry(Term);
|
||||
static DBProp find_int_key(Int);
|
||||
|
||||
#define db_check_trail(x) { \
|
||||
if (Unsigned(dbg->tofref) == Unsigned(x)) { \
|
||||
|
@ -29,8 +29,8 @@ static char SccsId[] = "%W% %G%";
|
||||
|
||||
#include "Yatom.h"
|
||||
|
||||
STD_PROTO(static Int p_get_depth_limit, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_set_depth_limit, ( USES_REGS1 ));
|
||||
static Int p_get_depth_limit( USES_REGS1 );
|
||||
static Int p_set_depth_limit( USES_REGS1 );
|
||||
|
||||
static Int p_get_depth_limit( USES_REGS1 )
|
||||
{
|
||||
|
@ -41,10 +41,10 @@ Yap_RestartYap ( int flag )
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
STATIC_PROTO (int hidden, (Atom));
|
||||
STATIC_PROTO (int legal_env, (CELL * CACHE_TYPE));
|
||||
void STD_PROTO (DumpActiveGoals, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO (void detect_bug_location, (yamop *,find_pred_type,char *, int));
|
||||
static int hidden(Atom);
|
||||
static int legal_env(CELL * CACHE_TYPE);
|
||||
void DumpActiveGoals( CACHE_TYPE1 );
|
||||
static void detect_bug_location(yamop *,find_pred_type,char *, int);
|
||||
|
||||
#define ONHEAP(ptr) (CellPtr(ptr) >= CellPtr(Yap_HeapBase) && CellPtr(ptr) < CellPtr(HeapTop))
|
||||
|
||||
|
10
C/exec.c
10
C/exec.c
@ -28,11 +28,11 @@ static char SccsId[] = "@(#)cdmgr.c 1.1 05/02/98";
|
||||
#include "myddas.h"
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(Int CallPredicate, (PredEntry *, choiceptr, yamop * CACHE_TYPE));
|
||||
STATIC_PROTO(Int EnterCreepMode, (Term, Term CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_save_cp, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_execute, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_execute0, ( USES_REGS1 ));
|
||||
static Int CallPredicate(PredEntry *, choiceptr, yamop * CACHE_TYPE);
|
||||
static Int EnterCreepMode(Term, Term CACHE_TYPE);
|
||||
static Int p_save_cp( USES_REGS1 );
|
||||
static Int p_execute( USES_REGS1 );
|
||||
static Int p_execute0( USES_REGS1 );
|
||||
static int execute_pred(PredEntry *ppe, CELL *pt USES_REGS);
|
||||
|
||||
static Term
|
||||
|
44
C/grow.c
44
C/grow.c
@ -44,30 +44,30 @@ typedef enum {
|
||||
|
||||
|
||||
|
||||
STATIC_PROTO(Int p_growheap, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_growstack, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_inform_trail_overflows, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_inform_heap_overflows, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_inform_stack_overflows, ( USES_REGS1 ));
|
||||
static Int p_growheap( USES_REGS1 );
|
||||
static Int p_growstack( USES_REGS1 );
|
||||
static Int p_inform_trail_overflows( USES_REGS1 );
|
||||
static Int p_inform_heap_overflows( USES_REGS1 );
|
||||
static Int p_inform_stack_overflows( USES_REGS1 );
|
||||
|
||||
/* #define undf7 */
|
||||
/* #define undf5 */
|
||||
|
||||
STATIC_PROTO(int growstack, (long CACHE_TYPE));
|
||||
STATIC_PROTO(void MoveGlobal, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void MoveLocalAndTrail, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void SetHeapRegs, (int CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustTrail, (int, int CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustLocal, (int CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustGlobal, (long, int CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustGrowStack, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(int static_growheap, (long,int,struct intermediates *,tr_fr_ptr *, TokEntry **, VarEntry ** CACHE_TYPE));
|
||||
STATIC_PROTO(void cpcellsd, (CELL *, CELL *, CELL));
|
||||
STATIC_PROTO(CELL AdjustAppl, (CELL CACHE_TYPE));
|
||||
STATIC_PROTO(CELL AdjustPair, (CELL CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustStacksAndTrail, (long, int CACHE_TYPE));
|
||||
STATIC_PROTO(void AdjustRegs, (int CACHE_TYPE));
|
||||
STATIC_PROTO(Term AdjustGlobTerm, (Term CACHE_TYPE));
|
||||
static int growstack(size_t CACHE_TYPE);
|
||||
static void MoveGlobal( CACHE_TYPE1 );
|
||||
static void MoveLocalAndTrail( CACHE_TYPE1 );
|
||||
static void SetHeapRegs(int CACHE_TYPE);
|
||||
static void AdjustTrail(int, int CACHE_TYPE);
|
||||
static void AdjustLocal(int CACHE_TYPE);
|
||||
static void AdjustGlobal(long, int CACHE_TYPE);
|
||||
static void AdjustGrowStack( CACHE_TYPE1 );
|
||||
static int static_growheap(long,int,struct intermediates *,tr_fr_ptr *, TokEntry **, VarEntry ** CACHE_TYPE);
|
||||
static void cpcellsd(CELL *, CELL *, CELL);
|
||||
static CELL AdjustAppl(CELL CACHE_TYPE);
|
||||
static CELL AdjustPair(CELL CACHE_TYPE);
|
||||
static void AdjustStacksAndTrail(long, int CACHE_TYPE);
|
||||
static void AdjustRegs(int CACHE_TYPE);
|
||||
static Term AdjustGlobTerm(Term CACHE_TYPE);
|
||||
|
||||
static void
|
||||
LeaveGrowMode(prolog_exec_mode grow_mode)
|
||||
@ -1500,7 +1500,7 @@ Yap_InsertInGlobal(CELL *where, UInt howmuch)
|
||||
|
||||
|
||||
int
|
||||
Yap_growstack(long size)
|
||||
Yap_growstack(size_t size)
|
||||
{
|
||||
CACHE_REGS
|
||||
int res;
|
||||
@ -1616,7 +1616,7 @@ execute_growstack(long size0, int from_trail, int in_parser, tr_fr_ptr *old_trp,
|
||||
|
||||
/* Used by do_goal() when we're short of stack space */
|
||||
static int
|
||||
growstack(long size USES_REGS)
|
||||
growstack(size_t size USES_REGS)
|
||||
{
|
||||
UInt start_growth_time, growth_time;
|
||||
int gc_verbose;
|
||||
|
44
C/heapgc.c
44
C/heapgc.c
@ -35,28 +35,28 @@ static char SccsId[] = "%W% %G%";
|
||||
|
||||
/* global variables for garbage collection */
|
||||
|
||||
STATIC_PROTO(Int p_inform_gc, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(Int p_gc, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void marking_phase, (tr_fr_ptr, CELL *, yamop * CACHE_TYPE));
|
||||
STATIC_PROTO(void compaction_phase, (tr_fr_ptr, CELL *, yamop * CACHE_TYPE));
|
||||
STATIC_PROTO(void init_dbtable, (tr_fr_ptr CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_external_reference, (CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_db_fixed, (CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_regs, (tr_fr_ptr CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_trail, (tr_fr_ptr, tr_fr_ptr, CELL *, choiceptr CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_environments, (CELL *, OPREG, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(void mark_choicepoints, (choiceptr, tr_fr_ptr, int CACHE_TYPE));
|
||||
STATIC_PROTO(void into_relocation_chain, (CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(void sweep_trail, (choiceptr, tr_fr_ptr CACHE_TYPE));
|
||||
STATIC_PROTO(void sweep_environments, (CELL *, OPREG, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(void sweep_choicepoints, (choiceptr CACHE_TYPE));
|
||||
STATIC_PROTO(void compact_heap, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void update_relocation_chain, (CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(int is_gc_verbose, (void));
|
||||
STATIC_PROTO(int is_gc_very_verbose, (void));
|
||||
STATIC_PROTO(void LeaveGCMode, ( CACHE_TYPE1 ));
|
||||
static Int p_inform_gc( CACHE_TYPE1 );
|
||||
static Int p_gc( CACHE_TYPE1 );
|
||||
static void marking_phase(tr_fr_ptr, CELL *, yamop * CACHE_TYPE);
|
||||
static void compaction_phase(tr_fr_ptr, CELL *, yamop * CACHE_TYPE);
|
||||
static void init_dbtable(tr_fr_ptr CACHE_TYPE);
|
||||
static void mark_external_reference(CELL * CACHE_TYPE);
|
||||
static void mark_db_fixed(CELL * CACHE_TYPE);
|
||||
static void mark_regs(tr_fr_ptr CACHE_TYPE);
|
||||
static void mark_trail(tr_fr_ptr, tr_fr_ptr, CELL *, choiceptr CACHE_TYPE);
|
||||
static void mark_environments(CELL *, OPREG, CELL * CACHE_TYPE);
|
||||
static void mark_choicepoints(choiceptr, tr_fr_ptr, int CACHE_TYPE);
|
||||
static void into_relocation_chain(CELL *, CELL * CACHE_TYPE);
|
||||
static void sweep_trail(choiceptr, tr_fr_ptr CACHE_TYPE);
|
||||
static void sweep_environments(CELL *, OPREG, CELL * CACHE_TYPE);
|
||||
static void sweep_choicepoints(choiceptr CACHE_TYPE);
|
||||
static void compact_heap( CACHE_TYPE1 );
|
||||
static void update_relocation_chain(CELL *, CELL * CACHE_TYPE);
|
||||
static int is_gc_verbose(void);
|
||||
static int is_gc_very_verbose(void);
|
||||
static void LeaveGCMode( CACHE_TYPE1 );
|
||||
#ifdef EASY_SHUNTING
|
||||
STATIC_PROTO(void set_conditionals, (tr_fr_ptr CACHE_TYPE));
|
||||
static void set_conditionals(tr_fr_ptr CACHE_TYPE);
|
||||
#endif /* EASY_SHUNTING */
|
||||
|
||||
#include "heapgc.h"
|
||||
@ -1064,7 +1064,7 @@ inc_var(CELL *current, CELL *next)
|
||||
}
|
||||
#endif /* INSTRUMENT_GC */
|
||||
|
||||
int STD_PROTO(vsc_stop,(void));
|
||||
int vsc_stop(void);
|
||||
|
||||
int
|
||||
vsc_stop(void) {
|
||||
|
@ -502,10 +502,10 @@ static char SccsId[] = "%W% %G%";
|
||||
#define SET_JLBL(X)
|
||||
#endif
|
||||
|
||||
UInt STATIC_PROTO(do_index, (ClauseDef *,ClauseDef *,struct intermediates *,UInt,UInt,int,int,CELL *));
|
||||
UInt STATIC_PROTO(do_compound_index, (ClauseDef *,ClauseDef *,Term *t,struct intermediates *,UInt,UInt,UInt,UInt,int,int,int,CELL *,int));
|
||||
UInt STATIC_PROTO(do_dbref_index, (ClauseDef *,ClauseDef *,Term,struct intermediates *,UInt,UInt,int,int,CELL *));
|
||||
UInt STATIC_PROTO(do_blob_index, (ClauseDef *,ClauseDef *,Term,struct intermediates *,UInt,UInt,int,int,CELL *,int));
|
||||
static UInt do_index(ClauseDef *,ClauseDef *,struct intermediates *,UInt,UInt,int,int,CELL *);
|
||||
static UInt do_compound_index(ClauseDef *,ClauseDef *,Term *t,struct intermediates *,UInt,UInt,UInt,UInt,int,int,int,CELL *,int);
|
||||
static UInt do_dbref_index(ClauseDef *,ClauseDef *,Term,struct intermediates *,UInt,UInt,int,int,CELL *);
|
||||
static UInt do_blob_index(ClauseDef *,ClauseDef *,Term,struct intermediates *,UInt,UInt,int,int,CELL *,int);
|
||||
|
||||
static UInt
|
||||
cleanup_sw_on_clauses(CELL larg, UInt sz, OPCODE ecls)
|
||||
|
22
C/init.c
22
C/init.c
@ -62,22 +62,22 @@ static char SccsId[] = "%W% %G%";
|
||||
int Yap_output_msg = FALSE;
|
||||
|
||||
#ifdef MACC
|
||||
STATIC_PROTO(void InTTYLine, (char *));
|
||||
static void InTTYLine(char *);
|
||||
#endif
|
||||
#endif
|
||||
STATIC_PROTO(void SetOp, (int, int, char *, Term));
|
||||
STATIC_PROTO(void InitOps, (void));
|
||||
STATIC_PROTO(void InitDebug, (void));
|
||||
static void SetOp(int, int, char *, Term);
|
||||
static void InitOps(void);
|
||||
static void InitDebug(void);
|
||||
#ifdef CUT_C
|
||||
STATIC_PROTO(void CleanBack, (PredEntry *, CPredicate, CPredicate, CPredicate));
|
||||
static void CleanBack(PredEntry *, CPredicate, CPredicate, CPredicate);
|
||||
#else
|
||||
STATIC_PROTO(void CleanBack, (PredEntry *, CPredicate, CPredicate));
|
||||
static void CleanBack(PredEntry *, CPredicate, CPredicate);
|
||||
#endif
|
||||
STATIC_PROTO(void InitStdPreds,(void));
|
||||
STATIC_PROTO(void InitFlags, (void));
|
||||
STATIC_PROTO(void InitCodes, (void));
|
||||
STATIC_PROTO(void InitVersion, (void));
|
||||
STD_PROTO(void exit, (int));
|
||||
static void InitStdPreds(void);
|
||||
static void InitFlags(void);
|
||||
static void InitCodes(void);
|
||||
static void InitVersion(void);
|
||||
void exit(int);
|
||||
static void InitWorker(int wid);
|
||||
|
||||
|
||||
|
30
C/inlines.c
30
C/inlines.c
@ -23,21 +23,21 @@
|
||||
#include "cut_c.h"
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(Int p_atom, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_atomic, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_integer, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_nonvar, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_number, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_var, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_db_ref, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_primitive, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_compound, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_float, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_equal, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_dif, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_eq, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_arg, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_functor, ( USES_REGS1 ));
|
||||
static Int p_atom( USES_REGS1 );
|
||||
static Int p_atomic( USES_REGS1 );
|
||||
static Int p_integer( USES_REGS1 );
|
||||
static Int p_nonvar( USES_REGS1 );
|
||||
static Int p_number( USES_REGS1 );
|
||||
static Int p_var( USES_REGS1 );
|
||||
static Int p_db_ref( USES_REGS1 );
|
||||
static Int p_primitive( USES_REGS1 );
|
||||
static Int p_compound( USES_REGS1 );
|
||||
static Int p_float( USES_REGS1 );
|
||||
static Int p_equal( USES_REGS1 );
|
||||
static Int p_dif( USES_REGS1 );
|
||||
static Int p_eq( USES_REGS1 );
|
||||
static Int p_arg( USES_REGS1 );
|
||||
static Int p_functor( USES_REGS1 );
|
||||
|
||||
|
||||
static Int
|
||||
|
12
C/iopreds.c
12
C/iopreds.c
@ -84,12 +84,12 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
#include "iopreds.h"
|
||||
|
||||
STATIC_PROTO (Int p_set_read_error_handler, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_get_read_error_handler, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_read, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_startline, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_change_type_of_char, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_type_of_char, ( USES_REGS1 ));
|
||||
static Int p_set_read_error_handler( USES_REGS1 );
|
||||
static Int p_get_read_error_handler( USES_REGS1 );
|
||||
static Int p_read( USES_REGS1 );
|
||||
static Int p_startline( USES_REGS1 );
|
||||
static Int p_change_type_of_char( USES_REGS1 );
|
||||
static Int p_type_of_char( USES_REGS1 );
|
||||
|
||||
extern Atom Yap_FileName(IOSTREAM *s);
|
||||
|
||||
|
@ -34,7 +34,7 @@ static char SccsId[] = "%W% %G%.2";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
STD_PROTO(Int p_load_foreign, ( USES_REGS1 ));
|
||||
Int p_load_foreign( USES_REGS1 );
|
||||
|
||||
Int
|
||||
p_load_foreign( USES_REGS1 )
|
||||
|
@ -167,7 +167,7 @@ Yap_ReLoadForeign(StringList ofiles, StringList libs,
|
||||
|
||||
/*
|
||||
dunno what this one is supposed to do, no load_* defines it
|
||||
void STD_PROTO(ReOpenLoadForeign,(void));
|
||||
void ReOpenLoadForeign(void);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
10
C/mavar.c
10
C/mavar.c
@ -23,11 +23,11 @@
|
||||
#include "YapHeap.h"
|
||||
#include "eval.h"
|
||||
|
||||
STD_PROTO(static Int p_setarg, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_create_mutable, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_get_mutable, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_update_mutable, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_is_mutable, ( USES_REGS1 ));
|
||||
static Int p_setarg( USES_REGS1 );
|
||||
static Int p_create_mutable( USES_REGS1 );
|
||||
static Int p_get_mutable( USES_REGS1 );
|
||||
static Int p_update_mutable( USES_REGS1 );
|
||||
static Int p_is_mutable( USES_REGS1 );
|
||||
|
||||
static Int
|
||||
p_setarg( USES_REGS1 )
|
||||
|
@ -22,8 +22,8 @@ static char SccsId[] = "%W% %G%";
|
||||
#include "Yatom.h"
|
||||
#include "YapHeap.h"
|
||||
|
||||
STATIC_PROTO(Int p_current_module, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_current_module1, ( USES_REGS1 ));
|
||||
static Int p_current_module( USES_REGS1 );
|
||||
static Int p_current_module1( USES_REGS1 );
|
||||
|
||||
|
||||
inline static ModEntry *
|
||||
|
10
C/parser.c
10
C/parser.c
@ -68,11 +68,11 @@ typedef struct jmp_buff_struct {
|
||||
sigjmp_buf JmpBuff;
|
||||
} JMPBUFF;
|
||||
|
||||
STATIC_PROTO(void GNextToken, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void checkfor, (Term, JMPBUFF * CACHE_TYPE));
|
||||
STATIC_PROTO(Term ParseArgs, (Atom, JMPBUFF * CACHE_TYPE));
|
||||
STATIC_PROTO(Term ParseList, (JMPBUFF * CACHE_TYPE));
|
||||
STATIC_PROTO(Term ParseTerm, (int, JMPBUFF * CACHE_TYPE));
|
||||
static void GNextToken( CACHE_TYPE1 );
|
||||
static void checkfor(Term, JMPBUFF * CACHE_TYPE);
|
||||
static Term ParseArgs(Atom, JMPBUFF * CACHE_TYPE);
|
||||
static Term ParseList(JMPBUFF * CACHE_TYPE);
|
||||
static Term ParseTerm(int, JMPBUFF * CACHE_TYPE);
|
||||
|
||||
|
||||
#define TRY(S,P) \
|
||||
|
@ -1212,7 +1212,7 @@ Yap_StreamPosition(IOSTREAM *st)
|
||||
return StreamPosition(st);
|
||||
}
|
||||
|
||||
IOSTREAM *STD_PROTO(Yap_Scurin, (void));
|
||||
IOSTREAM *Yap_Scurin(void);
|
||||
|
||||
IOSTREAM *
|
||||
Yap_Scurin(void)
|
||||
|
4
C/qlyr.c
4
C/qlyr.c
@ -29,8 +29,8 @@
|
||||
|
||||
#include "qly.h"
|
||||
|
||||
STATIC_PROTO(void RestoreEntries, (PropEntry *, int USES_REGS));
|
||||
STATIC_PROTO(void CleanCode, (PredEntry * USES_REGS));
|
||||
static void RestoreEntries(PropEntry *, int USES_REGS);
|
||||
static void CleanCode(PredEntry * USES_REGS);
|
||||
|
||||
typedef enum {
|
||||
OUT_OF_TEMP_SPACE = 0,
|
||||
|
4
C/qlyw.c
4
C/qlyw.c
@ -29,8 +29,8 @@
|
||||
|
||||
#include "qly.h"
|
||||
|
||||
STATIC_PROTO(void RestoreEntries, (PropEntry *, int USES_REGS));
|
||||
STATIC_PROTO(void CleanCode, (PredEntry * USES_REGS));
|
||||
static void RestoreEntries(PropEntry *, int USES_REGS);
|
||||
static void CleanCode(PredEntry * USES_REGS);
|
||||
|
||||
static void
|
||||
GrowAtomTable(void) {
|
||||
|
88
C/save.c
88
C/save.c
@ -85,55 +85,55 @@ void initIO(void);
|
||||
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(int myread, (int, char *, Int));
|
||||
STATIC_PROTO(Int mywrite, (int, char *, Int));
|
||||
STATIC_PROTO(int open_file, (char *, int));
|
||||
STATIC_PROTO(int close_file, (void));
|
||||
STATIC_PROTO(Int putout, (CELL));
|
||||
STATIC_PROTO(Int putcellptr, (CELL *));
|
||||
STATIC_PROTO(CELL get_cell, (void));
|
||||
STATIC_PROTO(CELL *get_cellptr, ( /* CELL * */ void));
|
||||
STATIC_PROTO(int put_info, (int, int CACHE_TYPE));
|
||||
STATIC_PROTO(int save_regs, (int CACHE_TYPE));
|
||||
STATIC_PROTO(int save_code_info, (void));
|
||||
STATIC_PROTO(int save_heap, (void));
|
||||
STATIC_PROTO(int save_stacks, (int CACHE_TYPE));
|
||||
STATIC_PROTO(int save_crc, (void));
|
||||
STATIC_PROTO(Int do_save, (int CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_save2, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(Int p_save_program, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(int check_header, (CELL *, CELL *, CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(int get_heap_info, (CACHE_TYPE1));
|
||||
STATIC_PROTO(int get_regs, (int CACHE_TYPE));
|
||||
STATIC_PROTO(int get_insts, (OPCODE []));
|
||||
STATIC_PROTO(int get_hash, (void));
|
||||
STATIC_PROTO(int CopyCode, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(int CopyStacks, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(int get_coded, (int, OPCODE [] CACHE_TYPE));
|
||||
STATIC_PROTO(void restore_codes, (void));
|
||||
STATIC_PROTO(void RestoreDB, (DBEntry * CACHE_TYPE));
|
||||
STATIC_PROTO(void RestoreDBTerm, (DBTerm *, int CACHE_TYPE));
|
||||
STATIC_PROTO(void CleanClauses, (yamop *, yamop *,PredEntry * CACHE_TYPE));
|
||||
STATIC_PROTO(void rehash, (CELL *, int, int CACHE_TYPE));
|
||||
STATIC_PROTO(void CleanCode, (PredEntry * CACHE_TYPE));
|
||||
STATIC_PROTO(void RestoreEntries, (PropEntry *, int CACHE_TYPE));
|
||||
STATIC_PROTO(void RestoreFreeSpace, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void restore_heap, (void));
|
||||
static int myread(int, char *, Int);
|
||||
static Int mywrite(int, char *, Int);
|
||||
static int open_file(char *, int);
|
||||
static int close_file(void);
|
||||
static Int putout(CELL);
|
||||
static Int putcellptr(CELL *);
|
||||
static CELL get_cell(void);
|
||||
static CELL *get_cellptr( /* CELL * */ void);
|
||||
static int put_info(int, int CACHE_TYPE);
|
||||
static int save_regs(int CACHE_TYPE);
|
||||
static int save_code_info(void);
|
||||
static int save_heap(void);
|
||||
static int save_stacks(int CACHE_TYPE);
|
||||
static int save_crc(void);
|
||||
static Int do_save(int CACHE_TYPE);
|
||||
static Int p_save2( CACHE_TYPE1 );
|
||||
static Int p_save_program( CACHE_TYPE1 );
|
||||
static int check_header(CELL *, CELL *, CELL *, CELL * CACHE_TYPE);
|
||||
static int get_heap_info(CACHE_TYPE1);
|
||||
static int get_regs(int CACHE_TYPE);
|
||||
static int get_insts(OPCODE []);
|
||||
static int get_hash(void);
|
||||
static int CopyCode( CACHE_TYPE1 );
|
||||
static int CopyStacks( CACHE_TYPE1 );
|
||||
static int get_coded(int, OPCODE [] CACHE_TYPE);
|
||||
static void restore_codes(void);
|
||||
static void RestoreDB(DBEntry * CACHE_TYPE);
|
||||
static void RestoreDBTerm(DBTerm *, int CACHE_TYPE);
|
||||
static void CleanClauses(yamop *, yamop *,PredEntry * CACHE_TYPE);
|
||||
static void rehash(CELL *, int, int CACHE_TYPE);
|
||||
static void CleanCode(PredEntry * CACHE_TYPE);
|
||||
static void RestoreEntries(PropEntry *, int CACHE_TYPE);
|
||||
static void RestoreFreeSpace( CACHE_TYPE1 );
|
||||
static void restore_heap(void);
|
||||
#ifdef DEBUG_RESTORE3
|
||||
STATIC_PROTO(void ShowAtoms, (void));
|
||||
STATIC_PROTO(void ShowEntries, (PropEntry *));
|
||||
static void ShowAtoms(void);
|
||||
static void ShowEntries(PropEntry *);
|
||||
#endif
|
||||
STATIC_PROTO(int OpenRestore, (char *, char *, CELL *, CELL *, CELL *, CELL *, IOSTREAM **));
|
||||
STATIC_PROTO(void CloseRestore, (void));
|
||||
static int OpenRestore(char *, char *, CELL *, CELL *, CELL *, CELL *, IOSTREAM **);
|
||||
static void CloseRestore(void);
|
||||
#ifndef _WIN32
|
||||
STATIC_PROTO(int check_opcodes, (OPCODE []));
|
||||
static int check_opcodes(OPCODE []);
|
||||
#endif
|
||||
STATIC_PROTO(void RestoreHeap, (OPCODE [] CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_restore, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void restore_heap_regs, ( CACHE_TYPE1 ));
|
||||
STATIC_PROTO(void restore_regs, (int CACHE_TYPE));
|
||||
static void RestoreHeap(OPCODE [] CACHE_TYPE);
|
||||
static Int p_restore( CACHE_TYPE1 );
|
||||
static void restore_heap_regs( CACHE_TYPE1 );
|
||||
static void restore_regs(int CACHE_TYPE);
|
||||
#ifdef MACYAP
|
||||
STATIC_PROTO(void NewFileInfo, (long, long));
|
||||
static void NewFileInfo(long, long);
|
||||
extern int DefVol;
|
||||
#endif
|
||||
|
||||
|
@ -59,8 +59,8 @@
|
||||
#define my_isupper(C) ( C >= 'A' && C <= 'Z' )
|
||||
#define my_islower(C) ( C >= 'a' && C <= 'z' )
|
||||
|
||||
STATIC_PROTO(Term float_send, (char *, int));
|
||||
STATIC_PROTO(Term get_num, (int *, int *, IOSTREAM *,char *,UInt,int));
|
||||
static Term float_send(char *, int);
|
||||
static Term get_num(int *, int *, IOSTREAM *,char *,UInt,int);
|
||||
|
||||
/* token table with some help from Richard O'Keefe's PD scanner */
|
||||
static char chtype0[NUMBER_OF_CHARS+1] =
|
||||
|
16
C/sort.c
16
C/sort.c
@ -28,14 +28,14 @@
|
||||
#define M_EVEN 0
|
||||
#define M_ODD 1
|
||||
|
||||
STATIC_PROTO(Int build_new_list, (CELL *, Term CACHE_TYPE));
|
||||
STATIC_PROTO(void simple_mergesort, (CELL *, Int, int));
|
||||
STATIC_PROTO(Int compact_mergesort, (CELL *, Int, int));
|
||||
STATIC_PROTO(int key_mergesort, (CELL *, Int, int, Functor));
|
||||
STATIC_PROTO(void adjust_vector, (CELL *, Int));
|
||||
STATIC_PROTO(Int p_sort, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_msort, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_ksort, ( USES_REGS1 ));
|
||||
static Int build_new_list(CELL *, Term CACHE_TYPE);
|
||||
static void simple_mergesort(CELL *, Int, int);
|
||||
static Int compact_mergesort(CELL *, Int, int);
|
||||
static int key_mergesort(CELL *, Int, int, Functor);
|
||||
static void adjust_vector(CELL *, Int);
|
||||
static Int p_sort( USES_REGS1 );
|
||||
static Int p_msort( USES_REGS1 );
|
||||
static Int p_ksort( USES_REGS1 );
|
||||
|
||||
/* copy to a new list of terms */
|
||||
static Int
|
||||
|
121
C/stdpreds.c
121
C/stdpreds.c
@ -285,75 +285,72 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
STD_PROTO(static Int p_setval, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_value, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_values, ( USES_REGS1 ));
|
||||
static Int p_setval( USES_REGS1 );
|
||||
static Int p_value( USES_REGS1 );
|
||||
static Int p_values( USES_REGS1 );
|
||||
#ifdef undefined
|
||||
STD_PROTO(static CODEADDR *FindAtom, (CODEADDR, int *));
|
||||
static CODEADDR *FindAtom(CODEADDR, int *);
|
||||
#endif /* undefined */
|
||||
STD_PROTO(static Int p_opdec, ( USES_REGS1 ));
|
||||
STD_PROTO(static Term get_num, (char * USES_REGS));
|
||||
STD_PROTO(static Int p_name, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_atom_chars, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_atom_codes, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_atom_length, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_atom_split, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_number_chars, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_number_codes, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_univ, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_abort, ( USES_REGS1 ));
|
||||
static Int p_opdec( USES_REGS1 );
|
||||
static Term get_num(char * USES_REGS);
|
||||
static Int p_name( USES_REGS1 );
|
||||
static Int p_atom_chars( USES_REGS1 );
|
||||
static Int p_atom_codes( USES_REGS1 );
|
||||
static Int p_atom_length( USES_REGS1 );
|
||||
static Int p_atom_split( USES_REGS1 );
|
||||
static Int p_number_chars( USES_REGS1 );
|
||||
static Int p_number_codes( USES_REGS1 );
|
||||
static Int p_univ( USES_REGS1 );
|
||||
static Int p_abort( USES_REGS1 );
|
||||
#ifdef BEAM
|
||||
STD_PROTO(Int p_halt, ( USES_REGS1 ));
|
||||
Int p_halt( USES_REGS1 );
|
||||
#else
|
||||
STD_PROTO(static Int p_halt, ( USES_REGS1 ));
|
||||
static Int p_halt( USES_REGS1 );
|
||||
#endif
|
||||
STD_PROTO(static Int init_current_atom, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int cont_current_atom, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int init_current_predicate, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int cont_current_predicate, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int init_current_predicate_for_atom, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int cont_current_predicate_for_atom, ( USES_REGS1 ));
|
||||
STD_PROTO(static OpEntry *NextOp, (OpEntry * CACHE_TYPE));
|
||||
STD_PROTO(static Int init_current_op, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int cont_current_op, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int init_current_atom_op, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int cont_current_atom_op, ( USES_REGS1 ));
|
||||
#ifdef DEBUG
|
||||
STD_PROTO(static Int p_debug, ( USES_REGS1 ));
|
||||
#endif
|
||||
STD_PROTO(static Int p_flags, ( USES_REGS1 ));
|
||||
STD_PROTO(static int AlreadyHidden, (char *));
|
||||
STD_PROTO(static Int p_hide, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_hidden, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_unhide, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int TrailMax, (void));
|
||||
STD_PROTO(static Int GlobalMax, (void));
|
||||
STD_PROTO(static Int LocalMax, (void));
|
||||
STD_PROTO(static Int p_statistics_heap_max, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_statistics_global_max, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_statistics_local_max, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_statistics_heap_info, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_statistics_stacks_info, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_statistics_trail_info, ( USES_REGS1 ));
|
||||
STD_PROTO(static Term mk_argc_list, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_argv, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_cputime, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_systime, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_runtime, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_walltime, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_access_yap_flags, ( USES_REGS1 ));
|
||||
STD_PROTO(static Int p_set_yap_flags, ( USES_REGS1 ));
|
||||
static Int init_current_atom( USES_REGS1 );
|
||||
static Int cont_current_atom( USES_REGS1 );
|
||||
static Int init_current_predicate( USES_REGS1 );
|
||||
static Int cont_current_predicate( USES_REGS1 );
|
||||
static Int init_current_predicate_for_atom( USES_REGS1 );
|
||||
static Int cont_current_predicate_for_atom( USES_REGS1 );
|
||||
static OpEntry *NextOp(OpEntry * CACHE_TYPE);
|
||||
static Int init_current_op( USES_REGS1 );
|
||||
static Int cont_current_op( USES_REGS1 );
|
||||
static Int init_current_atom_op( USES_REGS1 );
|
||||
static Int cont_current_atom_op( USES_REGS1 );
|
||||
static Int p_flags( USES_REGS1 );
|
||||
static int AlreadyHidden(char *);
|
||||
static Int p_hide( USES_REGS1 );
|
||||
static Int p_hidden( USES_REGS1 );
|
||||
static Int p_unhide( USES_REGS1 );
|
||||
static Int TrailMax(void);
|
||||
static Int GlobalMax(void);
|
||||
static Int LocalMax(void);
|
||||
static Int p_statistics_heap_max( USES_REGS1 );
|
||||
static Int p_statistics_global_max( USES_REGS1 );
|
||||
static Int p_statistics_local_max( USES_REGS1 );
|
||||
static Int p_statistics_heap_info( USES_REGS1 );
|
||||
static Int p_statistics_stacks_info( USES_REGS1 );
|
||||
static Int p_statistics_trail_info( USES_REGS1 );
|
||||
static Term mk_argc_list( USES_REGS1 );
|
||||
static Int p_argv( USES_REGS1 );
|
||||
static Int p_cputime( USES_REGS1 );
|
||||
static Int p_systime( USES_REGS1 );
|
||||
static Int p_runtime( USES_REGS1 );
|
||||
static Int p_walltime( USES_REGS1 );
|
||||
static Int p_access_yap_flags( USES_REGS1 );
|
||||
static Int p_set_yap_flags( USES_REGS1 );
|
||||
|
||||
#ifdef BEAM
|
||||
STD_PROTO(Int use_eam, ( USES_REGS1 ));
|
||||
STD_PROTO(Int eager_split, ( USES_REGS1 ));
|
||||
STD_PROTO(Int force_wait, ( USES_REGS1 ));
|
||||
STD_PROTO(Int commit, ( USES_REGS1 ));
|
||||
STD_PROTO(Int skip_while_var, ( USES_REGS1 ));
|
||||
STD_PROTO(Int wait_while_var, ( USES_REGS1 ));
|
||||
STD_PROTO(Int show_time, ( USES_REGS1 ));
|
||||
STD_PROTO(Int start_eam, ( USES_REGS1 ));
|
||||
STD_PROTO(Int cont_eam, ( USES_REGS1 ));
|
||||
Int use_eam( USES_REGS1 );
|
||||
Int eager_split( USES_REGS1 );
|
||||
Int force_wait( USES_REGS1 );
|
||||
Int commit( USES_REGS1 );
|
||||
Int skip_while_var( USES_REGS1 );
|
||||
Int wait_while_var( USES_REGS1 );
|
||||
Int show_time( USES_REGS1 );
|
||||
Int start_eam( USES_REGS1 );
|
||||
Int cont_eam( USES_REGS1 );
|
||||
|
||||
extern int EAM;
|
||||
extern int eam_am(PredEntry*);
|
||||
|
62
C/sysbits.c
62
C/sysbits.c
@ -90,26 +90,26 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
|
||||
STATIC_PROTO (void InitTime, (int));
|
||||
STATIC_PROTO (void InitWTime, (void));
|
||||
STATIC_PROTO (Int p_sh, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_shell, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_system, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_mv, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_dir_sp, ( USES_REGS1 ));
|
||||
STATIC_PROTO (void InitRandom, (void));
|
||||
STATIC_PROTO (Int p_srandom, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_alarm, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_getenv, ( USES_REGS1 ));
|
||||
STATIC_PROTO (Int p_putenv, ( USES_REGS1 ));
|
||||
STATIC_PROTO (void set_fpu_exceptions, (int));
|
||||
static void InitTime(int);
|
||||
static void InitWTime(void);
|
||||
static Int p_sh( USES_REGS1 );
|
||||
static Int p_shell( USES_REGS1 );
|
||||
static Int p_system( USES_REGS1 );
|
||||
static Int p_mv( USES_REGS1 );
|
||||
static Int p_dir_sp( USES_REGS1 );
|
||||
static void InitRandom(void);
|
||||
static Int p_srandom( USES_REGS1 );
|
||||
static Int p_alarm( USES_REGS1 );
|
||||
static Int p_getenv( USES_REGS1 );
|
||||
static Int p_putenv( USES_REGS1 );
|
||||
static void set_fpu_exceptions(int);
|
||||
#ifdef MACYAP
|
||||
STATIC_PROTO (int chdir, (char *));
|
||||
static int chdir(char *);
|
||||
/* #define signal skel_signal */
|
||||
#endif /* MACYAP */
|
||||
|
||||
|
||||
STD_PROTO (void exit, (int));
|
||||
void exit(int);
|
||||
|
||||
#ifdef _WIN32
|
||||
void
|
||||
@ -1037,7 +1037,7 @@ InitRandom (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
STD_PROTO (extern int rand, (void));
|
||||
extern int rand(void);
|
||||
|
||||
|
||||
double
|
||||
@ -1094,7 +1094,7 @@ p_srandom ( USES_REGS1 )
|
||||
|
||||
#endif
|
||||
|
||||
STATIC_PROTO (void InitSignals, (void));
|
||||
static void InitSignals(void);
|
||||
|
||||
#define PLSIG_PREPARED 0x01 /* signal is prepared */
|
||||
#define PLSIG_THROW 0x02 /* throw signal(num, name) */
|
||||
@ -1239,10 +1239,10 @@ Yap_signal_index(const char *name)
|
||||
#include <sys/ucontext.h>
|
||||
#endif
|
||||
|
||||
STATIC_PROTO (void HandleSIGSEGV, (int, siginfo_t *, ucontext_t *));
|
||||
STATIC_PROTO (void HandleMatherr, (int, siginfo_t *, ucontext_t *));
|
||||
STATIC_PROTO (void my_signal_info, (int, void (*)(int, siginfo_t *, ucontext_t *)));
|
||||
STATIC_PROTO (void my_signal, (int, void (*)(int, siginfo_t *, ucontext_t *)));
|
||||
static void HandleSIGSEGV(int, siginfo_t *, ucontext_t *);
|
||||
static void HandleMatherr, (int, siginfo_t *, ucontext_t *);
|
||||
static void my_signal_info(int, void (*)(int, siginfo_t *, ucontext_t *));
|
||||
static void my_signal(int, void (*)(int, siginfo_t *, ucontext_t *));
|
||||
|
||||
/* This routine believes there is a continuous space starting from the
|
||||
HeapBase and ending on TrailTop */
|
||||
@ -1328,12 +1328,12 @@ my_signal(int sig, void (*handler)(int, siginfo_t *, ucontext_t *))
|
||||
|
||||
#elif defined(__linux__)
|
||||
|
||||
STATIC_PROTO (RETSIGTYPE HandleMatherr, (int));
|
||||
static RETSIGTYPE HandleMatherr(int);
|
||||
#if HAVE_SIGSEGV && !defined(THREADS)
|
||||
STATIC_PROTO (RETSIGTYPE HandleSIGSEGV, (int,siginfo_t *,void *));
|
||||
STATIC_PROTO (void my_signal_info, (int, void (*)(int,siginfo_t *,void *)));
|
||||
static RETSIGTYPE HandleSIGSEGV(int,siginfo_t *,void *);
|
||||
static void my_signal_info(int, void (*)(int,siginfo_t *,void *));
|
||||
#endif
|
||||
STATIC_PROTO (void my_signal, (int, void (*)(int)));
|
||||
static void my_signal(int, void (*)(int));
|
||||
|
||||
/******** Handling floating point errors *******************/
|
||||
|
||||
@ -1457,10 +1457,10 @@ my_signal(int sig, void (*handler)(int))
|
||||
|
||||
#else /* if not (defined(__svr4__) || defined(__SVR4)) */
|
||||
|
||||
STATIC_PROTO (RETSIGTYPE HandleMatherr, (int));
|
||||
STATIC_PROTO (RETSIGTYPE HandleSIGSEGV, (int));
|
||||
STATIC_PROTO (void my_signal_info, (int, void (*)(int)));
|
||||
STATIC_PROTO (void my_signal, (int, void (*)(int)));
|
||||
static RETSIGTYPE HandleMatherr(int);
|
||||
static RETSIGTYPE HandleSIGSEGV(int);
|
||||
static void my_signal_info(int, void (*)(int));
|
||||
static void my_signal(int, void (*)(int));
|
||||
|
||||
/******** Handling floating point errors *******************/
|
||||
|
||||
@ -3163,7 +3163,7 @@ VaxFixFrame (dummy)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
int WINAPI STD_PROTO(win_yap, (HANDLE, DWORD, LPVOID));
|
||||
int WINAPI win_yap(HANDLE, DWORD, LPVOID);
|
||||
|
||||
int WINAPI win_yap(HANDLE hinst, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
@ -3184,7 +3184,7 @@ int WINAPI win_yap(HANDLE hinst, DWORD reason, LPVOID reserved)
|
||||
|
||||
#if (defined(YAPOR) || defined(THREADS)) && !defined(USE_PTHREAD_LOCKING)
|
||||
#ifdef sparc
|
||||
void STD_PROTO(rw_lock_voodoo,(void));
|
||||
void rw_lock_voodoo(void);
|
||||
|
||||
void
|
||||
rw_lock_voodoo(void) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "clause.h"
|
||||
#include "tracer.h"
|
||||
|
||||
STATIC_PROTO(void send_tracer_message, (char *, char *, Int, char *, CELL *));
|
||||
static void send_tracer_message(char *, char *, Int, char *, CELL *);
|
||||
|
||||
static void
|
||||
send_tracer_message(char *start, char *name, Int arity, char *mname, CELL *args)
|
||||
|
12
C/unify.c
12
C/unify.c
@ -20,14 +20,14 @@
|
||||
|
||||
#include "absmi.h"
|
||||
|
||||
STD_PROTO(int Yap_rational_tree_loop, (CELL *, CELL *, CELL **, CELL **));
|
||||
int Yap_rational_tree_loop(CELL *, CELL *, CELL **, CELL **);
|
||||
|
||||
STATIC_PROTO(int OCUnify_complex, (CELL *, CELL *, CELL *));
|
||||
STATIC_PROTO(int OCUnify, (register CELL, register CELL));
|
||||
STATIC_PROTO(Int p_ocunify, ( USES_REGS1 ));
|
||||
static int OCUnify_complex(CELL *, CELL *, CELL *);
|
||||
static int OCUnify(register CELL, register CELL);
|
||||
static Int p_ocunify( USES_REGS1 );
|
||||
#ifdef THREADED_CODE
|
||||
STATIC_PROTO(int rtable_hash_op, (OPCODE));
|
||||
STATIC_PROTO(void InitReverseLookupOpcode, (void));
|
||||
static int rtable_hash_op(OPCODE);
|
||||
static void InitReverseLookupOpcode(void);
|
||||
#endif
|
||||
|
||||
/* support for rational trees and unification with occur checking */
|
||||
|
@ -51,26 +51,26 @@ static char SccsId[] = "%W% %G%";
|
||||
/* You should include here the prototypes for all static functions */
|
||||
|
||||
#ifdef EUROTRA
|
||||
STATIC_PROTO(int p_clean, (void));
|
||||
STATIC_PROTO(int p_namelength, (void));
|
||||
STATIC_PROTO(int p_getpid, (void));
|
||||
STATIC_PROTO(int p_exit, (void));
|
||||
STATIC_PROTO(int p_incrcounter, (void));
|
||||
STATIC_PROTO(int p_setcounter, (void));
|
||||
STATIC_PROTO(int p_trapsignal, (void));
|
||||
STATIC_PROTO(int subsumes, (Term, Term));
|
||||
STATIC_PROTO(int p_subsumes, (void));
|
||||
STATIC_PROTO(int p_grab_tokens, (void));
|
||||
static int p_clean(void);
|
||||
static int p_namelength(void);
|
||||
static int p_getpid(void);
|
||||
static int p_exit(void);
|
||||
static int p_incrcounter(void);
|
||||
static int p_setcounter(void);
|
||||
static int p_trapsignal(void);
|
||||
static int subsumes(Term, Term);
|
||||
static int p_subsumes(void);
|
||||
static int p_grab_tokens(void);
|
||||
#endif
|
||||
#ifdef MACYAP
|
||||
STATIC_PROTO(typedef int, (*SignalProc) ());
|
||||
STATIC_PROTO(SignalProc skel_signal, (int, SignalProc));
|
||||
STATIC_PROTO(int chdir, (char *));
|
||||
static typedef int(*SignalProc) ();
|
||||
static SignalProc skel_signal(int, SignalProc);
|
||||
static int chdir(char *);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SFUNC
|
||||
STATIC_PROTO(int p_softfunctor, (void));
|
||||
static int p_softfunctor(void);
|
||||
#endif /* SFUNC */
|
||||
|
||||
|
||||
|
@ -32,18 +32,18 @@ typedef struct {
|
||||
} *vcell;
|
||||
|
||||
|
||||
STATIC_PROTO(int copy_complex_term, (CELL *, CELL *, int, int, CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(CELL vars_in_complex_term, (CELL *, CELL *, Term CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_non_singletons_in_term, ( USES_REGS1));
|
||||
STATIC_PROTO(CELL non_singletons_in_complex_term, (CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_variables_in_term, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int ground_complex_term, (CELL *, CELL * CACHE_TYPE));
|
||||
STATIC_PROTO(Int p_ground, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int p_copy_term, ( USES_REGS1 ));
|
||||
STATIC_PROTO(Int var_in_complex_term, (CELL *, CELL *, Term CACHE_TYPE));
|
||||
static int copy_complex_term(CELL *, CELL *, int, int, CELL *, CELL * CACHE_TYPE);
|
||||
static CELL vars_in_complex_term(CELL *, CELL *, Term CACHE_TYPE);
|
||||
static Int p_non_singletons_in_term( USES_REGS1);
|
||||
static CELL non_singletons_in_complex_term(CELL *, CELL * CACHE_TYPE);
|
||||
static Int p_variables_in_term( USES_REGS1 );
|
||||
static Int ground_complex_term(CELL *, CELL * CACHE_TYPE);
|
||||
static Int p_ground( USES_REGS1 );
|
||||
static Int p_copy_term( USES_REGS1 );
|
||||
static Int var_in_complex_term(CELL *, CELL *, Term CACHE_TYPE);
|
||||
|
||||
#ifdef DEBUG
|
||||
STATIC_PROTO(Int p_force_trail_expansion, ( USES_REGS1 ));
|
||||
static Int p_force_trail_expansion( USES_REGS1 );
|
||||
#endif /* DEBUG */
|
||||
|
||||
static inline void
|
||||
|
18
C/write.c
18
C/write.c
@ -78,15 +78,15 @@ typedef struct write_globs {
|
||||
#define lastw wglb->lw
|
||||
#define last_minus wglb->last_atom_minus
|
||||
|
||||
STATIC_PROTO(void wrputn, (Int, struct write_globs *));
|
||||
STATIC_PROTO(void wrputf, (Float, struct write_globs *));
|
||||
STATIC_PROTO(void wrputref, (CODEADDR, int, struct write_globs *));
|
||||
STATIC_PROTO(int legalAtom, (unsigned char *));
|
||||
/*STATIC_PROTO(int LeftOpToProtect, (Atom, int));
|
||||
STATIC_PROTO(int RightOpToProtect, (Atom, int));*/
|
||||
STATIC_PROTO(wtype AtomIsSymbols, (unsigned char *));
|
||||
STATIC_PROTO(void putAtom, (Atom, int, struct write_globs *));
|
||||
STATIC_PROTO(void writeTerm, (Term, int, int, int, struct write_globs *, struct rewind_term *));
|
||||
static void wrputn(Int, struct write_globs *);
|
||||
static void wrputf(Float, struct write_globs *);
|
||||
static void wrputref(CODEADDR, int, struct write_globs *);
|
||||
static int legalAtom(unsigned char *);
|
||||
/*static int LeftOpToProtect(Atom, int);
|
||||
static int RightOpToProtect(Atom, int);*/
|
||||
static wtype AtomIsSymbols(unsigned char *);
|
||||
static void putAtom(Atom, int, struct write_globs *);
|
||||
static void writeTerm(Term, int, int, int, struct write_globs *, struct rewind_term *);
|
||||
|
||||
#define wrputc(X,WF) Sputcode(X,WF) /* writes a character */
|
||||
|
||||
|
19
H/Foreign.h
19
H/Foreign.h
@ -100,18 +100,13 @@ typedef struct ForeignLoadItem {
|
||||
typedef void (*YapInitProc)(void);
|
||||
|
||||
|
||||
|
||||
#ifndef STD_PROTO
|
||||
#define STD_PROTO(F,A) F A
|
||||
#endif
|
||||
|
||||
void *STD_PROTO(Yap_LoadForeignFile,(char *, int));
|
||||
int STD_PROTO(Yap_CallForeignFile,(void *, char *));
|
||||
int STD_PROTO(Yap_CloseForeignFile,(void *));
|
||||
Int STD_PROTO(Yap_LoadForeign,(StringList, StringList, char *, YapInitProc *));
|
||||
Int STD_PROTO(Yap_ReLoadForeign,(StringList, StringList, char *, YapInitProc *));
|
||||
void STD_PROTO(Yap_ReOpenLoadForeign,(void));
|
||||
void STD_PROTO(Yap_ShutdownLoadForeign,(void));
|
||||
void *Yap_LoadForeignFile(char *, int);
|
||||
int Yap_CallForeignFile(void *, char *);
|
||||
int Yap_CloseForeignFile(void *);
|
||||
Int Yap_LoadForeign(StringList, StringList, char *, YapInitProc *);
|
||||
Int Yap_ReLoadForeign(StringList, StringList, char *, YapInitProc *);
|
||||
void Yap_ReOpenLoadForeign(void);
|
||||
void Yap_ShutdownLoadForeign(void);
|
||||
|
||||
#define EAGER_LOADING 1
|
||||
#define GLOBAL_LOADING 2
|
||||
|
14
H/TermExt.h
14
H/TermExt.h
@ -371,11 +371,11 @@ IsBigIntTerm (Term t)
|
||||
|
||||
#ifdef USE_GMP
|
||||
|
||||
Term STD_PROTO (Yap_MkBigIntTerm, (MP_INT *));
|
||||
MP_INT *STD_PROTO (Yap_BigIntOfTerm, (Term));
|
||||
Term Yap_MkBigIntTerm(MP_INT *);
|
||||
MP_INT *Yap_BigIntOfTerm(Term);
|
||||
|
||||
Term STD_PROTO (Yap_MkBigRatTerm, (MP_RAT *));
|
||||
MP_RAT *STD_PROTO (Yap_BigRatOfTerm, (Term));
|
||||
Term Yap_MkBigRatTerm(MP_RAT *);
|
||||
MP_RAT *Yap_BigRatOfTerm(Term);
|
||||
|
||||
INLINE_ONLY inline EXTERN void MPZ_SET (mpz_t, MP_INT *);
|
||||
|
||||
@ -636,11 +636,11 @@ INLINE_ONLY inline EXTERN void *Yap_BlobInfo(Term t)
|
||||
|
||||
#ifdef YAP_H
|
||||
|
||||
INLINE_ONLY inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
|
||||
INLINE_ONLY inline EXTERN int unify_extension(Functor, CELL, CELL *, CELL);
|
||||
|
||||
EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
|
||||
EXTERN int unify_extension(Functor, CELL, CELL *, CELL);
|
||||
|
||||
int STD_PROTO(Yap_gmp_tcmp_big_big,(Term, Term));
|
||||
int Yap_gmp_tcmp_big_big(Term, Term);
|
||||
|
||||
INLINE_ONLY inline EXTERN int
|
||||
unify_extension (Functor f, CELL d0, CELL * pt0, CELL d1)
|
||||
|
@ -90,7 +90,7 @@ typedef struct halt_hook {
|
||||
struct halt_hook *next;
|
||||
} halt_hook_entry;
|
||||
|
||||
int STD_PROTO(Yap_HaltRegisterHook,(HaltHookFunc, void *));
|
||||
int Yap_HaltRegisterHook(HaltHookFunc, void *);
|
||||
|
||||
typedef struct atom_hash_entry {
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
@ -215,12 +215,12 @@ extern struct various_codes *Yap_heap_regs;
|
||||
|
||||
|
||||
#if (defined(USE_SYSTEM_MALLOC) && HAVE_MALLINFO)||USE_DL_MALLOC
|
||||
UInt STD_PROTO(Yap_givemallinfo, (void));
|
||||
UInt Yap_givemallinfo(void);
|
||||
#endif
|
||||
|
||||
ADDR STD_PROTO(Yap_ExpandPreAllocCodeSpace, (UInt, void *, int));
|
||||
ADDR Yap_ExpandPreAllocCodeSpace(UInt, void *, int);
|
||||
#define Yap_ReleasePreAllocCodeSpace(x)
|
||||
ADDR STD_PROTO(Yap_InitPreAllocCodeSpace, (int));
|
||||
ADDR Yap_InitPreAllocCodeSpace(int);
|
||||
|
||||
#include "inline-only.h"
|
||||
INLINE_ONLY EXTERN inline ADDR
|
||||
|
580
H/Yapproto.h
580
H/Yapproto.h
@ -15,259 +15,255 @@
|
||||
|
||||
/* prototype file for Yap */
|
||||
|
||||
#define STD_PROTO(F,A) F A
|
||||
#define STATIC_PROTO(F,A) static F A
|
||||
|
||||
|
||||
/* absmi.c */
|
||||
Int STD_PROTO(Yap_absmi,(int));
|
||||
int STD_PROTO(Yap_absmiEND,(void));
|
||||
Int Yap_absmi(int);
|
||||
int Yap_absmiEND(void);
|
||||
|
||||
/* adtdefs.c */
|
||||
Term STD_PROTO(Yap_ArrayToList,(Term *,int));
|
||||
int STD_PROTO(Yap_GetName,(char *,UInt,Term));
|
||||
Term STD_PROTO(Yap_GetValue,(Atom));
|
||||
int STD_PROTO(Yap_HasOp,(Atom));
|
||||
struct operator_entry *STD_PROTO(Yap_GetOpPropForAModuleHavingALock,(AtomEntry *, Term));
|
||||
Atom STD_PROTO(Yap_LookupAtom,(char *));
|
||||
Atom STD_PROTO(Yap_LookupMaybeWideAtom,(wchar_t *));
|
||||
Atom STD_PROTO(Yap_LookupMaybeWideAtomWithLength,(wchar_t *, size_t));
|
||||
Atom STD_PROTO(Yap_FullLookupAtom,(char *));
|
||||
void STD_PROTO(Yap_LookupAtomWithAddress,(char *,AtomEntry *));
|
||||
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));
|
||||
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_NStringToList,(char *, size_t));
|
||||
Term STD_PROTO(Yap_WideStringToList,(wchar_t *));
|
||||
Term STD_PROTO(Yap_NWideStringToList,(wchar_t *, size_t));
|
||||
Term STD_PROTO(Yap_StringToDiffList,(char *,Term CACHE_TYPE));
|
||||
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));
|
||||
Term STD_PROTO(Yap_StringToListOfAtoms,(char *));
|
||||
Term STD_PROTO(Yap_NStringToListOfAtoms,(char *, size_t));
|
||||
Term STD_PROTO(Yap_WideStringToListOfAtoms,(wchar_t *));
|
||||
Term STD_PROTO(Yap_NWideStringToListOfAtoms,(wchar_t *, size_t));
|
||||
Term STD_PROTO(Yap_NWideStringToDiffListOfAtoms,(wchar_t *, Term, size_t));
|
||||
int STD_PROTO(Yap_AtomIncreaseHold,(Atom));
|
||||
int STD_PROTO(Yap_AtomDecreaseHold,(Atom));
|
||||
struct operator_entry *STD_PROTO(Yap_OpPropForModule,(Atom, Term));
|
||||
Int STD_PROTO(Yap_InitSlot,(Term CACHE_TYPE));
|
||||
Int STD_PROTO(Yap_NewSlots,(int CACHE_TYPE));
|
||||
int STD_PROTO(Yap_RecoverSlots,(int CACHE_TYPE));
|
||||
Term Yap_ArrayToList(Term *,int);
|
||||
int Yap_GetName(char *,UInt,Term);
|
||||
Term Yap_GetValue(Atom);
|
||||
int Yap_HasOp(Atom);
|
||||
struct operator_entry *Yap_GetOpPropForAModuleHavingALock(AtomEntry *, Term);
|
||||
Atom Yap_LookupAtom(char *);
|
||||
Atom Yap_LookupMaybeWideAtom(wchar_t *);
|
||||
Atom Yap_LookupMaybeWideAtomWithLength(wchar_t *, size_t);
|
||||
Atom Yap_FullLookupAtom(char *);
|
||||
void Yap_LookupAtomWithAddress(char *,AtomEntry *);
|
||||
Prop Yap_NewPredPropByFunctor(struct FunctorEntryStruct *, Term);
|
||||
Prop Yap_NewPredPropByAtom(struct AtomEntryStruct *, Term);
|
||||
Prop Yap_PredPropByFunctorNonThreadLocal(struct FunctorEntryStruct *, Term);
|
||||
Prop Yap_PredPropByAtomNonThreadLocal(struct AtomEntryStruct *, Term);
|
||||
Functor Yap_UnlockedMkFunctor(AtomEntry *,unsigned int);
|
||||
Functor Yap_MkFunctor(Atom,unsigned int);
|
||||
void Yap_MkFunctorWithAddress(Atom,unsigned int,FunctorEntry *);
|
||||
void Yap_PutValue(Atom,Term);
|
||||
void Yap_ReleaseAtom(Atom);
|
||||
Term Yap_StringToList(char *);
|
||||
Term Yap_NStringToList(char *, size_t);
|
||||
Term Yap_WideStringToList(wchar_t *);
|
||||
Term Yap_NWideStringToList(wchar_t *, size_t);
|
||||
Term Yap_StringToDiffList(char *,Term CACHE_TYPE);
|
||||
Term Yap_NStringToDiffList(char *,Term, size_t);
|
||||
Term Yap_WideStringToDiffList(wchar_t *,Term);
|
||||
Term Yap_NWideStringToDiffList(wchar_t *,Term, size_t);
|
||||
Term Yap_StringToListOfAtoms(char *);
|
||||
Term Yap_NStringToListOfAtoms(char *, size_t);
|
||||
Term Yap_WideStringToListOfAtoms(wchar_t *);
|
||||
Term Yap_NWideStringToListOfAtoms(wchar_t *, size_t);
|
||||
Term Yap_NWideStringToDiffListOfAtoms(wchar_t *, Term, size_t);
|
||||
int Yap_AtomIncreaseHold(Atom);
|
||||
int Yap_AtomDecreaseHold(Atom);
|
||||
struct operator_entry *Yap_OpPropForModule(Atom, Term);
|
||||
Int Yap_InitSlot(Term CACHE_TYPE);
|
||||
Int Yap_NewSlots(int CACHE_TYPE);
|
||||
int Yap_RecoverSlots(int CACHE_TYPE);
|
||||
|
||||
|
||||
#ifdef SFUNC
|
||||
Term STD_PROTO(MkSFTerm,(Functor,int,Term *,Term));
|
||||
CELL STD_PROTO(*ArgsOfSFTerm,(Term));
|
||||
Term MkSFTerm(Functor,int,Term *,Term);
|
||||
CELL *ArgsOfSFTerm(Term);
|
||||
#endif
|
||||
|
||||
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));
|
||||
Prop STD_PROTO(Yap_GetExpProp,(Atom,unsigned int));
|
||||
Prop STD_PROTO(Yap_GetExpPropHavingLock,(AtomEntry *,unsigned int));
|
||||
Prop Yap_GetPredPropByAtom(Atom, Term);
|
||||
Prop Yap_GetPredPropByFunc(Functor, Term);
|
||||
Prop Yap_GetPredPropByAtomInThisModule(Atom, Term);
|
||||
Prop Yap_GetPredPropByFuncInThisModule(Functor, Term);
|
||||
Prop Yap_GetPredPropHavingLock(Atom,unsigned int, Term);
|
||||
Prop Yap_GetExpProp(Atom,unsigned int);
|
||||
Prop Yap_GetExpPropHavingLock(AtomEntry *,unsigned int);
|
||||
|
||||
/* agc.c */
|
||||
void STD_PROTO(Yap_atom_gc, (CACHE_TYPE1));
|
||||
void STD_PROTO(Yap_init_agc, (void));
|
||||
void Yap_atom_gc( CACHE_TYPE1 );
|
||||
void Yap_init_agc( void );
|
||||
|
||||
/* alloc.c */
|
||||
void STD_PROTO(Yap_FreeCodeSpace,(char *));
|
||||
char *STD_PROTO(Yap_AllocAtomSpace,(size_t));
|
||||
char *STD_PROTO(Yap_AllocCodeSpace,(size_t));
|
||||
char *STD_PROTO(Yap_ReallocCodeSpace,(char *,size_t));
|
||||
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,(UInt,UInt,UInt));
|
||||
void STD_PROTO(Yap_InitExStacks,(int,int,int));
|
||||
void Yap_FreeCodeSpace(char *);
|
||||
char *Yap_AllocAtomSpace(size_t);
|
||||
char *Yap_AllocCodeSpace(size_t);
|
||||
char *Yap_ReallocCodeSpace(char *,size_t);
|
||||
ADDR Yap_AllocFromForeignArea(Int);
|
||||
int Yap_ExtendWorkSpace(Int);
|
||||
void Yap_FreeAtomSpace(char *);
|
||||
int Yap_FreeWorkSpace(void);
|
||||
void Yap_InitMemory(UInt,UInt,UInt);
|
||||
void Yap_InitExStacks(int,int,int);
|
||||
|
||||
/* amasm.c */
|
||||
OPCODE STD_PROTO(Yap_opcode,(op_numbers));
|
||||
OPCODE Yap_opcode(op_numbers);
|
||||
|
||||
/* analyst.c */
|
||||
#ifdef ANALYST
|
||||
void STD_PROTO(Yap_InitAnalystPreds,(void));
|
||||
void Yap_InitAnalystPreds(void);
|
||||
#endif /* ANALYST */
|
||||
|
||||
/* arrays.c */
|
||||
void STD_PROTO(Yap_InitArrayPreds,(void));
|
||||
void Yap_InitArrayPreds(void);
|
||||
|
||||
/* attvar.c */
|
||||
void STD_PROTO(Yap_InitAttVarPreds,(void));
|
||||
void Yap_InitAttVarPreds(void);
|
||||
|
||||
/* bb.c */
|
||||
void STD_PROTO(Yap_InitBBPreds,(void));
|
||||
void Yap_InitBBPreds(void);
|
||||
|
||||
/* bignum.c */
|
||||
Term STD_PROTO(Yap_MkULLIntTerm, (YAP_ULONG_LONG));
|
||||
int STD_PROTO(Yap_IsStringTerm, (Term));
|
||||
int STD_PROTO(Yap_IsWideStringTerm, (Term));
|
||||
Term STD_PROTO(Yap_RatTermToApplTerm, (Term));
|
||||
void STD_PROTO(Yap_InitBigNums, (void));
|
||||
Term STD_PROTO(Yap_AllocExternalDataInStack, (CELL, size_t));
|
||||
int STD_PROTO(Yap_CleanOpaqueVariable, (CELL *));
|
||||
Term Yap_MkULLIntTerm(YAP_ULONG_LONG);
|
||||
int Yap_IsStringTerm(Term);
|
||||
int Yap_IsWideStringTerm(Term);
|
||||
Term Yap_RatTermToApplTerm(Term);
|
||||
void Yap_InitBigNums(void);
|
||||
Term Yap_AllocExternalDataInStack(CELL, size_t);
|
||||
int Yap_CleanOpaqueVariable(CELL *);
|
||||
|
||||
/* c_interface.c */
|
||||
Int STD_PROTO(YAP_Execute,(struct pred_entry *, CPredicate));
|
||||
Int STD_PROTO(YAP_ExecuteFirst,(struct pred_entry *, CPredicate));
|
||||
Int STD_PROTO(YAP_ExecuteNext,(struct pred_entry *, CPredicate));
|
||||
Int STD_PROTO(YAP_ExecuteOnCut,(struct pred_entry *, CPredicate, struct cut_c_str *));
|
||||
Int YAP_Execute(struct pred_entry *, CPredicate);
|
||||
Int YAP_ExecuteFirst(struct pred_entry *, CPredicate);
|
||||
Int YAP_ExecuteNext(struct pred_entry *, CPredicate);
|
||||
Int YAP_ExecuteOnCut(struct pred_entry *, CPredicate, struct cut_c_str *);
|
||||
|
||||
/* cdmgr.c */
|
||||
Term STD_PROTO(Yap_all_calls,(void));
|
||||
Atom STD_PROTO(Yap_ConsultingFile,(void));
|
||||
struct pred_entry *STD_PROTO(Yap_PredForChoicePt,(choiceptr));
|
||||
void STD_PROTO(Yap_InitCdMgr,(void));
|
||||
void STD_PROTO(Yap_init_consult,(int, char *));
|
||||
void STD_PROTO(Yap_end_consult,(void));
|
||||
void STD_PROTO(Yap_Abolish,(struct pred_entry *));
|
||||
void STD_PROTO(Yap_BuildMegaClause,(struct pred_entry *));
|
||||
void STD_PROTO(Yap_EraseMegaClause,(yamop *,struct pred_entry *));
|
||||
void STD_PROTO(Yap_ResetConsultStack,(void));
|
||||
void STD_PROTO(Yap_AssertzClause,(struct pred_entry *, yamop *));
|
||||
Term Yap_all_calls(void);
|
||||
Atom Yap_ConsultingFile(void);
|
||||
struct pred_entry *Yap_PredForChoicePt(choiceptr);
|
||||
void Yap_InitCdMgr(void);
|
||||
void Yap_init_consult(int, char *);
|
||||
void Yap_end_consult(void);
|
||||
void Yap_Abolish(struct pred_entry *);
|
||||
void Yap_BuildMegaClause(struct pred_entry *);
|
||||
void Yap_EraseMegaClause(yamop *,struct pred_entry *);
|
||||
void Yap_ResetConsultStack(void);
|
||||
void Yap_AssertzClause(struct pred_entry *, yamop *);
|
||||
void Yap_HidePred(struct pred_entry *pe);
|
||||
|
||||
|
||||
/* cmppreds.c */
|
||||
Int STD_PROTO(Yap_compare_terms,(Term,Term));
|
||||
void STD_PROTO(Yap_InitCmpPreds,(void));
|
||||
Int Yap_compare_terms(Term,Term);
|
||||
void Yap_InitCmpPreds(void);
|
||||
|
||||
/* compiler.c */
|
||||
yamop *STD_PROTO(Yap_cclause,(Term, Int, Term, Term));
|
||||
yamop *Yap_cclause(Term, Int, Term, Term);
|
||||
|
||||
/* computils.c */
|
||||
|
||||
/* corout.c */
|
||||
void STD_PROTO(Yap_InitCoroutPreds,(void));
|
||||
void Yap_InitCoroutPreds(void);
|
||||
#ifdef COROUTINING
|
||||
Term STD_PROTO(Yap_ListOfWokenGoals,(void));
|
||||
void STD_PROTO(Yap_WakeUp,(CELL *));
|
||||
Term Yap_ListOfWokenGoals(void);
|
||||
void Yap_WakeUp(CELL *);
|
||||
#endif
|
||||
|
||||
/* dbase.c */
|
||||
struct pred_entry *STD_PROTO(Yap_FindLUIntKey,(Int));
|
||||
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));
|
||||
struct pred_entry *Yap_FindLUIntKey(Int);
|
||||
int Yap_DBTrailOverflow(void);
|
||||
CELL Yap_EvalMasks(Term,CELL *);
|
||||
void Yap_InitBackDB(void);
|
||||
void Yap_InitDBPreds(void);
|
||||
|
||||
/* errors.c */
|
||||
void STD_PROTO(Yap_RestartYap,(int));
|
||||
void STD_PROTO(Yap_exit,(int));
|
||||
yamop *STD_PROTO(Yap_Error,(yap_error_number,Term,char *msg, ...));
|
||||
yamop *STD_PROTO(Yap_NilError,(yap_error_number,char *msg, ...));
|
||||
void Yap_RestartYap(int);
|
||||
void Yap_exit(int);
|
||||
yamop *Yap_Error(yap_error_number,Term,char *msg, ...);
|
||||
yamop *Yap_NilError(yap_error_number,char *msg, ...);
|
||||
|
||||
/* eval.c */
|
||||
void STD_PROTO(Yap_InitEval,(void));
|
||||
void Yap_InitEval(void);
|
||||
|
||||
/* exec.c */
|
||||
Term STD_PROTO(Yap_ExecuteCallMetaCall,(Term));
|
||||
void STD_PROTO(Yap_InitExecFs,(void));
|
||||
Int STD_PROTO(Yap_JumpToEnv,(Term));
|
||||
Term STD_PROTO(Yap_RunTopGoal,(Term));
|
||||
void STD_PROTO(Yap_ResetExceptionTerm,(int));
|
||||
Int STD_PROTO(Yap_execute_goal,(Term, int, Term));
|
||||
Int STD_PROTO(Yap_exec_absmi,(int));
|
||||
void STD_PROTO(Yap_trust_last,(void));
|
||||
Term STD_PROTO(Yap_GetException,(void));
|
||||
void STD_PROTO(Yap_PrepGoal,(UInt, CELL *, choiceptr USES_REGS));
|
||||
Term Yap_ExecuteCallMetaCall(Term);
|
||||
void Yap_InitExecFs(void);
|
||||
Int Yap_JumpToEnv(Term);
|
||||
Term Yap_RunTopGoal(Term);
|
||||
void Yap_ResetExceptionTerm(int);
|
||||
Int Yap_execute_goal(Term, int, Term);
|
||||
Int Yap_exec_absmi(int);
|
||||
void Yap_trust_last(void);
|
||||
Term Yap_GetException(void);
|
||||
void Yap_PrepGoal(UInt, CELL *, choiceptr USES_REGS);
|
||||
|
||||
/* exo.c */
|
||||
void STD_PROTO(Yap_InitExoPreds,(void));
|
||||
void Yap_InitExoPreds(void);
|
||||
void Yap_udi_Interval_init(void);
|
||||
|
||||
/* foreign.c */
|
||||
char *STD_PROTO(Yap_FindExecutable,(void));
|
||||
char *Yap_FindExecutable(void);
|
||||
|
||||
/* gprof.c */
|
||||
void STD_PROTO(Yap_InitLowProf,(void));
|
||||
void Yap_InitLowProf(void);
|
||||
#if LOW_PROF
|
||||
void STD_PROTO(Yap_inform_profiler_of_clause__,(void *,void *,struct pred_entry *, gprof_info));
|
||||
void Yap_inform_profiler_of_clause__(void *,void *,struct pred_entry *, 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
|
||||
#define Yap_inform_profiler_of_clause(CODE0,CODEF,AP,MODE)
|
||||
#endif
|
||||
void STD_PROTO(Yap_tell_gprof,(yamop *));
|
||||
void Yap_tell_gprof(yamop *);
|
||||
|
||||
/* globals.c */
|
||||
Term STD_PROTO(Yap_NewArena,(UInt,CELL *));
|
||||
CELL *STD_PROTO(Yap_GetFromArena,(Term *,UInt,UInt));
|
||||
void STD_PROTO(Yap_InitGlobals,(void));
|
||||
Term STD_PROTO(Yap_SaveTerm, (Term));
|
||||
Term STD_PROTO(Yap_SetGlobalVal, (Atom, Term));
|
||||
Int STD_PROTO(Yap_DeleteGlobal, (Atom));
|
||||
void STD_PROTO(Yap_AllocateDefaultArena, (Int, Int, int));
|
||||
Term Yap_NewArena(UInt,CELL *);
|
||||
CELL *Yap_GetFromArena(Term *,UInt,UInt);
|
||||
void Yap_InitGlobals(void);
|
||||
Term Yap_SaveTerm(Term);
|
||||
Term Yap_SetGlobalVal(Atom, Term);
|
||||
Int Yap_DeleteGlobal(Atom);
|
||||
void Yap_AllocateDefaultArena(Int, Int, int);
|
||||
|
||||
/* grow.c */
|
||||
Int STD_PROTO(Yap_total_stack_shift_time,(void));
|
||||
void STD_PROTO(Yap_InitGrowPreds, (void));
|
||||
UInt STD_PROTO(Yap_InsertInGlobal, (CELL *, UInt));
|
||||
int STD_PROTO(Yap_growheap, (int, size_t, void *));
|
||||
int STD_PROTO(Yap_growstack, (long));
|
||||
int STD_PROTO(Yap_growtrail, (long, int));
|
||||
int STD_PROTO(Yap_growglobal, (CELL **));
|
||||
CELL **STD_PROTO(Yap_shift_visit, (CELL **, CELL ***, CELL ***));
|
||||
Int Yap_total_stack_shift_time(void);
|
||||
void Yap_InitGrowPreds(void);
|
||||
UInt Yap_InsertInGlobal(CELL *, UInt);
|
||||
int Yap_growheap(int, size_t, void *);
|
||||
int Yap_growstack( size_t );
|
||||
int Yap_growtrail(long, int);
|
||||
int Yap_growglobal(CELL **);
|
||||
CELL **Yap_shift_visit(CELL **, CELL ***, CELL ***);
|
||||
#ifdef THREADS
|
||||
void STD_PROTO(Yap_CopyThreadStacks, (int, int, int));
|
||||
void Yap_CopyThreadStacks(int, int, int);
|
||||
#endif
|
||||
|
||||
/* heapgc.c */
|
||||
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 *));
|
||||
int STD_PROTO(Yap_gcl, (UInt, Int, CELL *, yamop *));
|
||||
Int Yap_total_gc_time(void);
|
||||
void Yap_init_gc(void);
|
||||
int Yap_is_gc_verbose(void);
|
||||
int Yap_gc(Int, CELL *, yamop *);
|
||||
int Yap_gcl(UInt, Int, CELL *, yamop *);
|
||||
|
||||
/* init.c */
|
||||
#ifdef DEBUG
|
||||
int STD_PROTO(Yap_DebugPutc,(int,wchar_t));
|
||||
void STD_PROTO(Yap_DebugSetIFile,(char *));
|
||||
void STD_PROTO(Yap_DebugEndline,(void));
|
||||
int STD_PROTO(Yap_DebugGetc,(void));
|
||||
int Yap_DebugPutc(int,wchar_t);
|
||||
void Yap_DebugSetIFile(char *);
|
||||
void Yap_DebugEndline(void);
|
||||
int Yap_DebugGetc(void);
|
||||
#endif
|
||||
int STD_PROTO(Yap_IsOpType,(char *));
|
||||
void STD_PROTO(Yap_InitCPred,(char *, unsigned long int, CPredicate, UInt));
|
||||
void STD_PROTO(Yap_InitAsmPred,(char *, unsigned long int, int, CPredicate, UInt));
|
||||
void STD_PROTO(Yap_InitCmpPred,(char *, unsigned long int, CmpPredicate, UInt));
|
||||
void STD_PROTO(Yap_InitCPredBack,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,UInt));
|
||||
void STD_PROTO(Yap_InitCPredBackCut,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt));
|
||||
int Yap_IsOpType(char *);
|
||||
void Yap_InitCPred(char *, unsigned long int, CPredicate, UInt);
|
||||
void Yap_InitAsmPred(char *, unsigned long int, int, CPredicate, UInt);
|
||||
void Yap_InitCmpPred(char *, unsigned long int, CmpPredicate, UInt);
|
||||
void Yap_InitCPredBack(char *, unsigned long int, unsigned int, CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPredBackCut(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
#ifdef CUT_C
|
||||
void STD_PROTO(Yap_InitCPredBack_,(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt));
|
||||
void Yap_InitCPredBack_(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
#endif
|
||||
void STD_PROTO(Yap_InitWorkspace,(UInt,UInt,UInt,UInt,UInt,int,int,int));
|
||||
void Yap_InitWorkspace(UInt,UInt,UInt,UInt,UInt,int,int,int);
|
||||
|
||||
#ifdef YAPOR
|
||||
void STD_PROTO(Yap_init_yapor_workers, (void));
|
||||
void Yap_init_yapor_workers(void);
|
||||
#endif /* YAPOR */
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
void STD_PROTO(Yap_KillStacks,(int));
|
||||
void Yap_KillStacks(int);
|
||||
#else
|
||||
void STD_PROTO(Yap_KillStacks,(int));
|
||||
void Yap_KillStacks(int);
|
||||
#endif
|
||||
void STD_PROTO(Yap_InitYaamRegs,(int));
|
||||
void STD_PROTO(Yap_ReInitWallTime, (void));
|
||||
int STD_PROTO(Yap_OpDec,(int,char *,Atom,Term));
|
||||
void STD_PROTO(Yap_CloseScratchPad,(void));
|
||||
void Yap_InitYaamRegs(int);
|
||||
void Yap_ReInitWallTime(void);
|
||||
int Yap_OpDec(int,char *,Atom,Term);
|
||||
void Yap_CloseScratchPad(void);
|
||||
|
||||
/* inlines.c */
|
||||
void STD_PROTO(Yap_InitInlines,(void));
|
||||
int STD_PROTO(Yap_eq,(Term, Term));
|
||||
void Yap_InitInlines(void);
|
||||
int Yap_eq(Term, Term);
|
||||
|
||||
/* iopreds.c */
|
||||
void STD_PROTO(Yap_InitBackIO,(void));
|
||||
void STD_PROTO(Yap_InitIOPreds,(void));
|
||||
void Yap_InitBackIO(void);
|
||||
void Yap_InitIOPreds(void);
|
||||
void *Yap_GetStreamHandle(Atom at);
|
||||
void *Yap_GetInputStream(Atom at);
|
||||
void *Yap_GetOutputStream(Atom at);
|
||||
@ -275,159 +271,159 @@ void *Yap_GetOutputStream(Atom at);
|
||||
extern void Yap_DebugPlWrite (Term t);
|
||||
extern void Yap_DebugErrorPutc (int n);
|
||||
#endif
|
||||
int STD_PROTO(Yap_readTerm, (void *, Term *, Term *, Term *, Term *));
|
||||
void STD_PROTO(Yap_PlWriteToStream, (Term, int, int));
|
||||
int Yap_readTerm(void *, Term *, Term *, Term *, Term *);
|
||||
void Yap_PlWriteToStream(Term, int, int);
|
||||
/* depth_lim.c */
|
||||
void STD_PROTO(Yap_InitItDeepenPreds,(void));
|
||||
void Yap_InitItDeepenPreds(void);
|
||||
|
||||
/* load_foreign.c */
|
||||
void STD_PROTO(Yap_InitLoadForeign,(void));
|
||||
void Yap_InitLoadForeign(void);
|
||||
|
||||
/* mavar.c */
|
||||
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));
|
||||
void Yap_InitMaVarCPreds(void);
|
||||
Term Yap_NewTimedVar(Term);
|
||||
Term Yap_NewEmptyTimedVar(void);
|
||||
Term Yap_ReadTimedVar(Term);
|
||||
Term Yap_UpdateTimedVar(Term, Term);
|
||||
|
||||
/* modules.c */
|
||||
Term STD_PROTO(Yap_Module, (Term));
|
||||
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 *));
|
||||
Term STD_PROTO(Yap_StripModule, (Term, Term *));
|
||||
void STD_PROTO(Yap_InitModules, (void));
|
||||
void STD_PROTO(Yap_InitModulesC, (void));
|
||||
Term Yap_Module(Term);
|
||||
Term Yap_Module_Name(struct pred_entry *);
|
||||
struct pred_entry *Yap_ModulePred(Term);
|
||||
void Yap_NewModulePred(Term, struct pred_entry *);
|
||||
Term Yap_StripModule(Term, Term *);
|
||||
void Yap_InitModules(void);
|
||||
void Yap_InitModulesC(void);
|
||||
|
||||
#if HAVE_MPI
|
||||
/* mpi.c */
|
||||
void STD_PROTO(Yap_InitMPI,(void));
|
||||
void Yap_InitMPI(void);
|
||||
#endif
|
||||
|
||||
#if HAVE_MPE
|
||||
/* mpe.c */
|
||||
void STD_PROTO(Yap_InitMPE,(void));
|
||||
void Yap_InitMPE(void);
|
||||
#endif
|
||||
|
||||
|
||||
/* other.c */
|
||||
Term STD_PROTO(Yap_MkApplTerm,(Functor,unsigned int,Term *));
|
||||
Term STD_PROTO(Yap_MkNewApplTerm,(Functor,unsigned int));
|
||||
Term STD_PROTO(Yap_MkNewPairTerm,(void));
|
||||
Term STD_PROTO(Yap_Globalise,(Term));
|
||||
Term Yap_MkApplTerm(Functor,unsigned int,Term *);
|
||||
Term Yap_MkNewApplTerm(Functor,unsigned int);
|
||||
Term Yap_MkNewPairTerm(void);
|
||||
Term Yap_Globalise(Term);
|
||||
|
||||
|
||||
/* parser.c */
|
||||
Term STD_PROTO(Yap_Parse,(void));
|
||||
Term Yap_Parse(void);
|
||||
|
||||
/* readutil.c */
|
||||
void STD_PROTO(Yap_InitReadUtil,(void));
|
||||
void Yap_InitReadUtil(void);
|
||||
|
||||
/* qly.c */
|
||||
void STD_PROTO(Yap_InitQLY,(void));
|
||||
int STD_PROTO(Yap_Restore,(char *, char *));
|
||||
void STD_PROTO(Yap_InitQLYR,(void));
|
||||
void Yap_InitQLY(void);
|
||||
int Yap_Restore(char *, char *);
|
||||
void Yap_InitQLYR(void);
|
||||
|
||||
/* range.c */
|
||||
void Yap_InitRange(void);
|
||||
|
||||
/* save.c */
|
||||
int STD_PROTO(Yap_SavedInfo,(char *,char *,CELL *,CELL *,CELL *));
|
||||
int STD_PROTO(Yap_SavedStateRestore,(char *, char *));
|
||||
struct io_stream *STD_PROTO(Yap_OpenRestore,(char *, char *));
|
||||
void STD_PROTO(Yap_InitSavePreds,(void));
|
||||
int Yap_SavedInfo(char *,char *,CELL *,CELL *,CELL *);
|
||||
int Yap_SavedStateRestore(char *, char *);
|
||||
struct io_stream *Yap_OpenRestore(char *, char *);
|
||||
void Yap_InitSavePreds(void);
|
||||
|
||||
/* scanner.c */
|
||||
|
||||
/* signals.c */
|
||||
void STD_PROTO(Yap_signal,(yap_signals));
|
||||
void STD_PROTO(Yap_undo_signal,(yap_signals));
|
||||
void STD_PROTO(Yap_InitSignalCPreds,(void));
|
||||
void Yap_signal(yap_signals);
|
||||
void Yap_undo_signal(yap_signals);
|
||||
void Yap_InitSignalCPreds(void);
|
||||
|
||||
/* sort.c */
|
||||
void STD_PROTO(Yap_InitSortPreds,(void));
|
||||
void Yap_InitSortPreds(void);
|
||||
|
||||
/* stdpreds.c */
|
||||
void STD_PROTO(Yap_InitBackCPreds,(void));
|
||||
void STD_PROTO(Yap_InitCPreds,(void));
|
||||
void STD_PROTO(Yap_show_statistics,(void));
|
||||
int STD_PROTO(Yap_IsOpMaxPrio,(Atom));
|
||||
void Yap_InitBackCPreds(void);
|
||||
void Yap_InitCPreds(void);
|
||||
void Yap_show_statistics(void);
|
||||
int Yap_IsOpMaxPrio(Atom);
|
||||
|
||||
/* sysbits.c */
|
||||
void STD_PROTO(Yap_InitPageSize, (void));
|
||||
void STD_PROTO(Yap_set_fpu_exceptions,(int));
|
||||
UInt 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));
|
||||
int STD_PROTO(Yap_signal_index,(const char *));
|
||||
void Yap_InitPageSize(void);
|
||||
void Yap_set_fpu_exceptions(int);
|
||||
UInt Yap_cputime(void);
|
||||
Int Yap_walltime(void);
|
||||
int Yap_dir_separator(int);
|
||||
int Yap_volume_header(char *);
|
||||
void Yap_InitSysPath(void);
|
||||
int Yap_signal_index(const char *);
|
||||
#ifdef MAC
|
||||
void STD_PROTO(Yap_SetTextFile,(char *));
|
||||
void Yap_SetTextFile(char *);
|
||||
#endif
|
||||
int STD_PROTO(Yap_getcwd,(const char *, int));
|
||||
void STD_PROTO(Yap_cputime_interval,(Int *,Int *));
|
||||
void STD_PROTO(Yap_systime_interval,(Int *,Int *));
|
||||
void STD_PROTO(Yap_walltime_interval,(Int *,Int *));
|
||||
void STD_PROTO(Yap_InitSysbits,(void));
|
||||
void STD_PROTO(Yap_InitSysPreds,(void));
|
||||
void STD_PROTO(Yap_InitTime,(int));
|
||||
int STD_PROTO(Yap_TrueFileName, (char *, char *, int));
|
||||
double STD_PROTO(Yap_random, (void));
|
||||
int Yap_getcwd(const char *, int);
|
||||
void Yap_cputime_interval(Int *,Int *);
|
||||
void Yap_systime_interval(Int *,Int *);
|
||||
void Yap_walltime_interval(Int *,Int *);
|
||||
void Yap_InitSysbits(void);
|
||||
void Yap_InitSysPreds(void);
|
||||
void Yap_InitTime(int);
|
||||
int Yap_TrueFileName(char *, char *, int);
|
||||
double Yap_random(void);
|
||||
#ifdef _WIN32
|
||||
char *STD_PROTO(Yap_RegistryGetString,(char *));
|
||||
void STD_PROTO(Yap_WinError,(char *));
|
||||
char *Yap_RegistryGetString(char *);
|
||||
void Yap_WinError(char *);
|
||||
#endif
|
||||
|
||||
/* threads.c */
|
||||
void STD_PROTO(Yap_InitThreadPreds,(void));
|
||||
void Yap_InitThreadPreds(void);
|
||||
#if THREADS
|
||||
int STD_PROTO(Yap_InitThread,(int));
|
||||
int Yap_InitThread(int);
|
||||
#endif
|
||||
|
||||
/* tracer.c */
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
void STD_PROTO(Yap_InitLowLevelTrace,(void));
|
||||
void Yap_InitLowLevelTrace(void);
|
||||
#endif
|
||||
|
||||
/* udi.c */
|
||||
void STD_PROTO(Yap_udi_init,(void));
|
||||
void STD_PROTO(Yap_udi_abolish,(struct pred_entry *));
|
||||
void Yap_udi_init(void);
|
||||
void Yap_udi_abolish(struct pred_entry *);
|
||||
|
||||
/* unify.c */
|
||||
int STD_PROTO(Yap_rational_tree_loop, (CELL *, CELL *, CELL **, CELL **));
|
||||
void STD_PROTO(Yap_InitAbsmi,(void));
|
||||
void STD_PROTO(Yap_InitUnify,(void));
|
||||
void STD_PROTO(Yap_TrimTrail,(void));
|
||||
int STD_PROTO(Yap_Unifiable,(Term d0, Term d1));
|
||||
int STD_PROTO(Yap_IUnify,(register CELL d0,register CELL d1));
|
||||
int Yap_rational_tree_loop(CELL *, CELL *, CELL **, CELL **);
|
||||
void Yap_InitAbsmi(void);
|
||||
void Yap_InitUnify(void);
|
||||
void Yap_TrimTrail(void);
|
||||
int Yap_Unifiable(Term d0, Term d1);
|
||||
int Yap_IUnify(register CELL d0,register CELL d1);
|
||||
|
||||
/* userpreds.c */
|
||||
void STD_PROTO(Yap_InitUserCPreds,(void));
|
||||
void STD_PROTO(Yap_InitUserBacks,(void));
|
||||
void Yap_InitUserCPreds(void);
|
||||
void Yap_InitUserBacks(void);
|
||||
|
||||
/* utilpreds.c */
|
||||
Term STD_PROTO(Yap_CopyTerm,(Term));
|
||||
int STD_PROTO(Yap_Variant,(Term, Term));
|
||||
size_t STD_PROTO(Yap_ExportTerm,(Term, char *, size_t, UInt));
|
||||
size_t STD_PROTO(Yap_SizeOfExportedTerm,(char *));
|
||||
Term STD_PROTO(Yap_ImportTerm,(char *));
|
||||
int STD_PROTO(Yap_IsListTerm,(Term));
|
||||
int STD_PROTO(Yap_IsListOrPartialListTerm,(Term));
|
||||
Term STD_PROTO(Yap_CopyTermNoShare,(Term));
|
||||
int STD_PROTO(Yap_SizeGroundTerm,(Term, int));
|
||||
int STD_PROTO(Yap_IsGroundTerm,(Term));
|
||||
int STD_PROTO(Yap_IsAcyclicTerm,(Term));
|
||||
void STD_PROTO(Yap_InitUtilCPreds,(void));
|
||||
Int STD_PROTO(Yap_TermHash,(Term, Int, Int, int));
|
||||
Int STD_PROTO(Yap_NumberVars,(Term, Int, int));
|
||||
Term STD_PROTO(Yap_UnNumberTerm,(Term, int));
|
||||
Int STD_PROTO(Yap_SkipList,(Term *, Term **));
|
||||
Term Yap_CopyTerm(Term);
|
||||
int Yap_Variant(Term, Term);
|
||||
size_t Yap_ExportTerm(Term, char *, size_t, UInt);
|
||||
size_t Yap_SizeOfExportedTerm(char *);
|
||||
Term Yap_ImportTerm(char *);
|
||||
int Yap_IsListTerm(Term);
|
||||
int Yap_IsListOrPartialListTerm(Term);
|
||||
Term Yap_CopyTermNoShare(Term);
|
||||
int Yap_SizeGroundTerm(Term, int);
|
||||
int Yap_IsGroundTerm(Term);
|
||||
int Yap_IsAcyclicTerm(Term);
|
||||
void Yap_InitUtilCPreds(void);
|
||||
Int Yap_TermHash(Term, Int, Int, int);
|
||||
Int Yap_NumberVars(Term, Int, int);
|
||||
Term Yap_UnNumberTerm(Term, int);
|
||||
Int Yap_SkipList(Term *, Term **);
|
||||
/* yap.c */
|
||||
|
||||
|
||||
/* write.c */
|
||||
void STD_PROTO(Yap_plwrite,(Term, void *, int, int, int));
|
||||
void Yap_plwrite(Term, void *, int, int, int);
|
||||
|
||||
|
||||
/* MYDDAS */
|
||||
@ -435,44 +431,44 @@ void STD_PROTO(Yap_plwrite,(Term, void *, int, int, int));
|
||||
#if defined MYDDAS_MYSQL || defined MYDDAS_ODBC
|
||||
|
||||
/* myddas_initialization.c */
|
||||
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));
|
||||
MYDDAS_GLOBAL myddas_init_initialize_myddas(void);
|
||||
MYDDAS_UTIL_CONNECTION myddas_init_initialize_connection(void *,void *,MYDDAS_UTIL_CONNECTION);
|
||||
MYDDAS_UTIL_PREDICATE 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));
|
||||
MYDDAS_GLOBAL myddas_stats_initialize_global_stats(MYDDAS_GLOBAL);
|
||||
MYDDAS_STATS_STRUCT myddas_stats_initialize_connection_stats(void);
|
||||
void myddas_stats_delete_stats_list(MYDDAS_STATS_STRUCT);
|
||||
#endif /* MYDDAS_STATS */
|
||||
|
||||
#ifdef MYDDAS_MYSQL
|
||||
/* myddas_util.c */
|
||||
void STD_PROTO(myddas_util_table_write,(MYSQL_RES *));
|
||||
void myddas_util_table_write(MYSQL_RES *);
|
||||
#endif
|
||||
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));
|
||||
Short myddas_util_connection_type(void *);
|
||||
MYDDAS_UTIL_CONNECTION myddas_util_add_connection(void *,void *);
|
||||
MYDDAS_UTIL_CONNECTION myddas_util_search_connection(void *);
|
||||
void myddas_util_delete_connection(void *);
|
||||
MYDDAS_UTIL_CONNECTION myddas_util_add_predicate(char * ,Int , char *,void *);
|
||||
MYDDAS_UTIL_PREDICATE myddas_util_search_predicate(char * ,Int , char *);
|
||||
void 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));
|
||||
UInt myddas_util_get_total_multi_queries_number(MYDDAS_UTIL_CONNECTION);
|
||||
void 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));
|
||||
SQLHENV 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 *));
|
||||
MyddasInt STD_PROTO(myddas_util_get_pred_arity,(void *));
|
||||
void * myddas_util_get_list_pred(MYDDAS_UTIL_CONNECTION);
|
||||
void * myddas_util_get_pred_next(void *);
|
||||
char * myddas_util_get_pred_module(void *);
|
||||
char * myddas_util_get_pred_name(void *);
|
||||
MyddasInt myddas_util_get_pred_arity(void *);
|
||||
//DELETE THIS WHEN DB_STATS IS COMPLETED
|
||||
MyddasInt STD_PROTO(get_myddas_top,(void));
|
||||
MyddasInt get_myddas_top(void);
|
||||
|
||||
#ifdef DEBUG
|
||||
void check_int(void);
|
||||
@ -482,36 +478,36 @@ void check_int(void);
|
||||
|
||||
/* myddas_mysql.c */
|
||||
#if defined MYDDAS_MYSQL
|
||||
void STD_PROTO(Yap_InitMYDDAS_MySQLPreds,(void));
|
||||
void STD_PROTO(Yap_InitBackMYDDAS_MySQLPreds,(void));
|
||||
void Yap_InitMYDDAS_MySQLPreds(void);
|
||||
void Yap_InitBackMYDDAS_MySQLPreds(void);
|
||||
#endif
|
||||
|
||||
/* myddas_odbc.c */
|
||||
#if defined MYDDAS_ODBC
|
||||
void STD_PROTO(Yap_InitMYDDAS_ODBCPreds,(void));
|
||||
void STD_PROTO(Yap_InitBackMYDDAS_ODBCPreds,(void));
|
||||
void Yap_InitMYDDAS_ODBCPreds(void);
|
||||
void Yap_InitBackMYDDAS_ODBCPreds(void);
|
||||
#endif
|
||||
|
||||
/* myddas_shared.c */
|
||||
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
|
||||
void STD_PROTO(Yap_MYDDAS_delete_all_myddas_structs,(void));
|
||||
void STD_PROTO(Yap_InitMYDDAS_SharedPreds,(void));
|
||||
void STD_PROTO(Yap_InitBackMYDDAS_SharedPreds,(void));
|
||||
void Yap_MYDDAS_delete_all_myddas_structs(void);
|
||||
void Yap_InitMYDDAS_SharedPreds(void);
|
||||
void Yap_InitBackMYDDAS_SharedPreds(void);
|
||||
#endif
|
||||
|
||||
/* myddas_top_level.c */
|
||||
#if defined MYDDAS_TOP_LEVEL && defined MYDDAS_MYSQL //&& defined HAVE_LIBREADLINE
|
||||
void STD_PROTO(Yap_InitMYDDAS_TopLevelPreds,(void));
|
||||
void Yap_InitMYDDAS_TopLevelPreds(void);
|
||||
#endif
|
||||
|
||||
/* yap2swi.c */
|
||||
void STD_PROTO(Yap_swi_install,(void));
|
||||
void STD_PROTO(Yap_InitSWIHash,(void));
|
||||
int STD_PROTO(Yap_get_stream_handle,(Term, int, int, void *));
|
||||
Term STD_PROTO(Yap_get_stream_position,(void *));
|
||||
void Yap_swi_install(void);
|
||||
void Yap_InitSWIHash(void);
|
||||
int Yap_get_stream_handle(Term, int, int, void *);
|
||||
Term Yap_get_stream_position(void *);
|
||||
|
||||
/* opt.preds.c */
|
||||
void STD_PROTO(Yap_init_optyap_preds,(void));
|
||||
void Yap_init_optyap_preds(void);
|
||||
|
||||
/* pl-file.c */
|
||||
struct PL_local_data *Yap_InitThreadIO(int wid);
|
||||
|
52
H/Yatom.h
52
H/Yatom.h
@ -37,7 +37,7 @@ INLINE_ONLY inline EXTERN AtomEntry *RepAtom (Atom a);
|
||||
INLINE_ONLY inline EXTERN AtomEntry *
|
||||
RepAtom (Atom a)
|
||||
{
|
||||
return (AtomEntry *) (AtomBase + Unsigned (a));
|
||||
return (AtomEntry *) (AtomBase + Unsigned (a);
|
||||
}
|
||||
|
||||
|
||||
@ -487,12 +487,12 @@ typedef enum
|
||||
} op_type;
|
||||
|
||||
|
||||
OpEntry *STD_PROTO(Yap_GetOpProp,(Atom, op_type CACHE_TYPE));
|
||||
OpEntry *Yap_GetOpProp(Atom, op_type CACHE_TYPE);
|
||||
|
||||
int STD_PROTO(Yap_IsPrefixOp,(Atom,int *,int *));
|
||||
int STD_PROTO(Yap_IsOp,(Atom));
|
||||
int STD_PROTO(Yap_IsInfixOp,(Atom,int *,int *,int *));
|
||||
int STD_PROTO(Yap_IsPosfixOp,(Atom,int *,int *));
|
||||
int Yap_IsPrefixOp(Atom,int *,int *);
|
||||
int Yap_IsOp(Atom);
|
||||
int Yap_IsInfixOp(Atom,int *,int *,int *);
|
||||
int Yap_IsPosfixOp(Atom,int *,int *);
|
||||
|
||||
/* defines related to operator specifications */
|
||||
#define MaskPrio 0x0fff
|
||||
@ -1440,23 +1440,23 @@ IsBlob (Atom at)
|
||||
/* Proto types */
|
||||
|
||||
/* cdmgr.c */
|
||||
int STD_PROTO (Yap_RemoveIndexation, (PredEntry *));
|
||||
void STD_PROTO (Yap_UpdateTimestamps, (PredEntry *));
|
||||
int Yap_RemoveIndexation(PredEntry *);
|
||||
void Yap_UpdateTimestamps(PredEntry *);
|
||||
|
||||
/* dbase.c */
|
||||
void STD_PROTO (Yap_ErDBE, (DBRef));
|
||||
DBTerm *STD_PROTO (Yap_StoreTermInDB, (Term, int));
|
||||
DBTerm *STD_PROTO (Yap_StoreTermInDBPlusExtraSpace, (Term, UInt, UInt *));
|
||||
Term STD_PROTO (Yap_FetchTermFromDB, (DBTerm *));
|
||||
Term STD_PROTO (Yap_PopTermFromDB, (DBTerm *));
|
||||
void STD_PROTO (Yap_ReleaseTermFromDB, (DBTerm *));
|
||||
void Yap_ErDBE(DBRef);
|
||||
DBTerm *Yap_StoreTermInDB(Term, int);
|
||||
DBTerm *Yap_StoreTermInDBPlusExtraSpace(Term, UInt, UInt *);
|
||||
Term Yap_FetchTermFromDB(DBTerm *);
|
||||
Term Yap_PopTermFromDB(DBTerm *);
|
||||
void Yap_ReleaseTermFromDB(DBTerm *);
|
||||
|
||||
/* init.c */
|
||||
Atom STD_PROTO (Yap_GetOp, (OpEntry *, int *, int));
|
||||
Atom Yap_GetOp(OpEntry *, int *, int);
|
||||
|
||||
/* vsc: redefined to GetAProp to avoid conflicts with Windows header files */
|
||||
Prop STD_PROTO (Yap_GetAProp, (Atom, PropFlags));
|
||||
Prop STD_PROTO (Yap_GetAPropHavingLock, (AtomEntry *, PropFlags));
|
||||
Prop Yap_GetAProp(Atom, PropFlags);
|
||||
Prop Yap_GetAPropHavingLock(AtomEntry *, PropFlags);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -1473,7 +1473,7 @@ typedef enum
|
||||
#define PredHashInitialSize ((UInt)1039)
|
||||
#define PredHashIncrement ((UInt)7919)
|
||||
|
||||
INLINE_ONLY EXTERN inline UInt STD_PROTO(PRED_HASH, (FunctorEntry *, Term, UInt));
|
||||
INLINE_ONLY EXTERN inline UInt PRED_HASH(FunctorEntry *, Term, UInt);
|
||||
|
||||
INLINE_ONLY EXTERN inline UInt
|
||||
PRED_HASH(FunctorEntry *fe, Term cur_mod, UInt size)
|
||||
@ -1481,16 +1481,16 @@ PRED_HASH(FunctorEntry *fe, Term cur_mod, UInt size)
|
||||
return (((CELL)fe+cur_mod)>>2) % size;
|
||||
}
|
||||
|
||||
INLINE_ONLY EXTERN inline Prop STD_PROTO(GetPredPropByFuncAndModHavingLock, (FunctorEntry *, Term));
|
||||
INLINE_ONLY EXTERN inline Prop STD_PROTO(PredPropByFuncAndMod, (FunctorEntry *, Term));
|
||||
INLINE_ONLY EXTERN inline Prop STD_PROTO(PredPropByAtomAndMod, (Atom, Term));
|
||||
INLINE_ONLY EXTERN inline Prop STD_PROTO(GetPredPropByFuncHavingLock, (FunctorEntry *, Term));
|
||||
INLINE_ONLY EXTERN inline Prop GetPredPropByFuncAndModHavingLock(FunctorEntry *, Term);
|
||||
INLINE_ONLY EXTERN inline Prop PredPropByFuncAndMod(FunctorEntry *, Term);
|
||||
INLINE_ONLY EXTERN inline Prop PredPropByAtomAndMod(Atom, Term);
|
||||
INLINE_ONLY EXTERN inline Prop GetPredPropByFuncHavingLock(FunctorEntry *, Term);
|
||||
|
||||
#ifdef THREADS
|
||||
|
||||
Prop STD_PROTO(Yap_NewThreadPred, (struct pred_entry * CACHE_TYPE));
|
||||
Prop STD_PROTO(Yap_NewPredPropByFunctor, (Functor, Term));
|
||||
INLINE_ONLY EXTERN inline struct pred_entry *STD_PROTO(Yap_GetThreadPred, (struct pred_entry * CACHE_TYPE));
|
||||
Prop Yap_NewThreadPred(struct pred_entry * CACHE_TYPE);
|
||||
Prop Yap_NewPredPropByFunctor(Functor, Term);
|
||||
INLINE_ONLY EXTERN inline struct pred_entry *Yap_GetThreadPred(struct pred_entry * CACHE_TYPE);
|
||||
|
||||
INLINE_ONLY EXTERN inline struct pred_entry *
|
||||
Yap_GetThreadPred(struct pred_entry *ap USES_REGS)
|
||||
@ -1698,7 +1698,7 @@ PredPropByAtomAndMod (Atom at, Term cur_mod)
|
||||
#define UNLOCKPE(I,Z) UNLOCK((Z)->PELock)
|
||||
#endif
|
||||
|
||||
INLINE_ONLY EXTERN inline void STD_PROTO(AddPropToAtom, (AtomEntry *, PropEntry *p));
|
||||
INLINE_ONLY EXTERN inline void AddPropToAtom(AtomEntry *, PropEntry *p);
|
||||
|
||||
INLINE_ONLY EXTERN inline void
|
||||
AddPropToAtom(AtomEntry *ae, PropEntry *p)
|
||||
|
@ -96,9 +96,9 @@ typedef struct FREEB {
|
||||
/* Operating system and architecture dependent page size */
|
||||
extern int Yap_page_size;
|
||||
|
||||
void STD_PROTO(Yap_InitHeap, (void *));
|
||||
UInt STD_PROTO(Yap_ExtendWorkSpaceThroughHole, (UInt));
|
||||
void STD_PROTO(Yap_AllocHole, (UInt, UInt));
|
||||
void Yap_InitHeap(void *);
|
||||
UInt Yap_ExtendWorkSpaceThroughHole(UInt);
|
||||
void Yap_AllocHole(UInt, UInt);
|
||||
|
||||
#if USE_MMAP && ! defined(__CYGWIN__)
|
||||
|
||||
|
@ -285,7 +285,7 @@ Unification Routines
|
||||
|
||||
*************************************************************/
|
||||
|
||||
INLINE_ONLY inline EXTERN void STD_PROTO(reset_trail,(tr_fr_ptr));
|
||||
INLINE_ONLY inline EXTERN void reset_trail(tr_fr_ptr TR0);
|
||||
|
||||
INLINE_ONLY inline EXTERN void
|
||||
reset_trail(tr_fr_ptr TR0) {
|
||||
@ -371,7 +371,7 @@ Int Yap_unify(Term t0, Term t1)
|
||||
}
|
||||
}
|
||||
|
||||
EXTERN Int STD_PROTO(Yap_unify_constant,(Term,Term));
|
||||
EXTERN Int Yap_unify_constant(Term a, Term cons);
|
||||
|
||||
EXTERN inline Int
|
||||
Yap_unify_constant(register Term a, register Term cons)
|
||||
|
66
H/clause.h
66
H/clause.h
@ -256,36 +256,36 @@ typedef struct dbterm_list {
|
||||
#endif
|
||||
|
||||
/* amasm.c */
|
||||
wamreg STD_PROTO(Yap_emit_x,(CELL));
|
||||
COUNT STD_PROTO(Yap_compile_cmp_flags,(PredEntry *));
|
||||
void STD_PROTO(Yap_InitComma,(void));
|
||||
wamreg Yap_emit_x(CELL);
|
||||
COUNT Yap_compile_cmp_flags(PredEntry *);
|
||||
void Yap_InitComma(void);
|
||||
|
||||
/* cdmgr.c */
|
||||
void STD_PROTO(Yap_IPred,(PredEntry *, UInt, yamop *));
|
||||
int STD_PROTO(Yap_addclause,(Term,yamop *,int,Term,Term*));
|
||||
void STD_PROTO(Yap_add_logupd_clause,(PredEntry *,LogUpdClause *,int));
|
||||
void STD_PROTO(Yap_kill_iblock,(ClauseUnion *,ClauseUnion *,PredEntry *));
|
||||
void STD_PROTO(Yap_EraseStaticClause,(StaticClause *, Term));
|
||||
ClauseUnion *STD_PROTO(Yap_find_owner_index,(yamop *, PredEntry *));
|
||||
void Yap_IPred(PredEntry *, UInt, yamop *);
|
||||
int Yap_addclause(Term,yamop *,int,Term,Term*);
|
||||
void Yap_add_logupd_clause(PredEntry *,LogUpdClause *,int);
|
||||
void Yap_kill_iblock(ClauseUnion *,ClauseUnion *,PredEntry *);
|
||||
void Yap_EraseStaticClause(StaticClause *, Term);
|
||||
ClauseUnion *Yap_find_owner_index(yamop *, PredEntry *);
|
||||
|
||||
/* dbase.c */
|
||||
void STD_PROTO(Yap_ErCl,(DynamicClause *));
|
||||
void STD_PROTO(Yap_ErLogUpdCl,(LogUpdClause *));
|
||||
void STD_PROTO(Yap_ErLogUpdIndex,(LogUpdIndex *));
|
||||
Int STD_PROTO(Yap_Recordz,(Atom, Term));
|
||||
void Yap_ErCl(DynamicClause *);
|
||||
void Yap_ErLogUpdCl(LogUpdClause *);
|
||||
void Yap_ErLogUpdIndex(LogUpdIndex *);
|
||||
Int Yap_Recordz(Atom, Term);
|
||||
|
||||
/* exec.c */
|
||||
Term STD_PROTO(Yap_cp_as_integer,(choiceptr));
|
||||
Term Yap_cp_as_integer(choiceptr);
|
||||
|
||||
/* index.c */
|
||||
yamop *STD_PROTO(Yap_PredIsIndexable,(PredEntry *, UInt, yamop *));
|
||||
yamop *STD_PROTO(Yap_ExpandIndex,(PredEntry *, UInt));
|
||||
void STD_PROTO(Yap_CleanUpIndex,(struct logic_upd_index *));
|
||||
void STD_PROTO(Yap_CleanKids,(struct logic_upd_index *));
|
||||
void STD_PROTO(Yap_AddClauseToIndex,(PredEntry *,yamop *,int));
|
||||
void STD_PROTO(Yap_RemoveClauseFromIndex,(PredEntry *,yamop *));
|
||||
LogUpdClause *STD_PROTO(Yap_NthClause,(PredEntry *,Int));
|
||||
LogUpdClause *STD_PROTO(Yap_FollowIndexingCode,(PredEntry *,yamop *, Term *, yamop *,yamop *));
|
||||
yamop *Yap_PredIsIndexable(PredEntry *, UInt, yamop *);
|
||||
yamop *Yap_ExpandIndex(PredEntry *, UInt);
|
||||
void Yap_CleanUpIndex(struct logic_upd_index *);
|
||||
void Yap_CleanKids(struct logic_upd_index *);
|
||||
void Yap_AddClauseToIndex(PredEntry *,yamop *,int);
|
||||
void Yap_RemoveClauseFromIndex(PredEntry *,yamop *);
|
||||
LogUpdClause *Yap_NthClause(PredEntry *,Int);
|
||||
LogUpdClause *Yap_FollowIndexingCode(PredEntry *,yamop *, Term *, yamop *,yamop *);
|
||||
|
||||
/* exo.c */
|
||||
yamop *Yap_ExoLookup(PredEntry *ap USES_REGS);
|
||||
@ -392,24 +392,24 @@ typedef enum {
|
||||
FIND_PRED_FROM_ENV
|
||||
} find_pred_type;
|
||||
|
||||
Int STD_PROTO(Yap_PredForCode,(yamop *, find_pred_type, Atom *, UInt *, Term *));
|
||||
PredEntry *STD_PROTO(Yap_PredEntryForCode,(yamop *, find_pred_type, CODEADDR *, CODEADDR *));
|
||||
LogUpdClause *STD_PROTO(Yap_new_ludbe,(Term, PredEntry *, UInt));
|
||||
Term STD_PROTO(Yap_LUInstance,(LogUpdClause *, UInt));
|
||||
Int Yap_PredForCode(yamop *, find_pred_type, Atom *, UInt *, Term *);
|
||||
PredEntry *Yap_PredEntryForCode(yamop *, find_pred_type, CODEADDR *, CODEADDR *);
|
||||
LogUpdClause *Yap_new_ludbe(Term, PredEntry *, UInt);
|
||||
Term Yap_LUInstance(LogUpdClause *, UInt);
|
||||
|
||||
/* udi.c */
|
||||
void STD_PROTO(Yap_udi_init,(void));
|
||||
int STD_PROTO(Yap_new_udi_clause,(PredEntry *, yamop *, Term));
|
||||
yamop *STD_PROTO(Yap_udi_search,(PredEntry *));
|
||||
void STD_PROTO(Yap_udi_abolish,(PredEntry *p));
|
||||
void Yap_udi_init(void);
|
||||
int Yap_new_udi_clause(PredEntry *, yamop *, Term);
|
||||
yamop *Yap_udi_search(PredEntry *);
|
||||
void Yap_udi_abolish(PredEntry *p);
|
||||
|
||||
#ifdef DEBUG
|
||||
void STD_PROTO(Yap_bug_location,(yamop *));
|
||||
void Yap_bug_location(yamop *);
|
||||
#endif
|
||||
|
||||
#if LOW_PROF
|
||||
void STD_PROTO(Yap_InformOfRemoval,(void *));
|
||||
void STD_PROTO(Yap_dump_code_area_for_profiler,(void));
|
||||
void Yap_InformOfRemoval(void *);
|
||||
void Yap_dump_code_area_for_profiler(void);
|
||||
#else
|
||||
#define Yap_InformOfRemoval(X)
|
||||
#endif
|
||||
|
20
H/compile.h
20
H/compile.h
@ -325,17 +325,17 @@ typedef enum special_label_op_enum {
|
||||
#define Two 2
|
||||
|
||||
|
||||
yamop *STD_PROTO(Yap_assemble,(int,Term,struct pred_entry *,int, struct intermediates *, UInt));
|
||||
void STD_PROTO(Yap_emit,(compiler_vm_op,Int,CELL, struct intermediates *));
|
||||
void STD_PROTO(Yap_emit_3ops,(compiler_vm_op,CELL,CELL,CELL, struct intermediates *));
|
||||
void STD_PROTO(Yap_emit_4ops,(compiler_vm_op,CELL,CELL,CELL,CELL, struct intermediates *));
|
||||
CELL *STD_PROTO(Yap_emit_extra_size,(compiler_vm_op,CELL,int, struct intermediates *));
|
||||
char *STD_PROTO(Yap_AllocCMem,(UInt, struct intermediates *));
|
||||
void STD_PROTO(Yap_ReleaseCMem, (struct intermediates *));
|
||||
int STD_PROTO(Yap_is_a_test_pred,(Term, Term));
|
||||
void STD_PROTO(Yap_bip_name,(Int, char *));
|
||||
yamop *Yap_assemble(int,Term,struct pred_entry *,int, struct intermediates *, UInt);
|
||||
void Yap_emit(compiler_vm_op,Int,CELL, struct intermediates *);
|
||||
void Yap_emit_3ops(compiler_vm_op,CELL,CELL,CELL, struct intermediates *);
|
||||
void Yap_emit_4ops(compiler_vm_op,CELL,CELL,CELL,CELL, struct intermediates *);
|
||||
CELL *Yap_emit_extra_size(compiler_vm_op,CELL,int, struct intermediates *);
|
||||
char *Yap_AllocCMem(UInt, struct intermediates *);
|
||||
void Yap_ReleaseCMem(struct intermediates *);
|
||||
int Yap_is_a_test_pred(Term, Term);
|
||||
void Yap_bip_name(Int, char *);
|
||||
#ifdef DEBUG
|
||||
void STD_PROTO(Yap_ShowCode,(struct intermediates *));
|
||||
void Yap_ShowCode(struct intermediates *);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
/* YAP only stuff */
|
||||
|
||||
void STD_PROTO(Yap_initdlmalloc,(void));
|
||||
void STD_PROTO(Yap_RestoreDLMalloc,(void));
|
||||
void Yap_initdlmalloc(void);
|
||||
void Yap_RestoreDLMalloc(void);
|
||||
|
||||
|
||||
/* Synopsis of compile-time options:
|
||||
|
178
H/eval.h
178
H/eval.h
@ -128,7 +128,7 @@ typedef enum {
|
||||
op_rdiv
|
||||
} arith2_op;
|
||||
|
||||
Functor STD_PROTO(EvalArg,(Term));
|
||||
Functor EvalArg(Term);
|
||||
|
||||
/* Needed to handle numbers:
|
||||
these two macros are fundamental in the integer/float conversions */
|
||||
@ -161,20 +161,20 @@ Functor STD_PROTO(EvalArg,(Term));
|
||||
#define FL(X) ((double)(X))
|
||||
#endif
|
||||
|
||||
void STD_PROTO(Yap_InitConstExps,(void));
|
||||
void STD_PROTO(Yap_InitUnaryExps,(void));
|
||||
void STD_PROTO(Yap_InitBinaryExps,(void));
|
||||
void Yap_InitConstExps(void);
|
||||
void Yap_InitUnaryExps(void);
|
||||
void Yap_InitBinaryExps(void);
|
||||
|
||||
int STD_PROTO(Yap_ReInitConstExps,(void));
|
||||
int STD_PROTO(Yap_ReInitUnaryExps,(void));
|
||||
int STD_PROTO(Yap_ReInitBinaryExps,(void));
|
||||
int Yap_ReInitConstExps(void);
|
||||
int Yap_ReInitUnaryExps(void);
|
||||
int Yap_ReInitBinaryExps(void);
|
||||
|
||||
Term STD_PROTO(Yap_eval_atom,(Int));
|
||||
Term STD_PROTO(Yap_eval_unary,(Int,Term));
|
||||
Term STD_PROTO(Yap_eval_binary,(Int,Term,Term));
|
||||
Term Yap_eval_atom(Int);
|
||||
Term Yap_eval_unary(Int,Term);
|
||||
Term Yap_eval_binary(Int,Term,Term);
|
||||
|
||||
Term STD_PROTO(Yap_InnerEval,(Term));
|
||||
Int STD_PROTO(Yap_ArithError,(yap_error_number,Term,char *msg, ...));
|
||||
Term Yap_InnerEval(Term);
|
||||
Int Yap_ArithError(yap_error_number,Term,char *msg, ...);
|
||||
|
||||
#include "inline-only.h"
|
||||
INLINE_ONLY inline EXTERN Term
|
||||
@ -225,95 +225,95 @@ ETypeOfTerm(Term t)
|
||||
}
|
||||
|
||||
#if USE_GMP
|
||||
Term STD_PROTO(Yap_gmq_rdiv_int_int,(Int, Int));
|
||||
Term STD_PROTO(Yap_gmq_rdiv_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmq_rdiv_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmq_rdiv_big_big,(Term, Term));
|
||||
Term Yap_gmq_rdiv_int_int(Int, Int);
|
||||
Term Yap_gmq_rdiv_int_big(Int, Term);
|
||||
Term Yap_gmq_rdiv_big_int(Term, Int);
|
||||
Term Yap_gmq_rdiv_big_big(Term, Term);
|
||||
|
||||
Term STD_PROTO(Yap_gmp_add_ints,(Int, Int));
|
||||
Term STD_PROTO(Yap_gmp_sub_ints,(Int, Int));
|
||||
Term STD_PROTO(Yap_gmp_mul_ints,(Int, Int));
|
||||
Term STD_PROTO(Yap_gmp_sll_ints,(Int, Int));
|
||||
Term STD_PROTO(Yap_gmp_add_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_sub_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_sub_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_mul_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_div_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_div_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_div2_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_fdiv_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_fdiv_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_and_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_ior_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_xor_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_sll_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_add_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_sub_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_mul_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_div_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_div2_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_fdiv_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_and_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_ior_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_xor_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_mod_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_mod_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_mod_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_rem_big_big,(Term, Term));
|
||||
Term STD_PROTO(Yap_gmp_rem_big_int,(Term, Int));
|
||||
Term STD_PROTO(Yap_gmp_rem_int_big,(Int, Term));
|
||||
Term STD_PROTO(Yap_gmp_exp_int_int,(Int,Int));
|
||||
Term STD_PROTO(Yap_gmp_exp_int_big,(Int,Term));
|
||||
Term STD_PROTO(Yap_gmp_exp_big_int,(Term,Int));
|
||||
Term STD_PROTO(Yap_gmp_exp_big_big,(Term,Term));
|
||||
Term STD_PROTO(Yap_gmp_gcd_int_big,(Int,Term));
|
||||
Term STD_PROTO(Yap_gmp_gcd_big_big,(Term,Term));
|
||||
Term Yap_gmp_add_ints(Int, Int);
|
||||
Term Yap_gmp_sub_ints(Int, Int);
|
||||
Term Yap_gmp_mul_ints(Int, Int);
|
||||
Term Yap_gmp_sll_ints(Int, Int);
|
||||
Term Yap_gmp_add_int_big(Int, Term);
|
||||
Term Yap_gmp_sub_int_big(Int, Term);
|
||||
Term Yap_gmp_sub_big_int(Term, Int);
|
||||
Term Yap_gmp_mul_int_big(Int, Term);
|
||||
Term Yap_gmp_div_int_big(Int, Term);
|
||||
Term Yap_gmp_div_big_int(Term, Int);
|
||||
Term Yap_gmp_div2_big_int(Term, Int);
|
||||
Term Yap_gmp_fdiv_int_big(Int, Term);
|
||||
Term Yap_gmp_fdiv_big_int(Term, Int);
|
||||
Term Yap_gmp_and_int_big(Int, Term);
|
||||
Term Yap_gmp_ior_int_big(Int, Term);
|
||||
Term Yap_gmp_xor_int_big(Int, Term);
|
||||
Term Yap_gmp_sll_big_int(Term, Int);
|
||||
Term Yap_gmp_add_big_big(Term, Term);
|
||||
Term Yap_gmp_sub_big_big(Term, Term);
|
||||
Term Yap_gmp_mul_big_big(Term, Term);
|
||||
Term Yap_gmp_div_big_big(Term, Term);
|
||||
Term Yap_gmp_div2_big_big(Term, Term);
|
||||
Term Yap_gmp_fdiv_big_big(Term, Term);
|
||||
Term Yap_gmp_and_big_big(Term, Term);
|
||||
Term Yap_gmp_ior_big_big(Term, Term);
|
||||
Term Yap_gmp_xor_big_big(Term, Term);
|
||||
Term Yap_gmp_mod_big_big(Term, Term);
|
||||
Term Yap_gmp_mod_big_int(Term, Int);
|
||||
Term Yap_gmp_mod_int_big(Int, Term);
|
||||
Term Yap_gmp_rem_big_big(Term, Term);
|
||||
Term Yap_gmp_rem_big_int(Term, Int);
|
||||
Term Yap_gmp_rem_int_big(Int, Term);
|
||||
Term Yap_gmp_exp_int_int(Int,Int);
|
||||
Term Yap_gmp_exp_int_big(Int,Term);
|
||||
Term Yap_gmp_exp_big_int(Term,Int);
|
||||
Term Yap_gmp_exp_big_big(Term,Term);
|
||||
Term Yap_gmp_gcd_int_big(Int,Term);
|
||||
Term Yap_gmp_gcd_big_big(Term,Term);
|
||||
|
||||
Term STD_PROTO(Yap_gmp_big_from_64bits,(YAP_LONG_LONG));
|
||||
Term Yap_gmp_big_from_64bits(YAP_LONG_LONG);
|
||||
|
||||
Term STD_PROTO(Yap_gmp_float_to_big,(Float));
|
||||
Term STD_PROTO(Yap_gmp_float_to_rational,(Float));
|
||||
Term STD_PROTO(Yap_gmp_float_rationalize,(Float));
|
||||
Float STD_PROTO(Yap_gmp_to_float,(Term));
|
||||
Term STD_PROTO(Yap_gmp_add_float_big,(Float, Term));
|
||||
Term STD_PROTO(Yap_gmp_sub_float_big,(Float, Term));
|
||||
Term STD_PROTO(Yap_gmp_sub_big_float,(Term, Float));
|
||||
Term STD_PROTO(Yap_gmp_mul_float_big,(Float, Term));
|
||||
Term STD_PROTO(Yap_gmp_fdiv_float_big,(Float, Term));
|
||||
Term STD_PROTO(Yap_gmp_fdiv_big_float,(Term, Float));
|
||||
Term Yap_gmp_float_to_big(Float);
|
||||
Term Yap_gmp_float_to_rational(Float);
|
||||
Term Yap_gmp_float_rationalize(Float);
|
||||
Float Yap_gmp_to_float(Term);
|
||||
Term Yap_gmp_add_float_big(Float, Term);
|
||||
Term Yap_gmp_sub_float_big(Float, Term);
|
||||
Term Yap_gmp_sub_big_float(Term, Float);
|
||||
Term Yap_gmp_mul_float_big(Float, Term);
|
||||
Term Yap_gmp_fdiv_float_big(Float, Term);
|
||||
Term Yap_gmp_fdiv_big_float(Term, Float);
|
||||
|
||||
int STD_PROTO(Yap_gmp_cmp_big_int,(Term, Int));
|
||||
int Yap_gmp_cmp_big_int(Term, Int);
|
||||
#define Yap_gmp_cmp_int_big(I, T) (-Yap_gmp_cmp_big_int(T, I))
|
||||
int STD_PROTO(Yap_gmp_cmp_big_float,(Term, Float));
|
||||
int Yap_gmp_cmp_big_float(Term, Float);
|
||||
#define Yap_gmp_cmp_float_big(D, T) (-Yap_gmp_cmp_big_float(T, D))
|
||||
int STD_PROTO(Yap_gmp_cmp_big_big,(Term, Term));
|
||||
int Yap_gmp_cmp_big_big(Term, Term);
|
||||
|
||||
int STD_PROTO(Yap_gmp_tcmp_big_int,(Term, Int));
|
||||
int Yap_gmp_tcmp_big_int(Term, Int);
|
||||
#define Yap_gmp_tcmp_int_big(I, T) (-Yap_gmp_tcmp_big_int(T, I))
|
||||
int STD_PROTO(Yap_gmp_tcmp_big_float,(Term, Float));
|
||||
int Yap_gmp_tcmp_big_float(Term, Float);
|
||||
#define Yap_gmp_tcmp_float_big(D, T) (-Yap_gmp_tcmp_big_float(T, D))
|
||||
int STD_PROTO(Yap_gmp_tcmp_big_big,(Term, Term));
|
||||
int Yap_gmp_tcmp_big_big(Term, Term);
|
||||
|
||||
Term STD_PROTO(Yap_gmp_neg_int,(Int));
|
||||
Term STD_PROTO(Yap_gmp_abs_big,(Term));
|
||||
Term STD_PROTO(Yap_gmp_neg_big,(Term));
|
||||
Term STD_PROTO(Yap_gmp_unot_big,(Term));
|
||||
Term STD_PROTO(Yap_gmp_floor,(Term));
|
||||
Term STD_PROTO(Yap_gmp_ceiling,(Term));
|
||||
Term STD_PROTO(Yap_gmp_round,(Term));
|
||||
Term STD_PROTO(Yap_gmp_trunc,(Term));
|
||||
Term STD_PROTO(Yap_gmp_float_fractional_part,(Term));
|
||||
Term STD_PROTO(Yap_gmp_float_integer_part,(Term));
|
||||
Term STD_PROTO(Yap_gmp_sign,(Term));
|
||||
Term STD_PROTO(Yap_gmp_lsb,(Term));
|
||||
Term STD_PROTO(Yap_gmp_msb,(Term));
|
||||
Term STD_PROTO(Yap_gmp_popcount,(Term));
|
||||
Term Yap_gmp_neg_int(Int);
|
||||
Term Yap_gmp_abs_big(Term);
|
||||
Term Yap_gmp_neg_big(Term);
|
||||
Term Yap_gmp_unot_big(Term);
|
||||
Term Yap_gmp_floor(Term);
|
||||
Term Yap_gmp_ceiling(Term);
|
||||
Term Yap_gmp_round(Term);
|
||||
Term Yap_gmp_trunc(Term);
|
||||
Term Yap_gmp_float_fractional_part(Term);
|
||||
Term Yap_gmp_float_integer_part(Term);
|
||||
Term Yap_gmp_sign(Term);
|
||||
Term Yap_gmp_lsb(Term);
|
||||
Term Yap_gmp_msb(Term);
|
||||
Term Yap_gmp_popcount(Term);
|
||||
|
||||
char * STD_PROTO(Yap_gmp_to_string,(Term, char *, size_t, int));
|
||||
size_t STD_PROTO(Yap_gmp_to_size,(Term, int));
|
||||
char * Yap_gmp_to_string(Term, char *, size_t, int);
|
||||
size_t Yap_gmp_to_size(Term, int);
|
||||
|
||||
int STD_PROTO(Yap_term_to_existing_big,(Term, MP_INT *));
|
||||
int STD_PROTO(Yap_term_to_existing_rat,(Term, MP_RAT *));
|
||||
int Yap_term_to_existing_big(Term, MP_INT *);
|
||||
int Yap_term_to_existing_rat(Term, MP_RAT *);
|
||||
|
||||
void Yap_gmp_set_bit(Int i, Term t);
|
||||
#endif
|
||||
|
@ -166,9 +166,9 @@ typedef CELL *CELL_PTR;
|
||||
|
||||
#define ENVSIZE(E) EnvSize(((CELL *)E)[E_CP])
|
||||
|
||||
void STD_PROTO(Yap_mark_variable, (CELL *));
|
||||
void STD_PROTO(Yap_mark_external_reference, (CELL *));
|
||||
void STD_PROTO(Yap_inc_mark_variable, (void));
|
||||
void Yap_mark_variable(CELL *);
|
||||
void Yap_mark_external_reference(CELL *);
|
||||
void Yap_inc_mark_variable(void);
|
||||
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ StreamDesc;
|
||||
|
||||
#define ALIASES_BLOCK_SIZE 8
|
||||
|
||||
void STD_PROTO (Yap_InitStdStreams, (void));
|
||||
Term STD_PROTO (Yap_StreamPosition, (struct io_stream *));
|
||||
void STD_PROTO (Yap_InitPlIO, (void));
|
||||
void Yap_InitStdStreams(void);
|
||||
Term Yap_StreamPosition(struct io_stream *);
|
||||
void Yap_InitPlIO(void);
|
||||
|
||||
|
@ -412,9 +412,9 @@ AdjustSwitchTable__(op_numbers op, yamop *table, COUNT i USES_REGS)
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_PROTO(void RestoreAtomList, (Atom CACHE_TYPE));
|
||||
STATIC_PROTO(void RestoreAtom, (AtomEntry * CACHE_TYPE));
|
||||
STATIC_PROTO(void RestoreHashPreds, ( CACHE_TYPE1 ));
|
||||
static void RestoreAtomList(Atom CACHE_TYPE);
|
||||
static void RestoreAtom(AtomEntry * CACHE_TYPE);
|
||||
static void RestoreHashPreds( CACHE_TYPE1 );
|
||||
|
||||
static void
|
||||
RestoreAtoms__( USES_REGS1 )
|
||||
|
@ -1120,6 +1120,6 @@ IsGlobal__ (CELL reg USES_REGS)
|
||||
}
|
||||
|
||||
|
||||
void STD_PROTO (Yap_AdjustStacksAndTrail, (void));
|
||||
void STD_PROTO (Yap_AdjustRegs, (int));
|
||||
void Yap_AdjustStacksAndTrail(void);
|
||||
void Yap_AdjustRegs(int);
|
||||
|
||||
|
14
H/threads.h
14
H/threads.h
@ -13,13 +13,13 @@ typedef struct thread_attr_struct {
|
||||
|
||||
#ifdef THREADS
|
||||
|
||||
Int STD_PROTO(Yap_thread_self,(void));
|
||||
int STD_PROTO(Yap_get_thread_ref_count,(int));
|
||||
void STD_PROTO(Yap_set_thread_ref_count,(int,int));
|
||||
CELL STD_PROTO(Yap_thread_create_engine,(thread_attr *));
|
||||
Int STD_PROTO(Yap_thread_attach_engine,(int));
|
||||
Int STD_PROTO(Yap_thread_detach_engine,(int));
|
||||
Int STD_PROTO(Yap_thread_destroy_engine,(int));
|
||||
Int Yap_thread_self(void);
|
||||
int Yap_get_thread_ref_count(int);
|
||||
void Yap_set_thread_ref_count(int,int);
|
||||
CELL Yap_thread_create_engine(thread_attr *);
|
||||
Int Yap_thread_attach_engine(int);
|
||||
Int Yap_thread_detach_engine(int);
|
||||
Int Yap_thread_destroy_engine(int);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -27,9 +27,9 @@ typedef enum {
|
||||
retry_table_loader
|
||||
} yap_low_level_port;
|
||||
|
||||
void STD_PROTO(low_level_trace,(yap_low_level_port, PredEntry *, CELL *));
|
||||
void STD_PROTO(Yap_InitLowLevelTrace,(void));
|
||||
void STD_PROTO(toggle_low_level_trace,(void));
|
||||
void low_level_trace(yap_low_level_port, PredEntry *, CELL *);
|
||||
void Yap_InitLowLevelTrace(void);
|
||||
void toggle_low_level_trace(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
66
H/yapio.h
66
H/yapio.h
@ -66,7 +66,7 @@
|
||||
|
||||
#define YP_FILE FILE
|
||||
|
||||
int STD_PROTO(YP_putc,(int, int));
|
||||
int YP_putc(int, int);
|
||||
|
||||
#else
|
||||
|
||||
@ -231,8 +231,8 @@ typedef struct AliasDescS {
|
||||
extern char *Yap_chtype;
|
||||
|
||||
#include "inline-only.h"
|
||||
INLINE_ONLY EXTERN inline int STD_PROTO(chtype,(Int));
|
||||
int STD_PROTO(Yap_wide_chtype,(Int));
|
||||
INLINE_ONLY EXTERN inline int chtype(Int);
|
||||
int Yap_wide_chtype(Int);
|
||||
|
||||
INLINE_ONLY EXTERN inline int
|
||||
chtype(Int ch)
|
||||
@ -247,44 +247,44 @@ chtype(Int ch)
|
||||
#define ParserAuxSp LOCAL_ScannerStack
|
||||
|
||||
/* routines in parser.c */
|
||||
VarEntry STD_PROTO(*Yap_LookupVar,(char *));
|
||||
Term STD_PROTO(Yap_VarNames,(VarEntry *,Term));
|
||||
VarEntry *Yap_LookupVar(char *);
|
||||
Term Yap_VarNames(VarEntry *,Term);
|
||||
|
||||
/* routines in scanner.c */
|
||||
TokEntry STD_PROTO(*Yap_tokenizer,(struct io_stream *, int, Term *));
|
||||
void STD_PROTO(Yap_clean_tokenizer,(TokEntry *, VarEntry *, VarEntry *,Term));
|
||||
Term STD_PROTO(Yap_scan_num,(struct io_stream *));
|
||||
char STD_PROTO(*Yap_AllocScannerMemory,(unsigned int));
|
||||
TokEntry *Yap_tokenizer(struct io_stream *, int, Term *);
|
||||
void Yap_clean_tokenizer(TokEntry *, VarEntry *, VarEntry *,Term);
|
||||
Term Yap_scan_num(struct io_stream *);
|
||||
char *Yap_AllocScannerMemory(unsigned int);
|
||||
|
||||
/* routines in iopreds.c */
|
||||
FILE *STD_PROTO(Yap_FileDescriptorFromStream,(Term));
|
||||
Int STD_PROTO(Yap_FirstLineInParse,(void));
|
||||
int STD_PROTO(Yap_CheckIOStream,(Term, char *));
|
||||
FILE *Yap_FileDescriptorFromStream(Term);
|
||||
Int Yap_FirstLineInParse(void);
|
||||
int Yap_CheckIOStream(Term, char *);
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
void STD_PROTO(Yap_LockStream,(struct io_stream *));
|
||||
void STD_PROTO(Yap_UnLockStream,(struct io_stream *));
|
||||
void Yap_LockStream(struct io_stream *);
|
||||
void Yap_UnLockStream(struct io_stream *);
|
||||
#else
|
||||
#define Yap_LockStream(X)
|
||||
#define Yap_UnLockStream(X)
|
||||
#endif
|
||||
Int STD_PROTO(Yap_GetStreamFd,(int));
|
||||
void STD_PROTO(Yap_CloseStreams,(int));
|
||||
void STD_PROTO(Yap_FlushStreams,(void));
|
||||
void STD_PROTO(Yap_CloseStream,(int));
|
||||
int STD_PROTO(Yap_PlGetchar,(void));
|
||||
int STD_PROTO(Yap_PlGetWchar,(void));
|
||||
int STD_PROTO(Yap_PlFGetchar,(void));
|
||||
int STD_PROTO(Yap_GetCharForSIGINT,(void));
|
||||
Int STD_PROTO(Yap_StreamToFileNo,(Term));
|
||||
Term STD_PROTO(Yap_OpenStream,(FILE *,char *,Term,int));
|
||||
Term STD_PROTO(Yap_StringToTerm,(char *,Term *));
|
||||
Int Yap_GetStreamFd(int);
|
||||
void Yap_CloseStreams(int);
|
||||
void Yap_FlushStreams(void);
|
||||
void Yap_CloseStream(int);
|
||||
int Yap_PlGetchar(void);
|
||||
int Yap_PlGetWchar(void);
|
||||
int Yap_PlFGetchar(void);
|
||||
int Yap_GetCharForSIGINT(void);
|
||||
Int Yap_StreamToFileNo(Term);
|
||||
Term Yap_OpenStream(FILE *,char *,Term,int);
|
||||
Term Yap_StringToTerm(char *,Term *);
|
||||
char *Yap_TermToString(Term t, char *s, size_t sz, size_t *length, int *encoding, int flags);
|
||||
int Yap_GetFreeStreamD(void);
|
||||
int Yap_GetFreeStreamDForReading(void);
|
||||
|
||||
Term Yap_WStringToList(wchar_t *);
|
||||
Term STD_PROTO(Yap_WStringToListOfAtoms,(wchar_t *));
|
||||
Atom STD_PROTO(Yap_LookupWideAtom,(wchar_t *));
|
||||
Term Yap_WStringToListOfAtoms(wchar_t *);
|
||||
Atom Yap_LookupWideAtom( wchar_t * );
|
||||
|
||||
#define YAP_INPUT_STREAM 0x01
|
||||
#define YAP_OUTPUT_STREAM 0x02
|
||||
@ -312,9 +312,9 @@ Atom STD_PROTO(Yap_LookupWideAtom,(wchar_t *));
|
||||
|
||||
|
||||
/* grow.c */
|
||||
int STD_PROTO(Yap_growheap_in_parser, (tr_fr_ptr *, TokEntry **, VarEntry **));
|
||||
int STD_PROTO(Yap_growstack_in_parser, (tr_fr_ptr *, TokEntry **, VarEntry **));
|
||||
int STD_PROTO(Yap_growtrail_in_parser, (tr_fr_ptr *, TokEntry **, VarEntry **));
|
||||
int Yap_growheap_in_parser(tr_fr_ptr *, TokEntry **, VarEntry **);
|
||||
int Yap_growstack_in_parser(tr_fr_ptr *, TokEntry **, VarEntry **);
|
||||
int Yap_growtrail_in_parser(tr_fr_ptr *, TokEntry **, VarEntry **);
|
||||
|
||||
|
||||
|
||||
@ -324,8 +324,8 @@ int STD_PROTO(Yap_growtrail_in_parser, (tr_fr_ptr *, TokEntry **, VarEntry **)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
INLINE_ONLY EXTERN inline UInt STD_PROTO(HashFunction, (unsigned char *));
|
||||
INLINE_ONLY EXTERN inline UInt STD_PROTO(WideHashFunction, (wchar_t *));
|
||||
INLINE_ONLY EXTERN UInt inline HashFunction(unsigned char *);
|
||||
INLINE_ONLY EXTERN UInt inline WideHashFunction(wchar_t *);
|
||||
|
||||
INLINE_ONLY EXTERN inline UInt
|
||||
HashFunction(unsigned char *CHP)
|
||||
@ -346,7 +346,7 @@ HashFunction(unsigned char *CHP)
|
||||
*/
|
||||
}
|
||||
|
||||
INLINE_ONLY EXTERN inline UInt
|
||||
INLINE_ONLY EXTERN UInt inline
|
||||
WideHashFunction(wchar_t *CHP)
|
||||
{
|
||||
UInt hash = 5381;
|
||||
|
@ -45,18 +45,18 @@
|
||||
|
||||
static Int null_id = 0;
|
||||
|
||||
STATIC_PROTO(Int c_db_my_connect,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_disconnect,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_number_of_fields,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_get_attributes_types,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_query,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_table_write,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_row,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_row_cut,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_get_fields_properties,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_get_next_result_set,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_get_database,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_my_change_database,( USES_REGS1 ));
|
||||
static Int c_db_my_connect( USES_REGS1 );
|
||||
static Int c_db_my_disconnect( USES_REGS1 );
|
||||
static Int c_db_my_number_of_fields( USES_REGS1 );
|
||||
static Int c_db_my_get_attributes_types( USES_REGS1 );
|
||||
static Int c_db_my_query( USES_REGS1 );
|
||||
static Int c_db_my_table_write( USES_REGS1 );
|
||||
static Int c_db_my_row( USES_REGS1 );
|
||||
static Int c_db_my_row_cut( USES_REGS1 );
|
||||
static Int c_db_my_get_fields_properties( USES_REGS1 );
|
||||
static Int c_db_my_get_next_result_set( USES_REGS1 );
|
||||
static Int c_db_my_get_database( USES_REGS1 );
|
||||
static Int c_db_my_change_database( USES_REGS1 );
|
||||
|
||||
void Yap_InitMYDDAS_MySQLPreds(void)
|
||||
{
|
||||
|
@ -29,15 +29,15 @@
|
||||
|
||||
static Int null_id = 0;
|
||||
|
||||
STATIC_PROTO(Int c_db_odbc_connect,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_disconnect,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_number_of_fields,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_get_attributes_types,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_query,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_row,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_row_cut,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_get_fields_properties,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_odbc_number_of_fields_in_query,( USES_REGS1 ));
|
||||
static Int c_db_odbc_connect( USES_REGS1 );
|
||||
static Int c_db_odbc_disconnect( USES_REGS1 );
|
||||
static Int c_db_odbc_number_of_fields( USES_REGS1 );
|
||||
static Int c_db_odbc_get_attributes_types( USES_REGS1 );
|
||||
static Int c_db_odbc_query( USES_REGS1 );
|
||||
static Int c_db_odbc_row( USES_REGS1 );
|
||||
static Int c_db_odbc_row_cut( USES_REGS1 );
|
||||
static Int c_db_odbc_get_fields_properties( USES_REGS1 );
|
||||
static Int c_db_odbc_number_of_fields_in_query( USES_REGS1 );
|
||||
|
||||
static int
|
||||
odbc_error(SQLSMALLINT type, SQLHANDLE hdbc, char *msg, char *print)
|
||||
|
@ -27,24 +27,24 @@
|
||||
#include "myddas_statistics.h"
|
||||
#endif
|
||||
|
||||
STATIC_PROTO(Int c_db_initialize_myddas,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_connection_type,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_add_preds,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_preds_conn_start ,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_preds_conn_continue ,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_connection_start ,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_connection_continue ,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_check_if_exists_pred,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_delete_predicate,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_multi_queries_number,( USES_REGS1 ));
|
||||
static Int c_db_initialize_myddas( USES_REGS1 );
|
||||
static Int c_db_connection_type( USES_REGS1 );
|
||||
static Int c_db_add_preds( USES_REGS1 );
|
||||
static Int c_db_preds_conn_start ( USES_REGS1 );
|
||||
static Int c_db_preds_conn_continue ( USES_REGS1 );
|
||||
static Int c_db_connection_start ( USES_REGS1 );
|
||||
static Int c_db_connection_continue ( USES_REGS1 );
|
||||
static Int c_db_check_if_exists_pred( USES_REGS1 );
|
||||
static Int c_db_delete_predicate( USES_REGS1 );
|
||||
static Int c_db_multi_queries_number( USES_REGS1 );
|
||||
#ifdef MYDDAS_STATS
|
||||
STATIC_PROTO(Int c_db_stats,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_stats_walltime,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_stats_translate,( USES_REGS1 ));
|
||||
STATIC_PROTO(Int c_db_stats_time,( USES_REGS1 ));
|
||||
static Int c_db_stats( USES_REGS1 );
|
||||
static Int c_db_stats_walltime( USES_REGS1 );
|
||||
static Int c_db_stats_translate( USES_REGS1 );
|
||||
static Int c_db_stats_time( USES_REGS1 );
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
STATIC_PROTO(Int c_db_check,( USES_REGS1 ));
|
||||
static Int c_db_check( USES_REGS1 );
|
||||
#endif
|
||||
|
||||
void Yap_InitMYDDAS_SharedPreds(void)
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <sys/times.h>
|
||||
|
||||
|
||||
STATIC_PROTO(Int c_db_tl_readline,(void));
|
||||
static Int c_db_tl_readline(void);
|
||||
|
||||
|
||||
void Yap_InitMYDDAS_TopLevelPreds(void)
|
||||
|
@ -39,7 +39,7 @@ static void share_private_nodes(int worker_q);
|
||||
** Local inlines **
|
||||
** ----------------------- */
|
||||
|
||||
STD_PROTO(static inline void PUT_BUSY, (int));
|
||||
static inline void PUT_BUSY(int);
|
||||
|
||||
static inline
|
||||
void PUT_BUSY(int worker_num) {
|
||||
|
@ -18,36 +18,36 @@
|
||||
/* get a def for NULL */
|
||||
#include <stdlib.h>
|
||||
|
||||
STD_PROTO(static inline void PUT_IN_EXECUTING, (int));
|
||||
STD_PROTO(static inline void PUT_OUT_EXECUTING, (int));
|
||||
STD_PROTO(static inline void PUT_IN_FINISHED, (int));
|
||||
static inline void PUT_IN_EXECUTING(int);
|
||||
static inline void PUT_OUT_EXECUTING(int);
|
||||
static inline void PUT_IN_FINISHED(int);
|
||||
#ifdef TABLING_INNER_CUTS
|
||||
STD_PROTO(static inline void PUT_IN_PRUNING, (int));
|
||||
STD_PROTO(static inline void PUT_OUT_PRUNING, (int));
|
||||
static inline void PUT_IN_PRUNING(int);
|
||||
static inline void PUT_OUT_PRUNING(int);
|
||||
#endif /* TABLING_INNER_CUTS */
|
||||
|
||||
STD_PROTO(static inline void PUT_IN_REQUESTABLE, (int));
|
||||
STD_PROTO(static inline void PUT_OUT_REQUESTABLE, (int));
|
||||
STD_PROTO(static inline void SCH_update_local_or_tops, (void));
|
||||
STD_PROTO(static inline void SCH_refuse_share_request_if_any, (void));
|
||||
STD_PROTO(static inline void SCH_set_load, (choiceptr));
|
||||
STD_PROTO(static inline void SCH_new_alternative, (yamop *,yamop *));
|
||||
static inline void PUT_IN_REQUESTABLE(int);
|
||||
static inline void PUT_OUT_REQUESTABLE(int);
|
||||
static inline void SCH_update_local_or_tops(void);
|
||||
static inline void SCH_refuse_share_request_if_any(void);
|
||||
static inline void SCH_set_load(choiceptr);
|
||||
static inline void SCH_new_alternative(yamop *,yamop *);
|
||||
|
||||
STD_PROTO(static inline void CUT_send_prune_request, (int, choiceptr));
|
||||
STD_PROTO(static inline void CUT_reset_prune_request, (void));
|
||||
static inline void CUT_send_prune_request(int, choiceptr);
|
||||
static inline void CUT_reset_prune_request(void);
|
||||
|
||||
STD_PROTO(static inline int CUT_last_worker_left_pending_prune, (or_fr_ptr));
|
||||
STD_PROTO(static inline or_fr_ptr CUT_leftmost_or_frame, (void));
|
||||
static inline int CUT_last_worker_left_pending_prune(or_fr_ptr);
|
||||
static inline or_fr_ptr CUT_leftmost_or_frame(void);
|
||||
#ifdef TABLING_INNER_CUTS
|
||||
STD_PROTO(static inline or_fr_ptr CUT_leftmost_until, (or_fr_ptr, int));
|
||||
static inline or_fr_ptr CUT_leftmost_until(or_fr_ptr, int);
|
||||
#endif /* TABLING_INNER_CUTS */
|
||||
|
||||
STD_PROTO(static inline void CUT_store_answer, (or_fr_ptr, qg_ans_fr_ptr));
|
||||
STD_PROTO(static inline void CUT_store_answers, (or_fr_ptr, qg_sol_fr_ptr));
|
||||
STD_PROTO(static inline void CUT_join_answers_in_an_unique_frame, (qg_sol_fr_ptr));
|
||||
STD_PROTO(static inline void CUT_free_solution_frame, (qg_sol_fr_ptr));
|
||||
STD_PROTO(static inline void CUT_free_solution_frames, (qg_sol_fr_ptr));
|
||||
STD_PROTO(static inline qg_sol_fr_ptr CUT_prune_solution_frames, (qg_sol_fr_ptr, int));
|
||||
static inline void CUT_store_answer(or_fr_ptr, qg_ans_fr_ptr);
|
||||
static inline void CUT_store_answers(or_fr_ptr, qg_sol_fr_ptr);
|
||||
static inline void CUT_join_answers_in_an_unique_frame(qg_sol_fr_ptr);
|
||||
static inline void CUT_free_solution_frame(qg_sol_fr_ptr);
|
||||
static inline void CUT_free_solution_frames(qg_sol_fr_ptr);
|
||||
static inline qg_sol_fr_ptr CUT_prune_solution_frames(qg_sol_fr_ptr, int);
|
||||
|
||||
|
||||
|
||||
|
@ -42,12 +42,12 @@ static int search_for_hidden_shared_work(bitmap stable_busy);
|
||||
** Local inlines **
|
||||
** ----------------------- */
|
||||
|
||||
STD_PROTO(static inline void PUT_NO_WORK_IN_UPPER_NODES, (void));
|
||||
STD_PROTO(static inline void PUT_IDLE, (int));
|
||||
STD_PROTO(static inline void PUT_BUSY, (int));
|
||||
STD_PROTO(static inline void PUT_IN_ROOT_NODE, (int));
|
||||
STD_PROTO(static inline void PUT_OUT_ROOT_NODE, (int));
|
||||
STD_PROTO(static inline void move_up_to_prune_request, (void));
|
||||
static inline void PUT_NO_WORK_IN_UPPER_NODES(void);
|
||||
static inline void PUT_IDLE(int);
|
||||
static inline void PUT_BUSY(int);
|
||||
static inline void PUT_IN_ROOT_NODE(int);
|
||||
static inline void PUT_OUT_ROOT_NODE(int);
|
||||
static inline void move_up_to_prune_request(void);
|
||||
|
||||
|
||||
static inline
|
||||
|
Reference in New Issue
Block a user