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

315 lines
7.1 KiB
C
Raw Normal View History

2011-03-23 16:45:47 +00:00
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap"
please do not update, update misc/HEAPFIELDS instead */
#if USE_DL_MALLOC
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(DLMallocLock);
2011-03-23 16:45:47 +00:00
#endif
#endif
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
#ifndef HeapUsed
#define HeapUsed Yap_givemallinfo()
#endif
#else
#endif
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(FreeBlocksLock);
INIT_LOCK(HeapUsedLock);
INIT_LOCK(HeapTopLock);
HeapTopOwner = -1;
2011-03-23 16:45:47 +00:00
#endif
2012-06-26 10:09:10 +01:00
MaxStack = 0;
MaxTrail = 0;
2011-03-23 16:45:47 +00:00
#if USE_THREADED_CODE
#endif
2011-05-04 19:34:22 +01:00
EXECUTE_CPRED_OP_CODE = Yap_opcode(_execute_cpred);
EXPAND_OP_CODE = Yap_opcode(_expand_index);
FAIL_OPCODE = Yap_opcode(_op_fail);
INDEX_OPCODE = Yap_opcode(_index_pred);
LOCKPRED_OPCODE = Yap_opcode(_lock_pred);
ORLAST_OPCODE = Yap_opcode(_or_last);
UNDEF_OPCODE = Yap_opcode(_undef_p);
RETRY_USERC_OPCODE = Yap_opcode(_retry_userc);
2011-03-23 16:45:47 +00:00
InitInvisibleAtoms();
InitWideAtoms();
InitAtoms();
#include "iatoms.h"
#ifdef EUROTRA
2011-05-04 19:34:22 +01:00
TermDollarU = MkAtomTerm(AtomDollarU);
2011-03-23 16:45:47 +00:00
#endif
2011-05-04 19:34:22 +01:00
TermProlog = MkAtomTerm(AtomProlog);
TermReFoundVar = MkAtomTerm(AtomRefoundVar);
USER_MODULE = MkAtomTerm(AtomUser);
IDB_MODULE = MkAtomTerm(AtomIDB);
ATTRIBUTES_MODULE = MkAtomTerm(AtomAttributes);
CHARSIO_MODULE = MkAtomTerm(AtomCharsio);
TERMS_MODULE = MkAtomTerm(AtomTerms);
SYSTEM_MODULE = MkAtomTerm(AtomSystem);
OPERATING_SYSTEM_MODULE = MkAtomTerm(AtomOperatingSystemSupport);
READUTIL_MODULE = MkAtomTerm(AtomReadutil);
HACKS_MODULE = MkAtomTerm(AtomYapHacks);
ARG_MODULE = MkAtomTerm(AtomArg);
GLOBALS_MODULE = MkAtomTerm(AtomNb);
SWI_MODULE = MkAtomTerm(AtomSwi);
DBLOAD_MODULE = MkAtomTerm(AtomDBLoad);
2012-10-23 14:55:44 +01:00
RANGE_MODULE = MkAtomTerm(AtomRange);
2011-03-23 16:45:47 +00:00
2012-10-19 18:10:48 +01:00
HIDDEN_PREDICATES = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
CurrentModules = NULL;
2011-03-23 16:45:47 +00:00
Yap_InitModules();
2011-05-04 19:34:22 +01:00
Yap_ExecutionMode = INTERPRETED;
2011-03-23 16:45:47 +00:00
InitPredHash();
#if defined(YAPOR) || defined(THREADS)
#endif
2011-05-04 19:34:22 +01:00
PredsInHashTable = 0;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
CreepCode = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomCreep,1),PROLOG_MODULE));
UndefCode = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomUndefp,1),PROLOG_MODULE));
SpyCode = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomSpy,1),PROLOG_MODULE));
PredFail = RepPredProp(PredPropByAtom(AtomFail,PROLOG_MODULE));
PredTrue = RepPredProp(PredPropByAtom(AtomTrue,PROLOG_MODULE));
2011-03-23 16:45:47 +00:00
#ifdef COROUTINING
2011-05-04 19:34:22 +01:00
WakeUpCode = RepPredProp(PredPropByFunc(Yap_MkFunctor(AtomWakeUpGoal,2),PROLOG_MODULE));
2011-03-23 16:45:47 +00:00
#endif
2011-05-04 19:34:22 +01:00
PredGoalExpansion = RepPredProp(PredPropByFunc(FunctorGoalExpansion,USER_MODULE));
PredMetaCall = RepPredProp(PredPropByFunc(FunctorMetaCall,PROLOG_MODULE));
PredDollarCatch = RepPredProp(PredPropByFunc(FunctorCatch,PROLOG_MODULE));
PredRecordedWithKey = RepPredProp(PredPropByFunc(FunctorRecordedWithKey,PROLOG_MODULE));
PredLogUpdClause = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
PredLogUpdClauseErase = RepPredProp(PredPropByFunc(FunctorDoLogUpdClauseErase,PROLOG_MODULE));
PredLogUpdClause0 = RepPredProp(PredPropByFunc(FunctorDoLogUpdClause,PROLOG_MODULE));
PredStaticClause = RepPredProp(PredPropByFunc(FunctorDoStaticClause,PROLOG_MODULE));
PredThrow = RepPredProp(PredPropByFunc(FunctorThrow,PROLOG_MODULE));
PredHandleThrow = RepPredProp(PredPropByFunc(FunctorHandleThrow,PROLOG_MODULE));
PredIs = RepPredProp(PredPropByFunc(FunctorIs,PROLOG_MODULE));
PredSafeCallCleanup = RepPredProp(PredPropByFunc(FunctorSafeCallCleanup,PROLOG_MODULE));
PredRestoreRegs = RepPredProp(PredPropByFunc(FunctorRestoreRegs,PROLOG_MODULE));
2011-03-23 16:45:47 +00:00
#ifdef YAPOR
2011-05-04 19:34:22 +01:00
PredGetwork = RepPredProp(PredPropByAtom(AtomGetwork,PROLOG_MODULE));
PredGetworkSeq = RepPredProp(PredPropByAtom(AtomGetworkSeq,PROLOG_MODULE));
2011-03-23 16:45:47 +00:00
#endif /* YAPOR */
#ifdef LOW_LEVEL_TRACER
2011-05-04 19:34:22 +01:00
Yap_do_low_level_trace = FALSE;
2011-03-23 16:45:47 +00:00
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(Yap_low_level_trace_lock);
2011-03-23 16:45:47 +00:00
#endif
#endif
2011-05-04 19:34:22 +01:00
Yap_ClauseSpace = 0;
Yap_IndexSpace_Tree = 0;
Yap_IndexSpace_EXT = 0;
Yap_IndexSpace_SW = 0;
Yap_LUClauseSpace = 0;
Yap_LUIndexSpace_Tree = 0;
Yap_LUIndexSpace_CP = 0;
Yap_LUIndexSpace_EXT = 0;
Yap_LUIndexSpace_SW = 0;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
DUMMYCODE->opc = Yap_opcode(_op_fail);
FAILCODE->opc = Yap_opcode(_op_fail);
NOCODE->opc = Yap_opcode(_Nstop);
2011-03-23 16:45:47 +00:00
InitEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
InitEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
InitOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
#ifdef BEAM
2011-05-04 19:34:22 +01:00
BEAM_RETRY_CODE->opc = Yap_opcode(_beam_retry_code);
2011-03-23 16:45:47 +00:00
#endif /* BEAM */
#ifdef YAPOR
InitOtaplInst(GETWORK,_getwork,PredGetwork);
InitOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
2011-05-04 19:34:22 +01:00
GETWORK_FIRST_TIME->opc = Yap_opcode(_getwork_first_time);
2011-03-23 16:45:47 +00:00
#endif /* YAPOR */
#ifdef TABLING
InitOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
InitOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
InitOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
InitOtaplInst(COMPLETION,_table_completion,PredFail);
#ifdef THREADS_CONSUMER_SHARING
InitOtaplInst(ANSWER_RESOLUTION_COMPLETION,_table_answer_resolution_completion,PredFail);
#endif /* THREADS_CONSUMER_SHARING */
2011-03-23 16:45:47 +00:00
#endif /* TABLING */
2011-05-04 19:34:22 +01:00
P_before_spy = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
RETRY_C_RECORDEDP_CODE = NULL;
RETRY_C_RECORDED_K_CODE = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
PROFILING = FALSE;
CALL_COUNTING = FALSE;
PRED_GOAL_EXPANSION_ALL = FALSE;
PRED_GOAL_EXPANSION_FUNC = FALSE;
PRED_GOAL_EXPANSION_ON = FALSE;
optimizer_on = TRUE;
compile_mode = 0;
profiling = FALSE;
call_counting = FALSE;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
compile_arrays = FALSE;
2011-03-23 16:45:47 +00:00
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(DBTermsListLock);
2011-03-23 16:45:47 +00:00
#endif
2011-05-04 19:34:22 +01:00
DBTermsList = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
ExpandClausesFirst = NULL;
ExpandClausesLast = NULL;
Yap_ExpandClauses = 0;
2011-03-23 16:45:47 +00:00
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(ExpandClausesListLock);
INIT_LOCK(OpListLock);
2011-03-23 16:45:47 +00:00
#endif
#ifdef DEBUG
2011-05-04 19:34:22 +01:00
Yap_NewCps = 0L;
Yap_LiveCps = 0L;
Yap_DirtyCps = 0L;
Yap_FreedCps = 0L;
2011-03-23 16:45:47 +00:00
#endif
2011-05-04 19:34:22 +01:00
Yap_expand_clauses_sz = 0L;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
UdiControlBlocks = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
STATIC_PREDICATES_MARKED = FALSE;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
INT_KEYS = NULL;
INT_LU_KEYS = NULL;
INT_BB_KEYS = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
INT_KEYS_SIZE = INT_KEYS_DEFAULT_SIZE;
INT_KEYS_TIMESTAMP = 0L;
INT_BB_KEYS_SIZE = INT_KEYS_DEFAULT_SIZE;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
UPDATE_MODE = UPDATE_MODE_LOGICAL;
2011-03-23 16:45:47 +00:00
InitDBErasedMarker();
InitLogDBErasedMarker();
2011-05-04 19:34:22 +01:00
DeadStaticClauses = NULL;
DeadMegaClauses = NULL;
DeadStaticIndices = NULL;
DBErasedList = NULL;
DBErasedIList = NULL;
2011-03-23 16:45:47 +00:00
#if defined(YAPOR) || defined(THREADS)
2011-05-04 19:34:22 +01:00
INIT_LOCK(DeadStaticClausesLock);
INIT_LOCK(DeadMegaClausesLock);
INIT_LOCK(DeadStaticIndicesLock);
2011-03-23 16:45:47 +00:00
#endif
#ifdef COROUTINING
2011-05-04 19:34:22 +01:00
NUM_OF_ATTS = 1;
2011-03-23 16:45:47 +00:00
#endif
InitFlags();
2011-05-04 19:34:22 +01:00
OpList = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
Stream = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
NOfFileAliases = 0;
SzOfFileAliases = 0;
FileAliases = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
AtPrompt = AtomNil;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
CharConversionTable = NULL;
CharConversionTable2 = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
ParserErrorStyle = EXCEPTION_ON_PARSER_ERROR;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
Yap_LibDir = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
LastWtimePtr = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
ForeignCodeLoaded = NULL;
ForeignCodeBase = NULL;
ForeignCodeTop = NULL;
ForeignCodeMax = NULL;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
Yap_Records = NULL;
2011-03-23 16:45:47 +00:00
InitSWIAtoms();
2013-10-04 13:22:00 +01:00
2013-10-08 13:04:30 +01:00
2013-04-30 21:23:01 +01:00
InitEmptyWakeups();
MaxEmptyWakeups = 0;
2011-03-23 16:45:47 +00:00
2011-05-04 19:34:22 +01:00
SWI_BlobTypes = NULL;
SWI_Blobs = NULL;
2011-12-22 10:27:56 +00:00
NOfBlobs = 0;
NOfBlobsMax = 256;
#if defined(YAPOR) || defined(THREADS)
INIT_LOCK(SWI_Blobs_Lock);
#endif