Merge branch 'master' of ssh://git.dcc.fc.up.pt/yap-6.3
This commit is contained in:
commit
7f8ebe18d0
@ -46,7 +46,14 @@ char * Yap_blob_to_string(AtomEntry *ref, const char *s0, size_t sz)
|
||||
fclose(f); // return the final result.
|
||||
return s;
|
||||
} else {
|
||||
#if __APPLE__
|
||||
size_t sz0 = strlcpy( s, (char *)RepAtom( AtomSWIStream )->StrOfAE, sz);
|
||||
#else
|
||||
size_t sz0;
|
||||
char *f = (char *)memcpy(s, (char *)RepAtom( AtomSWIStream )->StrOfAE, sz);
|
||||
f[0]='\0';
|
||||
sz0 = f-s;
|
||||
#endif
|
||||
s = s+sz0;
|
||||
sz -= sz0;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
|
@ -26,6 +26,7 @@ char *
|
||||
findExecutable(const char *av0, char *buffer);
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
1
C/save.c
1
C/save.c
@ -32,6 +32,7 @@ static char SccsId[] = "@(#)save.c 1.3 3/15/90";
|
||||
#include "dlmalloc.h"
|
||||
#endif
|
||||
#include "yapio.h"
|
||||
#include "YapText.h"
|
||||
#include "sshift.h"
|
||||
#include "Foreign.h"
|
||||
#if HAVE_STRING_H
|
||||
|
19
C/scanner.c
19
C/scanner.c
@ -454,7 +454,7 @@ static void Yap_setCurrentSourceLocation(struct stream_desc *s) {
|
||||
}
|
||||
|
||||
/* token table with some help from Richard O'Keefe's PD scanner */
|
||||
static char chtype0[NUMBER_OF_CHARS + 1] = {
|
||||
char_kind_t Yap_chtype0[NUMBER_OF_CHARS + 1] = {
|
||||
EF,
|
||||
/* nul soh stx etx eot enq ack bel bs ht nl vt np cr so si
|
||||
*/
|
||||
@ -547,23 +547,6 @@ typedef struct scanner_internals {
|
||||
size_t CommentsBuffLim;
|
||||
} scanner_internals;
|
||||
|
||||
char *Yap_chtype = chtype0 + 1;
|
||||
|
||||
int Yap_wide_chtype(Int ch) {
|
||||
#if HAVE_WCTYPE_H
|
||||
if (iswalnum(ch)) {
|
||||
if (iswlower(ch))
|
||||
return LC;
|
||||
if (iswdigit(ch))
|
||||
return NU;
|
||||
return UC;
|
||||
}
|
||||
if (iswpunct(ch))
|
||||
return SY;
|
||||
#endif
|
||||
return BS;
|
||||
}
|
||||
|
||||
// standard get char, uses conversion table
|
||||
// and converts to wide
|
||||
#define getchr(inp) inp->stream_wgetc_for_read(inp - GLOBAL_Stream)
|
||||
|
112
C/udi.c
112
C/udi.c
@ -236,115 +236,9 @@ Yap_udi_search(PredEntry *p)
|
||||
Yap_ClauseListDestroy(c.cl);
|
||||
return Yap_FAILCODE();
|
||||
}
|
||||
} else {//intersection needed using Judy1
|
||||
#ifdef USE_JUDY
|
||||
/*TODO: do more tests to this algorithm*/
|
||||
int i;
|
||||
Pvoid_t tmp = (Pvoid_t) NULL;
|
||||
Pvoid_t result = (Pvoid_t) NULL;
|
||||
Word_t count = 0L;
|
||||
Word_t idx_r = 0L;
|
||||
Word_t idx_tmp = 0L;
|
||||
int rc = 0;
|
||||
yamop **x;
|
||||
|
||||
/*
|
||||
* I will start with the simplest approach
|
||||
* for each index create a set and intersect it with the
|
||||
* next
|
||||
*
|
||||
* In the future it could pay to sort according to index type
|
||||
* to improve intersection part
|
||||
*/
|
||||
for (i = 0; i < utarray_len(info->args) ; i++) {
|
||||
parg = (UdiPArg) utarray_eltptr(info->args,i);
|
||||
r = parg->control->search(parg->idxstr, parg->arg, j1_callback, &tmp);
|
||||
if (r == -1) /*this arg does not prune search*/
|
||||
continue;
|
||||
rc ++;
|
||||
J1C(count, result, 0, -1);
|
||||
if (r == 0) /* this arg gave 0 results -> FAIL*/
|
||||
{
|
||||
if (count > 0) // clear previous result if they exists
|
||||
J1FA(count, result);
|
||||
return Yap_FAILCODE();
|
||||
}
|
||||
|
||||
if (count == 0) // first result_set
|
||||
{
|
||||
result = tmp;
|
||||
tmp = (Pvoid_t) NULL;
|
||||
}
|
||||
else /*intersection*/
|
||||
{
|
||||
idx_tmp = 0L;
|
||||
idx_r = 0L;
|
||||
J1F(count, result, idx_r); //succeeds one time at least
|
||||
assert(count > 0);
|
||||
J1F(count, tmp, idx_tmp); //succeeds one time at least
|
||||
assert(count > 0);
|
||||
while (count)
|
||||
{
|
||||
while (idx_r < idx_tmp)
|
||||
{
|
||||
J1U(count, result, idx_r); //does not belong
|
||||
J1N(count, result, idx_r); //next
|
||||
if (! count) break; //end result set
|
||||
}
|
||||
if(idx_r == idx_tmp)
|
||||
{
|
||||
J1N(count, result, idx_r); //next
|
||||
if (! count) break; //end result set
|
||||
J1N(count, tmp, idx_tmp); //next tmp
|
||||
//if (! count) break; //end tmp set will break while
|
||||
}
|
||||
else // (idx_r > idx_tmp)
|
||||
{
|
||||
idx_tmp = idx_r; // fast forward
|
||||
J1F(count, tmp, idx_tmp); // first starting in idx_r
|
||||
//if (! count) break; //end tmp set will break while
|
||||
}
|
||||
}
|
||||
J1F(count, result, idx_r); // first starting in idx_r
|
||||
//clear up the rest
|
||||
while (idx_r > idx_tmp && count) //result has more setted values
|
||||
{
|
||||
J1U(count, result, idx_r); //does not belong
|
||||
J1N(count, result, idx_r); //next
|
||||
}
|
||||
J1FA(count, tmp); //free tmp
|
||||
}
|
||||
}
|
||||
if (rc == 0) /*no search performed*/
|
||||
return NULL;
|
||||
|
||||
J1C(count, result, 0, -1);
|
||||
if (count == 0) { /*result set empty -> FAIL */
|
||||
J1FA(count, result);
|
||||
return Yap_FAILCODE();
|
||||
}
|
||||
|
||||
/*convert Juddy1 to clauselist*/
|
||||
Yap_ClauseListInit(&clauselist);
|
||||
idx_r = 0L;
|
||||
J1F(count, result, idx_r);
|
||||
while (count)
|
||||
{
|
||||
x = (yamop **) utarray_eltptr(info->clauselist, idx_r - 1);
|
||||
Yap_ClauseListExtend(
|
||||
&clauselist,
|
||||
*x,
|
||||
info->p);
|
||||
J1N(count, result, idx_r);
|
||||
}
|
||||
J1FA(count,result);
|
||||
fprintf(stderr,"J1 used space %ld bytes for %d clausules\n",
|
||||
count, Yap_ClauseListCount(&clauselist));
|
||||
Yap_ClauseListClose(&clauselist);
|
||||
#else
|
||||
fprintf(stderr,"Without libJudy only one argument indexed is allowed."
|
||||
"Falling back to Yap Indexing\n");
|
||||
return NULL; //NO Judy Available
|
||||
#if 0
|
||||
} else {//intersection needed using Judy
|
||||
Yap_udi_join( &clauselist, parg, info );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
project(YAP)
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 2.8XSXCG)
|
||||
# where we have most scripts
|
||||
# set path to additional CMake modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
@ -178,7 +178,6 @@ ENDIF("${isSystemDir}" STREQUAL "-1")
|
||||
|
||||
|
||||
#
|
||||
set ( YAP_MALLOC_T void *)
|
||||
set ( MIN_STACKSPACE 1024*SIZEOF_INT_P )
|
||||
set ( MIN_HEAPSPACE 2*1024*SIZEOF_INT_P )
|
||||
set ( MIN_TRAILSPACE 512*SIZEOF_INT_P )
|
||||
@ -314,6 +313,8 @@ endif (YAP_CALL_TRACER)
|
||||
#set( CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBS} ${CMAKE_REQUIRED_LIBRARIES} )
|
||||
#target_link_libraries(libYap ${READLINE_LIBS})
|
||||
|
||||
option (YAPOR "or-p" OFF)
|
||||
|
||||
option (YAP_THREADS
|
||||
"support system threads" OFF)
|
||||
macro_optional_find_package (Threads OFF)
|
||||
@ -458,15 +459,23 @@ option (WITH_YAP_STATIC
|
||||
#TODO:
|
||||
|
||||
option (WITH_YAP_MALLOC
|
||||
"use malloc to allocate memory" ON)
|
||||
if (YAP_MALLOC)
|
||||
"use malloc to allocate memory" OFF)
|
||||
# modern systems do this.
|
||||
set ( MALLOC_T "void *" )
|
||||
if (YAPOR)
|
||||
set ( USE_DL_MALLOC 1 )
|
||||
set ( USE_SYSTEM_MALLOC 0 )
|
||||
else()
|
||||
# use default allocator
|
||||
set ( USE_SYSTEM_MALLOC 1 )
|
||||
set ( USE_DL_MALLOC 0 )
|
||||
set ( USE_SYSTEM_MMAP 0 )
|
||||
set ( USE_SYSTEM_SHM 0 )
|
||||
endif()
|
||||
|
||||
option(YAP_CONDOR
|
||||
option(WITH_YAP_CONDOR
|
||||
"allow YAP to be used from condor" OFF)
|
||||
if (YAP_MALLOC)
|
||||
if (WITH_YAP_MALLOC)
|
||||
# use default allocator
|
||||
set ( YAP_STATIC ON )
|
||||
set ( YAP_DLL OFF )
|
||||
@ -496,6 +505,7 @@ target_link_libraries(libYap
|
||||
${GMP_LIBRARIES}
|
||||
${READLINE_LIBS}
|
||||
${CMAKE_DL_LIBS}
|
||||
m
|
||||
)
|
||||
|
||||
add_executable (yap-bin ${CONSOLE_SOURCES})
|
||||
|
21
H/Yap.h
21
H/Yap.h
@ -849,27 +849,6 @@ LOG0(const char *f, int l, const char *fmt, ...)
|
||||
|
||||
// YAP lexicon
|
||||
|
||||
/* Character types for tokenizer and write.c */
|
||||
|
||||
typedef enum char_kind_t {
|
||||
BG = 0, /* initial state */
|
||||
UC = 1, /* Upper case */
|
||||
UL = 2, /* Underline */
|
||||
LC = 3, /* Lower case */
|
||||
NU = 4, /* digit */
|
||||
QT = 5, /* single quote */
|
||||
DC = 6, /* double quote */
|
||||
SY = 7, /* Symbol character */
|
||||
SL = 8, /* Solo character */
|
||||
BK = 9, /* Brackets & friends */
|
||||
BS = 10, /* Blank */
|
||||
EF = 11, /* End of File marker */
|
||||
CC = 12 /* comment,char % */
|
||||
} charkind_t;
|
||||
|
||||
#ifndef __ANDROID__
|
||||
#define __android_log_print( ... )
|
||||
#endif
|
||||
|
||||
#include "GitSHA1.h"
|
||||
|
||||
|
847
H/YapText.h
847
H/YapText.h
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, dhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
@ -91,6 +91,7 @@
|
||||
#define IDB_MODULE Yap_heap_regs->idb_module
|
||||
#define ATTRIBUTES_MODULE Yap_heap_regs->attributes_module
|
||||
#define CHARSIO_MODULE Yap_heap_regs->charsio_module
|
||||
#define CHTYPE_MODULE Yap_heap_regs->chtype_module
|
||||
#define TERMS_MODULE Yap_heap_regs->terms_module
|
||||
#define SYSTEM_MODULE Yap_heap_regs->system_module
|
||||
#define OPERATING_SYSTEM_MODULE Yap_heap_regs->operating_system_module
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
@ -91,6 +91,7 @@
|
||||
Term idb_module;
|
||||
Term attributes_module;
|
||||
Term charsio_module;
|
||||
Term chtype_module;
|
||||
Term terms_module;
|
||||
Term system_module;
|
||||
Term operating_system_module;
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, iatoms.h, was generated automatically by "yap -L misc/buildatoms"
|
||||
please do not update, update misc/ATOMS instead */
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
AtomCharacterCode = Yap_LookupAtom("character_code");
|
||||
AtomChars = Yap_LookupAtom("chars");
|
||||
AtomCharset = Yap_LookupAtom("charset");
|
||||
AtomChType = Yap_FullLookupAtom("$char_type");
|
||||
AtomCleanCall = Yap_FullLookupAtom("$clean_call");
|
||||
AtomColomn = Yap_LookupAtom(":");
|
||||
AtomCodeSpace = Yap_LookupAtom("code_space");
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
@ -91,6 +91,7 @@
|
||||
IDB_MODULE = MkAtomTerm(AtomIDB);
|
||||
ATTRIBUTES_MODULE = MkAtomTerm(AtomAttributes);
|
||||
CHARSIO_MODULE = MkAtomTerm(AtomCharsio);
|
||||
CHTYPE_MODULE = MkAtomTerm(AtomChType);
|
||||
TERMS_MODULE = MkAtomTerm(AtomTerms);
|
||||
SYSTEM_MODULE = MkAtomTerm(AtomSystem);
|
||||
OPERATING_SYSTEM_MODULE = MkAtomTerm(AtomOperatingSystemSupport);
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, ratoms.h, was generated automatically by "yap -L misc/buildatoms"
|
||||
please do not update, update misc/ATOMS instead */
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
AtomCharacterCode = AtomAdjust(AtomCharacterCode);
|
||||
AtomChars = AtomAdjust(AtomChars);
|
||||
AtomCharset = AtomAdjust(AtomCharset);
|
||||
AtomChType = AtomAdjust(AtomChType);
|
||||
AtomCleanCall = AtomAdjust(AtomCleanCall);
|
||||
AtomColomn = AtomAdjust(AtomColomn);
|
||||
AtomCodeSpace = AtomAdjust(AtomCodeSpace);
|
||||
|
329
H/rhstruct.h
329
H/rhstruct.h
@ -1,197 +1,304 @@
|
||||
|
||||
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
/* This file, rhstruct.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)
|
||||
REINIT_LOCK(DLMallocLock);
|
||||
REINIT_LOCK(DLMallocLock);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(FreeBlocksLock);
|
||||
REINIT_LOCK(HeapUsedLock);
|
||||
REINIT_LOCK(HeapTopLock);
|
||||
REINIT_LOCK(FreeBlocksLock);
|
||||
REINIT_LOCK(HeapUsedLock);
|
||||
REINIT_LOCK(HeapTopLock);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
OP_RTABLE = OpRTableAdjust(OP_RTABLE);
|
||||
OP_RTABLE = OpRTableAdjust(OP_RTABLE);
|
||||
#endif
|
||||
|
||||
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);
|
||||
EXECUTE_CPRED_OPCODE = Yap_opcode(_execute_cpred);
|
||||
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);
|
||||
EXECUTE_CPRED_OPCODE = Yap_opcode(_execute_cpred);
|
||||
|
||||
RestoreInvisibleAtoms();
|
||||
RestoreWideAtoms();
|
||||
RestoreAtoms();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreInvisibleAtoms();
|
||||
RestoreWideAtoms();
|
||||
RestoreAtoms();
|
||||
|
||||
#include "ratoms.h"
|
||||
#ifdef EUROTRA
|
||||
TermDollarU = AtomTermAdjust(TermDollarU);
|
||||
TermDollarU = AtomTermAdjust(TermDollarU);
|
||||
#endif
|
||||
|
||||
USER_MODULE = AtomTermAdjust(USER_MODULE);
|
||||
IDB_MODULE = AtomTermAdjust(IDB_MODULE);
|
||||
ATTRIBUTES_MODULE = AtomTermAdjust(ATTRIBUTES_MODULE);
|
||||
CHARSIO_MODULE = AtomTermAdjust(CHARSIO_MODULE);
|
||||
TERMS_MODULE = AtomTermAdjust(TERMS_MODULE);
|
||||
SYSTEM_MODULE = AtomTermAdjust(SYSTEM_MODULE);
|
||||
OPERATING_SYSTEM_MODULE = AtomTermAdjust(OPERATING_SYSTEM_MODULE);
|
||||
READUTIL_MODULE = AtomTermAdjust(READUTIL_MODULE);
|
||||
HACKS_MODULE = AtomTermAdjust(HACKS_MODULE);
|
||||
ARG_MODULE = AtomTermAdjust(ARG_MODULE);
|
||||
GLOBALS_MODULE = AtomTermAdjust(GLOBALS_MODULE);
|
||||
SWI_MODULE = AtomTermAdjust(SWI_MODULE);
|
||||
DBLOAD_MODULE = AtomTermAdjust(DBLOAD_MODULE);
|
||||
RANGE_MODULE = AtomTermAdjust(RANGE_MODULE);
|
||||
USER_MODULE = AtomTermAdjust(USER_MODULE);
|
||||
IDB_MODULE = AtomTermAdjust(IDB_MODULE);
|
||||
ATTRIBUTES_MODULE = AtomTermAdjust(ATTRIBUTES_MODULE);
|
||||
CHARSIO_MODULE = AtomTermAdjust(CHARSIO_MODULE);
|
||||
CHTYPE_MODULE = AtomTermAdjust(CHTYPE_MODULE);
|
||||
TERMS_MODULE = AtomTermAdjust(TERMS_MODULE);
|
||||
SYSTEM_MODULE = AtomTermAdjust(SYSTEM_MODULE);
|
||||
OPERATING_SYSTEM_MODULE = AtomTermAdjust(OPERATING_SYSTEM_MODULE);
|
||||
READUTIL_MODULE = AtomTermAdjust(READUTIL_MODULE);
|
||||
HACKS_MODULE = AtomTermAdjust(HACKS_MODULE);
|
||||
ARG_MODULE = AtomTermAdjust(ARG_MODULE);
|
||||
GLOBALS_MODULE = AtomTermAdjust(GLOBALS_MODULE);
|
||||
SWI_MODULE = AtomTermAdjust(SWI_MODULE);
|
||||
DBLOAD_MODULE = AtomTermAdjust(DBLOAD_MODULE);
|
||||
RANGE_MODULE = AtomTermAdjust(RANGE_MODULE);
|
||||
|
||||
CurrentModules = ModEntryPtrAdjust(CurrentModules);
|
||||
|
||||
RestoreHiddenPredicates();
|
||||
|
||||
RestoreFlags(GLOBAL_flagCount);
|
||||
CurrentModules = ModEntryPtrAdjust(CurrentModules);
|
||||
|
||||
RestorePredHash();
|
||||
|
||||
|
||||
|
||||
RestoreHiddenPredicates();
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreFlags(GLOBAL_flagCount);
|
||||
|
||||
|
||||
|
||||
RestorePredHash();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
#endif
|
||||
|
||||
CreepCode = PtoPredAdjust(CreepCode);
|
||||
UndefCode = PtoPredAdjust(UndefCode);
|
||||
SpyCode = PtoPredAdjust(SpyCode);
|
||||
PredFail = PtoPredAdjust(PredFail);
|
||||
PredTrue = PtoPredAdjust(PredTrue);
|
||||
|
||||
|
||||
CreepCode = PtoPredAdjust(CreepCode);
|
||||
UndefCode = PtoPredAdjust(UndefCode);
|
||||
SpyCode = PtoPredAdjust(SpyCode);
|
||||
PredFail = PtoPredAdjust(PredFail);
|
||||
PredTrue = PtoPredAdjust(PredTrue);
|
||||
#ifdef COROUTINING
|
||||
WakeUpCode = PtoPredAdjust(WakeUpCode);
|
||||
WakeUpCode = PtoPredAdjust(WakeUpCode);
|
||||
#endif
|
||||
PredGoalExpansion = PtoPredAdjust(PredGoalExpansion);
|
||||
PredMetaCall = PtoPredAdjust(PredMetaCall);
|
||||
PredTraceMetaCall = PtoPredAdjust(PredTraceMetaCall);
|
||||
PredDollarCatch = PtoPredAdjust(PredDollarCatch);
|
||||
PredRecordedWithKey = PtoPredAdjust(PredRecordedWithKey);
|
||||
PredLogUpdClause = PtoPredAdjust(PredLogUpdClause);
|
||||
PredLogUpdClauseErase = PtoPredAdjust(PredLogUpdClauseErase);
|
||||
PredLogUpdClause0 = PtoPredAdjust(PredLogUpdClause0);
|
||||
PredStaticClause = PtoPredAdjust(PredStaticClause);
|
||||
PredThrow = PtoPredAdjust(PredThrow);
|
||||
PredHandleThrow = PtoPredAdjust(PredHandleThrow);
|
||||
PredIs = PtoPredAdjust(PredIs);
|
||||
PredSafeCallCleanup = PtoPredAdjust(PredSafeCallCleanup);
|
||||
PredRestoreRegs = PtoPredAdjust(PredRestoreRegs);
|
||||
PredCommentHook = PtoPredAdjust(PredCommentHook);
|
||||
PredGoalExpansion = PtoPredAdjust(PredGoalExpansion);
|
||||
PredMetaCall = PtoPredAdjust(PredMetaCall);
|
||||
PredTraceMetaCall = PtoPredAdjust(PredTraceMetaCall);
|
||||
PredDollarCatch = PtoPredAdjust(PredDollarCatch);
|
||||
PredRecordedWithKey = PtoPredAdjust(PredRecordedWithKey);
|
||||
PredLogUpdClause = PtoPredAdjust(PredLogUpdClause);
|
||||
PredLogUpdClauseErase = PtoPredAdjust(PredLogUpdClauseErase);
|
||||
PredLogUpdClause0 = PtoPredAdjust(PredLogUpdClause0);
|
||||
PredStaticClause = PtoPredAdjust(PredStaticClause);
|
||||
PredThrow = PtoPredAdjust(PredThrow);
|
||||
PredHandleThrow = PtoPredAdjust(PredHandleThrow);
|
||||
PredIs = PtoPredAdjust(PredIs);
|
||||
PredSafeCallCleanup = PtoPredAdjust(PredSafeCallCleanup);
|
||||
PredRestoreRegs = PtoPredAdjust(PredRestoreRegs);
|
||||
PredCommentHook = PtoPredAdjust(PredCommentHook);
|
||||
#ifdef YAPOR
|
||||
PredGetwork = PtoPredAdjust(PredGetwork);
|
||||
PredGetworkSeq = PtoPredAdjust(PredGetworkSeq);
|
||||
PredGetwork = PtoPredAdjust(PredGetwork);
|
||||
PredGetworkSeq = PtoPredAdjust(PredGetworkSeq);
|
||||
#endif /* YAPOR */
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Yap_low_level_trace_lock);
|
||||
REINIT_LOCK(Yap_low_level_trace_lock);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DUMMYCODE->opc = Yap_opcode(_op_fail);
|
||||
FAILCODE->opc = Yap_opcode(_op_fail);
|
||||
NOCODE->opc = Yap_opcode(_Nstop);
|
||||
RestoreEnvInst(ENV_FOR_TRUSTFAIL, &TRUSTFAILCODE, _trust_fail, PredFail);
|
||||
|
||||
RestoreEnvInst(ENV_FOR_YESCODE, &YESCODE, _Ystop, PredFail);
|
||||
|
||||
RestoreOtaplInst(RTRYCODE, _retry_and_mark, PredFail);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DUMMYCODE->opc = Yap_opcode(_op_fail);
|
||||
FAILCODE->opc = Yap_opcode(_op_fail);
|
||||
NOCODE->opc = Yap_opcode(_Nstop);
|
||||
RestoreEnvInst(ENV_FOR_TRUSTFAIL,&TRUSTFAILCODE,_trust_fail,PredFail);
|
||||
|
||||
RestoreEnvInst(ENV_FOR_YESCODE,&YESCODE,_Ystop,PredFail);
|
||||
|
||||
RestoreOtaplInst(RTRYCODE,_retry_and_mark,PredFail);
|
||||
#ifdef BEAM
|
||||
BEAM_RETRY_CODE->opc = Yap_opcode(_beam_retry_code);
|
||||
BEAM_RETRY_CODE->opc = Yap_opcode(_beam_retry_code);
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
RestoreOtaplInst(GETWORK, _getwork, PredGetwork);
|
||||
RestoreOtaplInst(GETWORK_SEQ, _getwork_seq, PredGetworkSeq);
|
||||
GETWORK_FIRST_TIME->opc = Yap_opcode(_getwork_first_time);
|
||||
RestoreOtaplInst(GETWORK,_getwork,PredGetwork);
|
||||
RestoreOtaplInst(GETWORK_SEQ,_getwork_seq,PredGetworkSeq);
|
||||
GETWORK_FIRST_TIME->opc = Yap_opcode(_getwork_first_time);
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
RestoreOtaplInst(LOAD_ANSWER, _table_load_answer, PredFail);
|
||||
RestoreOtaplInst(TRY_ANSWER, _table_try_answer, PredFail);
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION, _table_answer_resolution, PredFail);
|
||||
RestoreOtaplInst(COMPLETION, _table_completion, PredFail);
|
||||
RestoreOtaplInst(LOAD_ANSWER,_table_load_answer,PredFail);
|
||||
RestoreOtaplInst(TRY_ANSWER,_table_try_answer,PredFail);
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION,_table_answer_resolution,PredFail);
|
||||
RestoreOtaplInst(COMPLETION,_table_completion,PredFail);
|
||||
#ifdef THREADS_CONSUMER_SHARING
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION_COMPLETION,
|
||||
_table_answer_resolution_completion, PredFail);
|
||||
RestoreOtaplInst(ANSWER_RESOLUTION_COMPLETION,_table_answer_resolution_completion,PredFail);
|
||||
#endif /* THREADS_CONSUMER_SHARING */
|
||||
#endif /* TABLING */
|
||||
|
||||
P_before_spy = PtoOpAdjust(P_before_spy);
|
||||
|
||||
RETRY_C_RECORDEDP_CODE = PtoOpAdjust(RETRY_C_RECORDEDP_CODE);
|
||||
RETRY_C_RECORDED_K_CODE = PtoOpAdjust(RETRY_C_RECORDED_K_CODE);
|
||||
|
||||
|
||||
P_before_spy = PtoOpAdjust(P_before_spy);
|
||||
|
||||
RETRY_C_RECORDEDP_CODE = PtoOpAdjust(RETRY_C_RECORDEDP_CODE);
|
||||
RETRY_C_RECORDED_K_CODE = PtoOpAdjust(RETRY_C_RECORDED_K_CODE);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(DBTermsListLock);
|
||||
REINIT_LOCK(DBTermsListLock);
|
||||
#endif
|
||||
RestoreDBTermsList();
|
||||
RestoreDBTermsList();
|
||||
|
||||
RestoreExpandList();
|
||||
|
||||
RestoreExpandList();
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(ExpandClausesListLock);
|
||||
REINIT_LOCK(OpListLock);
|
||||
REINIT_LOCK(ExpandClausesListLock);
|
||||
REINIT_LOCK(OpListLock);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
RestoreUdiControlBlocks();
|
||||
|
||||
RestoreIntKeys();
|
||||
RestoreIntLUKeys();
|
||||
RestoreIntBBKeys();
|
||||
RestoreUdiControlBlocks();
|
||||
|
||||
RestoreDBErasedMarker();
|
||||
RestoreLogDBErasedMarker();
|
||||
|
||||
RestoreDeadStaticClauses();
|
||||
RestoreDeadMegaClauses();
|
||||
RestoreDeadStaticIndices();
|
||||
RestoreDBErasedList();
|
||||
RestoreDBErasedIList();
|
||||
|
||||
|
||||
RestoreIntKeys();
|
||||
RestoreIntLUKeys();
|
||||
RestoreIntBBKeys();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreDBErasedMarker();
|
||||
RestoreLogDBErasedMarker();
|
||||
|
||||
RestoreDeadStaticClauses();
|
||||
RestoreDeadMegaClauses();
|
||||
RestoreDeadStaticIndices();
|
||||
RestoreDBErasedList();
|
||||
RestoreDBErasedIList();
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(DeadStaticClausesLock);
|
||||
REINIT_LOCK(DeadMegaClausesLock);
|
||||
REINIT_LOCK(DeadStaticIndicesLock);
|
||||
REINIT_LOCK(DeadStaticClausesLock);
|
||||
REINIT_LOCK(DeadMegaClausesLock);
|
||||
REINIT_LOCK(DeadStaticIndicesLock);
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
OpList = OpListAdjust(OpList);
|
||||
OpList = OpListAdjust(OpList);
|
||||
|
||||
RestoreForeignCode();
|
||||
RestoreForeignCode();
|
||||
|
||||
RestoreYapRecords();
|
||||
|
||||
RestoreSWIAtoms();
|
||||
|
||||
RestoreEmptyWakeups();
|
||||
|
||||
RestoreBlobTypes();
|
||||
RestoreBlobs();
|
||||
RestoreYapRecords();
|
||||
|
||||
RestoreSWIAtoms();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RestoreEmptyWakeups();
|
||||
|
||||
|
||||
RestoreBlobTypes();
|
||||
RestoreBlobs();
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(Blobs_Lock);
|
||||
REINIT_LOCK(Blobs_Lock);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/* This file, tatoms.h, was generated automatically by "yap -L misc/buildatoms"
|
||||
please do not update, update misc/ATOMS instead */
|
||||
|
||||
@ -161,6 +161,9 @@
|
||||
Atom AtomCharset_;
|
||||
#define AtomCharset Yap_heap_regs->AtomCharset_
|
||||
#define TermCharset MkAtomTerm( Yap_heap_regs->AtomCharset_ )
|
||||
Atom AtomChType_;
|
||||
#define AtomChType Yap_heap_regs->AtomChType_
|
||||
#define TermChType MkAtomTerm( Yap_heap_regs->AtomChType_ )
|
||||
Atom AtomCleanCall_;
|
||||
#define AtomCleanCall Yap_heap_regs->AtomCleanCall_
|
||||
#define TermCleanCall MkAtomTerm( Yap_heap_regs->AtomCleanCall_ )
|
||||
|
@ -59,16 +59,3 @@ static inline int si_callback(void *key, void *data, void *arg)
|
||||
return Yap_ClauseListExtend(c->cl, *cl, c->pred);
|
||||
}
|
||||
|
||||
#ifdef USE_JUDY
|
||||
#include <Judy.h>
|
||||
/* Judy1 integer sparse set intersection */
|
||||
static inline int j1_callback(void *key, void *data, void *arg)
|
||||
{
|
||||
int r;
|
||||
Pvoid_t *arrayP = (Pvoid_t *) arg;
|
||||
J1S(r, *arrayP, (Word_t) data);
|
||||
if (r == JERR)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
@ -252,7 +252,7 @@ check_function_exists( labs HAVE_LABS )
|
||||
check_function_exists( link HAVE_LINK)
|
||||
check_function_exists( localtime HAVE_LOCALTIME )
|
||||
check_function_exists( lstat HAVE_LSTAT )
|
||||
check_function_exists(mallinfo HAVE_MALLINFO)
|
||||
check_symbol_exists( mallinfo " malloc.h" HAVE_MALLINFO)
|
||||
check_function_exists(mbscoll HAVE_MBSCOLL)
|
||||
check_function_exists(mbscasecoll HAVE_MBSCASECOLL)
|
||||
check_function_exists(mbsnrtowcs HAVE_MBSNRTOWCS)
|
||||
|
@ -1613,17 +1613,17 @@ signal. */
|
||||
|
||||
/* malloc_t */
|
||||
#ifndef MALLOC_T
|
||||
#cmakedefine MALLOC_T "${MALLOC_T}"
|
||||
#define MALLOC_T "void *"
|
||||
#endif
|
||||
|
||||
/* max number of threads, default 1 or 1024 */
|
||||
#ifndef MAX_THRADS
|
||||
#cmakedefine MAX_THREADS ${MAX_THREADS}
|
||||
#ifndef MAX_THREADS
|
||||
#define MAX_THREADS ${MAX_THREADS}
|
||||
#endif
|
||||
|
||||
/* maximum amount of or-parallelism */
|
||||
#ifndef MAX_WORKERS
|
||||
#cmakedefine MAX_WORKERS ${MAX_WORKERS}
|
||||
#define MAX_WORKERS ${MAX_WORKERS}
|
||||
#endif
|
||||
|
||||
/* o not use realloc() from HP-UX 10.20 together with MPI */
|
||||
@ -1818,37 +1818,37 @@ signal. */
|
||||
|
||||
/* use Doug Lea's malloc for all allocation */
|
||||
#ifndef USE_DL_MALLOC
|
||||
#cmakedefine USE_DL_MALLOC ${USE_DL_MALLOC}
|
||||
#define USE_DL_MALLOC ${USE_DL_MALLOC}
|
||||
#endif
|
||||
|
||||
/* use bignums/rationals in YAP code. */
|
||||
#ifndef USE_GMP
|
||||
#cmakedefine USE_GMP ${USE_GMP}
|
||||
#define USE_GMP ${USE_GMP}
|
||||
#endif
|
||||
|
||||
/* use Judy library for UDI indexing in YAP code. */
|
||||
#ifndef USE_JUDY
|
||||
#cmakedefine USE_JUDY ${USE_JUDY}
|
||||
#define USE_JUDY ${USE_JUDY}
|
||||
#endif
|
||||
|
||||
/* do not use our own locking routines */
|
||||
#ifndef USE_PTHREAD_LOCKING
|
||||
#cmakedefine USE_PTHREAD_LOCKING ${USE_PTHREAD_LOCKING}
|
||||
#define USE_PTHREAD_LOCKING ${USE_PTHREAD_LOCKING}
|
||||
#endif
|
||||
|
||||
/* use OS malloc for all allocation */
|
||||
#ifndef USE_SYSTEM_MALLOC
|
||||
#cmakedefine USE_SYSTEM_MALLOC ${USE_SYSTEM_MALLOC}
|
||||
#define USE_SYSTEM_MALLOC ${USE_SYSTEM_MALLOC}
|
||||
#endif
|
||||
|
||||
/* use mmap in or-parallel allocation */
|
||||
#ifndef USE_SYSTEM_MMAP
|
||||
#cmakedefine USE_SYSTEM_MMAP ${USE_SYSTEM_MMAP}
|
||||
#define USE_SYSTEM_MMAP ${USE_SYSTEM_MMAP}
|
||||
#endif
|
||||
|
||||
/* use shm in or-parallel allocation */
|
||||
#ifndef USE_SYSTEM_SHM
|
||||
#cmakedefine USE_SYSTEM_SHM ${USE_SYSTEM_SHM}
|
||||
#define USE_SYSTEM_SHM ${USE_SYSTEM_SHM}
|
||||
#endif
|
||||
|
||||
/* Whether daylight savings time offset is set via the altzone variable */
|
||||
|
@ -131,6 +131,7 @@ BEGIN_ERRORS()
|
||||
E(TYPE_ERROR_CALLABLE, TYPE_ERROR, "callable")
|
||||
E(TYPE_ERROR_CHAR, TYPE_ERROR, "char")
|
||||
E(TYPE_ERROR_CHARACTER, TYPE_ERROR, "character")
|
||||
E(TYPE_ERROR_CHARACTER_CODE, TYPE_ERROR, "character_code")
|
||||
E(TYPE_ERROR_COMPOUND, TYPE_ERROR, "compound")
|
||||
E(TYPE_ERROR_DBREF, TYPE_ERROR, "dbref")
|
||||
E(TYPE_ERROR_DBTERM, TYPE_ERROR, "dbterm")
|
||||
|
@ -60,6 +60,7 @@ A Character N "character"
|
||||
A CharacterCode N "character_code"
|
||||
A Chars N "chars"
|
||||
A Charset N "charset"
|
||||
A ChType F "$char_type"
|
||||
A CleanCall F "$clean_call"
|
||||
A Colomn N ":"
|
||||
A CodeSpace N "code_space"
|
||||
|
@ -94,6 +94,7 @@ Term user_module USER_MODULE MkAT AtomUser
|
||||
Term idb_module IDB_MODULE MkAT AtomIDB
|
||||
Term attributes_module ATTRIBUTES_MODULE MkAT AtomAttributes
|
||||
Term charsio_module CHARSIO_MODULE MkAT AtomCharsio
|
||||
Term chtype_module CHTYPE_MODULE MkAT AtomChType
|
||||
Term terms_module TERMS_MODULE MkAT AtomTerms
|
||||
Term system_module SYSTEM_MODULE MkAT AtomSystem
|
||||
Term operating_system_module OPERATING_SYSTEM_MODULE MkAT AtomOperatingSystemSupport
|
||||
|
30
os/charsio.c
30
os/charsio.c
@ -172,7 +172,7 @@ static Int at_end_of_stream_0(USES_REGS1) { /* at_end_of_stream */
|
||||
return out;
|
||||
}
|
||||
|
||||
static int yap_fflush(sno) {
|
||||
static int yap_fflush(int sno) {
|
||||
Yap_ReadlineFlush(sno);
|
||||
if ((GLOBAL_Stream[sno].status & Output_Stream_f) &&
|
||||
!(GLOBAL_Stream[sno].status &
|
||||
@ -186,11 +186,11 @@ static int yap_fflush(sno) {
|
||||
static Int get(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
||||
int ch;
|
||||
Int status;
|
||||
//Int status;
|
||||
|
||||
if (sno < 0)
|
||||
return FALSE;
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
||||
;
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
@ -200,11 +200,11 @@ static Int get(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||
static Int get_char(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
||||
int ch;
|
||||
Int status;
|
||||
// Int status;
|
||||
|
||||
if (sno < 0)
|
||||
return FALSE;
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
ch = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
return (Yap_unify_constant(ARG2, MkCharTerm(ch)));
|
||||
@ -212,12 +212,12 @@ static Int get_char(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||
|
||||
static Int get_code(USES_REGS1) { /* get0(Stream,-N) */
|
||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
||||
Int status;
|
||||
//Int status;
|
||||
Int out;
|
||||
|
||||
if (sno < 0)
|
||||
return (FALSE);
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
return (Yap_unify_constant(ARG2, MkIntegerTerm(out)));
|
||||
@ -226,10 +226,10 @@ static Int get_code(USES_REGS1) { /* get0(Stream,-N) */
|
||||
static Int get_1(USES_REGS1) { /* get_code1(Stream,-N) */
|
||||
int sno = LOCAL_c_input_stream;
|
||||
int ch;
|
||||
Int status;
|
||||
//Int status;
|
||||
|
||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
||||
;
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
@ -238,10 +238,10 @@ static Int get_1(USES_REGS1) { /* get_code1(Stream,-N) */
|
||||
|
||||
static Int getcode_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||
int sno = LOCAL_c_input_stream;
|
||||
Int status;
|
||||
//Int status;
|
||||
Int out;
|
||||
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
@ -250,11 +250,11 @@ static Int getcode_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||
|
||||
static Int getchar_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||
int sno = LOCAL_c_input_stream;
|
||||
Int status;
|
||||
//Int status;
|
||||
Int out;
|
||||
|
||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
return (Yap_unify_constant(ARG1, MkCharTerm(out)));
|
||||
@ -262,7 +262,7 @@ static Int getchar_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||
|
||||
static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */
|
||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
||||
Int status;
|
||||
//Int status;
|
||||
Term out;
|
||||
Int ch = '\0';
|
||||
int rewind;
|
||||
@ -270,7 +270,7 @@ static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */
|
||||
if (sno < 0)
|
||||
return (FALSE);
|
||||
rewind = FALSE;
|
||||
status = GLOBAL_Stream[sno].status;
|
||||
//status = GLOBAL_Stream[sno].status;
|
||||
out = read_line(sno);
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
if (rewind)
|
||||
|
576
os/chartypes.c
576
os/chartypes.c
@ -1,23 +1,22 @@
|
||||
/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: charcodes.c *
|
||||
* Last rev: 5/2/88 *
|
||||
* mods: *
|
||||
* comments: Character codes and character conversion *
|
||||
* *
|
||||
*************************************************************************/
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: charcodes.c *
|
||||
* Last rev: 5/2/88 *
|
||||
* mods: *
|
||||
* comments: Character codes and character conversion *
|
||||
* *
|
||||
*************************************************************************/
|
||||
#ifdef SCCS
|
||||
static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file includes the definition of a pipe related IO.
|
||||
*
|
||||
@ -27,6 +26,7 @@ static char SccsId[] = "%W% %G%";
|
||||
#include "Yatom.h"
|
||||
#include "YapHeap.h"
|
||||
#include "yapio.h"
|
||||
#include "YapText.h"
|
||||
#include <stdlib.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@ -34,6 +34,12 @@ static char SccsId[] = "%W% %G%";
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#if HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#if HAVE_WCTYPE_H
|
||||
#include <wctype.h>
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if HAVE_IO_H
|
||||
/* Windows */
|
||||
@ -51,11 +57,10 @@ static char SccsId[] = "%W% %G%";
|
||||
#include "eval.h"
|
||||
|
||||
static Int p_change_type_of_char(USES_REGS1);
|
||||
static Int p_type_of_char(USES_REGS1);
|
||||
|
||||
Term Yap_StringToNumberTerm(char *s, encoding_t *encp) {
|
||||
CACHE_REGS
|
||||
int sno;
|
||||
int sno;
|
||||
Term t;
|
||||
|
||||
sno = Yap_open_buf_read_stream(s, strlen(s), encp, MEM_BUF_USER);
|
||||
@ -65,7 +70,7 @@ Term Yap_StringToNumberTerm(char *s, encoding_t *encp) {
|
||||
GLOBAL_Stream[sno].encoding = *encp;
|
||||
else
|
||||
GLOBAL_Stream[sno].encoding = LOCAL_encoding;
|
||||
while (*s && isblank(*s++))
|
||||
while (*s && iswblank(*s++))
|
||||
;
|
||||
t = Yap_scan_num(GLOBAL_Stream + sno);
|
||||
Yap_CloseStream(sno);
|
||||
@ -82,15 +87,15 @@ typedef struct enc_map {
|
||||
} enc_map_t;
|
||||
|
||||
static enc_map_t ematches[] = {
|
||||
{"UTF-8", ENC_ISO_UTF8},
|
||||
{"UTF-16", ENC_UTF16_LE}, // ok, this is a very bad name
|
||||
{"UCS-2", ENC_UTF16_LE}, // ok, this is probably gone by now
|
||||
{"ISO-LATIN1", ENC_ISO_LATIN1},
|
||||
{"ISO-8859-1", ENC_ISO_LATIN1},
|
||||
{"Windows-1252", ENC_ISO_LATIN1}, // almost, but not quite
|
||||
{"CP-1252", ENC_ISO_LATIN1},
|
||||
{"C", ENC_ISO_ASCII},
|
||||
{NULL, ENC_OCTET}};
|
||||
{"UTF-8", ENC_ISO_UTF8},
|
||||
{"UTF-16", ENC_UTF16_LE}, // ok, this is a very bad name
|
||||
{"UCS-2", ENC_UTF16_LE}, // ok, this is probably gone by now
|
||||
{"ISO-LATIN1", ENC_ISO_LATIN1},
|
||||
{"ISO-8859-1", ENC_ISO_LATIN1},
|
||||
{"Windows-1252", ENC_ISO_LATIN1}, // almost, but not quite
|
||||
{"CP-1252", ENC_ISO_LATIN1},
|
||||
{"C", ENC_ISO_ASCII},
|
||||
{NULL, ENC_OCTET}};
|
||||
|
||||
static encoding_t DefaultEncoding(void) {
|
||||
encoding_t rc;
|
||||
@ -114,8 +119,8 @@ static encoding_t DefaultEncoding(void) {
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// by default, return UTF-8
|
||||
// except in _WIN32
|
||||
// by default, return UTF-8
|
||||
// except in _WIN32
|
||||
#ifdef _WIN32
|
||||
rc = ENC_UTF16_BE;
|
||||
#else
|
||||
@ -132,12 +137,12 @@ static encoding_t DefaultEncoding(void) {
|
||||
|
||||
encoding_t Yap_DefaultEncoding(void) {
|
||||
CACHE_REGS
|
||||
return LOCAL_encoding;
|
||||
return LOCAL_encoding;
|
||||
}
|
||||
|
||||
void Yap_SetDefaultEncoding(encoding_t new_encoding) {
|
||||
CACHE_REGS
|
||||
LOCAL_encoding = new_encoding;
|
||||
LOCAL_encoding = new_encoding;
|
||||
}
|
||||
|
||||
static Int get_default_encoding(USES_REGS1) {
|
||||
@ -147,7 +152,7 @@ static Int get_default_encoding(USES_REGS1) {
|
||||
|
||||
static Int p_encoding(USES_REGS1) { /* '$encoding'(Stream,N) */
|
||||
int sno =
|
||||
Yap_CheckStream(ARG1, Input_Stream_f | Output_Stream_f, "encoding/2");
|
||||
Yap_CheckStream(ARG1, Input_Stream_f | Output_Stream_f, "encoding/2");
|
||||
Term t = Deref(ARG2);
|
||||
if (sno < 0)
|
||||
return FALSE;
|
||||
@ -187,7 +192,7 @@ static Int tolower2(USES_REGS1) {
|
||||
}
|
||||
|
||||
static Int
|
||||
p_change_type_of_char(USES_REGS1) { /* change_type_of_char(+char,+type) */
|
||||
p_change_type_of_char(USES_REGS1) { /* change_type_of_char(+char,+type) */
|
||||
Term t1 = Deref(ARG1);
|
||||
Term t2 = Deref(ARG2);
|
||||
if (!IsVarTerm(t1) && !IsIntegerTerm(t1))
|
||||
@ -198,16 +203,366 @@ static Int
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Int p_type_of_char(USES_REGS1) { /* type_of_char(+char,-type) */
|
||||
Term t;
|
||||
|
||||
Term t1 = Deref(ARG1);
|
||||
if (!IsVarTerm(t1) && !IsIntegerTerm(t1))
|
||||
return FALSE;
|
||||
t = MkIntTerm(Yap_chtype[IntegerOfTerm(t1)]);
|
||||
return Yap_unify(t, ARG2);
|
||||
static int get_char(Term t) {
|
||||
if (IsVarTerm(t = Deref(t))) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
if (!IsAtomTerm(t)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
Atom at = AtomOfTerm(t);
|
||||
if (IsWideAtom(at)) {
|
||||
wchar_t *s0 = RepAtom(AtomOfTerm(t))->WStrOfAE;
|
||||
if (s0[1] != '\0') {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
return s0[0];
|
||||
} else {
|
||||
char *s0 = RepAtom(AtomOfTerm(t))->StrOfAE;
|
||||
if (s0[1] != '\0') {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
return s0[0];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_code(Term t) {
|
||||
if (IsVarTerm(t = Deref(t))) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
if (!IsIntegerTerm(t)) {
|
||||
Yap_Error(TYPE_ERROR_CHARACTER_CODE, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
Int ch = IntegerOfTerm(t);
|
||||
if (ch < -1) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER_CODE, t, NULL);
|
||||
return 0;
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
static Int char_type_alnum(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC || k == LC || k == NU;
|
||||
}
|
||||
|
||||
static Int char_type_alpha(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC || k == LC;
|
||||
}
|
||||
|
||||
static Int char_type_csym(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= NU;
|
||||
}
|
||||
|
||||
static Int char_type_csymf(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= LC;
|
||||
}
|
||||
|
||||
static Int char_type_ascii(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
return isascii(ch);
|
||||
}
|
||||
|
||||
static Int char_type_white(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k >= UC && k <= LC;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_ZS;
|
||||
}
|
||||
|
||||
static Int char_type_digit(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == NU;
|
||||
}
|
||||
|
||||
static Int char_type_xdigit(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
#if HAVE_ISWXDIGIT
|
||||
return iswxdigit( ch );
|
||||
#elif HAVE_ISWHEXNUMBER
|
||||
return iswhexnumber(ch);
|
||||
#else
|
||||
return iswdigit(ch) || ( (ch >= 'a' && ch <= 'f') &&
|
||||
(ch >= 'A' && ch <= 'F') );
|
||||
#endif
|
||||
}
|
||||
|
||||
static Int char_type_graph(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
return iswgraph(ch);
|
||||
}
|
||||
|
||||
static Int char_type_lower(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == LC;
|
||||
}
|
||||
|
||||
static Int char_type_upper(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC;
|
||||
}
|
||||
|
||||
static Int char_type_punct(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k >= QT && k <= BK;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static Int char_type_space(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k == BS;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return (ct >= UTF8PROC_CATEGORY_ZS && ct <= UTF8PROC_CATEGORY_PO);
|
||||
}
|
||||
|
||||
static Int char_type_end_of_file(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
return ch == WEOF || ch == -1;
|
||||
}
|
||||
|
||||
static Int char_type_end_of_line(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
return ch >= 10 && ch <= 13;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return (ct >= UTF8PROC_CATEGORY_ZL && ct <= UTF8PROC_CATEGORY_ZP);
|
||||
}
|
||||
|
||||
static Int char_type_newline(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
return ch == 10;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static Int char_type_period(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
return ch == '.' || ch == '!' || ch == '?';
|
||||
}
|
||||
|
||||
static Int char_type_quote(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_PI || ct == UTF8PROC_CATEGORY_PF;
|
||||
}
|
||||
|
||||
static Int char_type_paren(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_PS || ct == UTF8PROC_CATEGORY_PE;
|
||||
}
|
||||
|
||||
static Int char_type_prolog_var_start(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == LC || ch == '_';
|
||||
}
|
||||
|
||||
static Int char_type_prolog_atom_start(USES_REGS1) {
|
||||
Int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC;
|
||||
}
|
||||
|
||||
static Int char_type_prolog_identifier_continue(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= NU;
|
||||
}
|
||||
|
||||
static Int char_type_prolog_symbol(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == SL && k == SY;
|
||||
}
|
||||
|
||||
static Int code_type_alnum(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC || k == LC || k == NU;
|
||||
}
|
||||
|
||||
static Int code_type_alpha(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC || k == LC;
|
||||
}
|
||||
|
||||
static Int code_type_csym(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= NU;
|
||||
}
|
||||
|
||||
static Int code_type_csymf(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= LC;
|
||||
}
|
||||
|
||||
static Int code_type_ascii(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
return isascii(ch);
|
||||
}
|
||||
|
||||
static Int code_type_white(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k >= UC && k <= LC;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_ZS;
|
||||
}
|
||||
|
||||
static Int code_type_digit(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == NU;
|
||||
}
|
||||
|
||||
static Int code_type_xdigit(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
#if HAVE_ISWXDIGIT
|
||||
return iswxdigit( ch );
|
||||
#elif HAVE_ISWHEXNUMBER
|
||||
return iswhexnumber(ch);
|
||||
#else
|
||||
return iswdigit(ch) || ( (ch >= 'a' && ch <= 'f') &&
|
||||
(ch >= 'A' && ch <= 'F') );
|
||||
#endif
|
||||
}
|
||||
|
||||
static Int code_type_graph(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
return iswgraph(ch);
|
||||
}
|
||||
|
||||
static Int code_type_lower(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == LC;
|
||||
}
|
||||
|
||||
static Int code_type_upper(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC;
|
||||
}
|
||||
|
||||
static Int code_type_punct(USES_REGS1) {
|
||||
int ch = get_char(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k >= QT && k <= BK;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static Int code_type_space(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
if (ch < 256) {
|
||||
char_kind_t k = Yap_chtype[ch];
|
||||
return k == BS;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return (ct >= UTF8PROC_CATEGORY_ZS && ct <= UTF8PROC_CATEGORY_PO);
|
||||
}
|
||||
|
||||
static Int code_type_end_of_file(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
return ch == WEOF || ch == -1;
|
||||
}
|
||||
|
||||
static Int code_type_end_of_line(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
if (ch < 256) {
|
||||
return ch >= 10 && ch <= 13;
|
||||
}
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return (ct >= UTF8PROC_CATEGORY_ZL && ct <= UTF8PROC_CATEGORY_ZP);
|
||||
}
|
||||
|
||||
static Int code_type_newline(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
if (ch < 256) {
|
||||
return ch == 10;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static Int code_type_period(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
return ch == '.' || ch == '!' || ch == '?';
|
||||
}
|
||||
|
||||
static Int code_type_quote(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_PI || ct == UTF8PROC_CATEGORY_PF;
|
||||
}
|
||||
|
||||
static Int code_type_paren(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
utf8proc_category_t ct = utf8proc_category(ch);
|
||||
return ct == UTF8PROC_CATEGORY_PS || ct == UTF8PROC_CATEGORY_PE;
|
||||
}
|
||||
|
||||
static Int code_type_prolog_var_start(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == LC || ch == '_';
|
||||
}
|
||||
|
||||
static Int code_type_prolog_atom_start(USES_REGS1) {
|
||||
Int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == UC;
|
||||
}
|
||||
|
||||
static Int code_type_prolog_identifier_continue(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k >= UC && k <= NU;
|
||||
}
|
||||
|
||||
static Int code_type_prolog_symbol(USES_REGS1) {
|
||||
int ch = get_code(ARG1);
|
||||
char_kind_t k = Yap_wide_chtype(ch);
|
||||
return k == SL && k == SY;
|
||||
}
|
||||
|
||||
|
||||
int ISOWGetc(int sno) {
|
||||
int ch = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||
if (ch != EOF && GLOBAL_CharConversionTable != NULL) {
|
||||
@ -239,27 +594,28 @@ static Int p_disable_char_conversion(USES_REGS1) {
|
||||
|
||||
for (i = 0; i < MaxStreams; i++) {
|
||||
if (!(GLOBAL_Stream[i].status & Free_Stream_f))
|
||||
GLOBAL_Stream[i].stream_wgetc_for_read = GLOBAL_Stream[i].stream_wgetc;
|
||||
GLOBAL_Stream[i].stream_wgetc_for_read =
|
||||
GLOBAL_Stream[i].stream_wgetc;
|
||||
}
|
||||
GLOBAL_CharConversionTable = NULL;
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
static Int char_conversion(USES_REGS1) {
|
||||
Term t0 = Deref(ARG1), t1 = Deref(ARG2);
|
||||
Term t = Deref(ARG1), t1 = Deref(ARG2);
|
||||
unsigned char *s0, *s1;
|
||||
|
||||
if (IsVarTerm(t0)) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t0, "char_conversion/2");
|
||||
if (IsVarTerm(t)) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t, "char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
if (!IsAtomTerm(t0)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t0, "char_conversion/2");
|
||||
if (!IsAtomTerm(t)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t, "char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
s0 = RepAtom(AtomOfTerm(t0))->UStrOfAE;
|
||||
s0 = RepAtom(AtomOfTerm(t))->UStrOfAE;
|
||||
if (s0[1] != '\0') {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t0, "char_conversion/2");
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t, "char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
if (IsVarTerm(t1)) {
|
||||
@ -283,17 +639,17 @@ static Int char_conversion(USES_REGS1) {
|
||||
if (s0[0] == s1[0])
|
||||
return (TRUE);
|
||||
GLOBAL_CharConversionTable2 =
|
||||
Yap_AllocCodeSpace(NUMBER_OF_CHARS * sizeof(char));
|
||||
Yap_AllocCodeSpace(NUMBER_OF_CHARS * sizeof(char));
|
||||
while (GLOBAL_CharConversionTable2 == NULL) {
|
||||
if (!Yap_growheap(FALSE, NUMBER_OF_CHARS * sizeof(char), NULL)) {
|
||||
Yap_Error(RESOURCE_ERROR_HEAP, TermNil, LOCAL_ErrorMessage);
|
||||
return (FALSE);
|
||||
Yap_Error(RESOURCE_ERROR_HEAP, TermNil, LOCAL_ErrorMessage);
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
if (trueGlobalPrologFlag(CHAR_CONVERSION_FLAG)) {
|
||||
CACHE_REGS
|
||||
if (p_force_char_conversion(PASS_REGS1) == FALSE)
|
||||
return (FALSE);
|
||||
if (p_force_char_conversion(PASS_REGS1) == FALSE)
|
||||
return (FALSE);
|
||||
}
|
||||
for (i = 0; i < NUMBER_OF_CHARS; i++)
|
||||
GLOBAL_CharConversionTable2[i] = i;
|
||||
@ -305,24 +661,26 @@ static Int char_conversion(USES_REGS1) {
|
||||
}
|
||||
|
||||
static Int p_current_char_conversion(USES_REGS1) {
|
||||
Term t0, t1;
|
||||
Term t, t1;
|
||||
unsigned char *s0, *s1;
|
||||
|
||||
if (GLOBAL_CharConversionTable == NULL) {
|
||||
return (FALSE);
|
||||
}
|
||||
t0 = Deref(ARG1);
|
||||
if (IsVarTerm(t0)) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t0, "current_char_conversion/2");
|
||||
t = Deref(ARG1);
|
||||
if (IsVarTerm(t)) {
|
||||
Yap_Error(INSTANTIATION_ERROR, t, "current_char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
if (!IsAtomTerm(t0)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t0, "current_char_conversion/2");
|
||||
if (!IsAtomTerm(t)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t,
|
||||
"current_char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
s0 = RepAtom(AtomOfTerm(t0))->UStrOfAE;
|
||||
s0 = RepAtom(AtomOfTerm(t))->UStrOfAE;
|
||||
if (s0[1] != '\0') {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t0, "current_char_conversion/2");
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t,
|
||||
"current_char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
t1 = Deref(ARG2);
|
||||
@ -335,16 +693,18 @@ static Int p_current_char_conversion(USES_REGS1) {
|
||||
return (Yap_unify(ARG2, MkAtomTerm(Yap_LookupAtom(out))));
|
||||
}
|
||||
if (!IsAtomTerm(t1)) {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t1, "current_char_conversion/2");
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t1,
|
||||
"current_char_conversion/2");
|
||||
return (FALSE);
|
||||
}
|
||||
s1 = RepAtom(AtomOfTerm(t1))->UStrOfAE;
|
||||
if (s1[1] != '\0') {
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t1, "current_char_conversion/2");
|
||||
Yap_Error(REPRESENTATION_ERROR_CHARACTER, t1,
|
||||
"current_char_conversion/2");
|
||||
return (FALSE);
|
||||
} else {
|
||||
return (GLOBAL_CharConversionTable[(int)s0[0]] == '\0' &&
|
||||
GLOBAL_CharConversionTable[(int)s0[0]] == s1[0]);
|
||||
GLOBAL_CharConversionTable[(int)s0[0]] == s1[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -375,24 +735,88 @@ static Int p_all_char_conversions(USES_REGS1) {
|
||||
void Yap_InitChtypes(void) {
|
||||
DefaultEncoding();
|
||||
Yap_InitCPred("$change_type_of_char", 2, p_change_type_of_char,
|
||||
SafePredFlag | SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("$type_of_char", 2, p_type_of_char,
|
||||
SafePredFlag | SyncPredFlag | HiddenPredFlag);
|
||||
SafePredFlag | SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("toupper", 2, toupper2, SafePredFlag);
|
||||
Yap_InitCPred("tolower", 2, tolower2, SafePredFlag);
|
||||
Yap_InitCPred("char_conversion", 2, char_conversion, SyncPredFlag);
|
||||
|
||||
Yap_InitCPred("$get_default_encoding", 1, get_default_encoding,
|
||||
SafePredFlag | HiddenPredFlag);
|
||||
SafePredFlag | HiddenPredFlag);
|
||||
|
||||
Yap_InitCPred("$encoding", 2, p_encoding, SafePredFlag | SyncPredFlag),
|
||||
|
||||
Yap_InitCPred("$current_char_conversion", 2, p_current_char_conversion,
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("$current_char_conversion", 2,
|
||||
p_current_char_conversion,
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("$all_char_conversions", 1, p_all_char_conversions,
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("$force_char_conversion", 0, p_force_char_conversion,
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
Yap_InitCPred("$disable_char_conversion", 0, p_disable_char_conversion,
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
}
|
||||
SyncPredFlag | HiddenPredFlag);
|
||||
CurrentModule = CHTYPE_MODULE;
|
||||
Yap_InitCPred("char_type_alnum", 1, char_type_alnum, SafePredFlag);
|
||||
Yap_InitCPred("char_type_alpha", 1, char_type_alpha, SafePredFlag);
|
||||
Yap_InitCPred("char_type_csym", 1, char_type_csym, SafePredFlag);
|
||||
Yap_InitCPred("char_type_csymf", 1, char_type_csymf, SafePredFlag);
|
||||
Yap_InitCPred("char_type_ascii", 1, char_type_ascii, SafePredFlag);
|
||||
Yap_InitCPred("char_type_white", 1, char_type_white, SafePredFlag);
|
||||
Yap_InitCPred("char_type_digit", 1, char_type_digit, SafePredFlag);
|
||||
Yap_InitCPred("char_type_xdigit", 1, char_type_xdigit, SafePredFlag);
|
||||
Yap_InitCPred("char_type_graph", 1, char_type_graph, SafePredFlag);
|
||||
Yap_InitCPred("char_type_lower", 1, char_type_lower, SafePredFlag);
|
||||
Yap_InitCPred("char_type_upper", 1, char_type_upper, SafePredFlag);
|
||||
Yap_InitCPred("char_type_punct", 1, char_type_punct, SafePredFlag);
|
||||
Yap_InitCPred("char_type_space", 1, char_type_space, SafePredFlag);
|
||||
Yap_InitCPred("char_type_end_of_file", 1, char_type_end_of_file,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("char_type_end_of_line", 1, char_type_end_of_line,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("char_type_newline", 1, char_type_newline, SafePredFlag);
|
||||
Yap_InitCPred("char_type_period", 1, char_type_period, SafePredFlag);
|
||||
Yap_InitCPred("char_type_quote", 1, char_type_quote, SafePredFlag);
|
||||
Yap_InitCPred("char_type_paren", 1, char_type_paren, SafePredFlag);
|
||||
Yap_InitCPred("char_type_prolog_var_start", 1, char_type_prolog_var_start,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("char_type_prolog_symbol", 1, char_type_prolog_symbol,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("char_type_prolog_atom_start", 1,
|
||||
char_type_prolog_atom_start, SafePredFlag);
|
||||
Yap_InitCPred("char_type_prolog_identifier_continue", 1,
|
||||
char_type_prolog_identifier_continue, SafePredFlag);
|
||||
Yap_InitCPred("char_typetype_prolog_symbol", 1,
|
||||
char_type_prolog_symbol,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("code_type_alnum", 1, code_type_alnum, SafePredFlag);
|
||||
Yap_InitCPred("code_type_alpha", 1, code_type_alpha, SafePredFlag);
|
||||
Yap_InitCPred("code_type_csym", 1, code_type_csym, SafePredFlag);
|
||||
Yap_InitCPred("code_type_csymf", 1, code_type_csymf, SafePredFlag);
|
||||
Yap_InitCPred("code_type_ascii", 1, code_type_ascii, SafePredFlag);
|
||||
Yap_InitCPred("code_type_white", 1, code_type_white, SafePredFlag);
|
||||
Yap_InitCPred("code_type_digit", 1, code_type_digit, SafePredFlag);
|
||||
Yap_InitCPred("code_type_xdigit", 1, code_type_xdigit, SafePredFlag);
|
||||
Yap_InitCPred("code_type_graph", 1, code_type_graph, SafePredFlag);
|
||||
Yap_InitCPred("code_type_lower", 1, code_type_lower, SafePredFlag);
|
||||
Yap_InitCPred("code_type_upper", 1, code_type_upper, SafePredFlag);
|
||||
Yap_InitCPred("code_type_punct", 1, code_type_punct, SafePredFlag);
|
||||
Yap_InitCPred("code_type_space", 1, code_type_space, SafePredFlag);
|
||||
Yap_InitCPred("code_type_end_of_file", 1, code_type_end_of_file,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("code_type_end_of_line", 1, code_type_end_of_line,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("code_type_newline", 1, code_type_newline, SafePredFlag);
|
||||
Yap_InitCPred("code_type_period", 1, code_type_period, SafePredFlag);
|
||||
Yap_InitCPred("code_type_quote", 1, code_type_quote, SafePredFlag);
|
||||
Yap_InitCPred("code_type_paren", 1, code_type_paren, SafePredFlag);
|
||||
Yap_InitCPred("code_type_prolog_var_start", 1,
|
||||
code_type_prolog_var_start, SafePredFlag);
|
||||
Yap_InitCPred("code_type_prolog_symbol", 1, code_type_prolog_symbol,
|
||||
SafePredFlag);
|
||||
Yap_InitCPred("code_type_prolog_atom_start", 1,
|
||||
code_type_prolog_atom_start, SafePredFlag);
|
||||
Yap_InitCPred("code_type_prolog_identifier_continue", 1,
|
||||
code_type_prolog_identifier_continue, SafePredFlag);
|
||||
Yap_InitCPred("code_type_prolog_symbol", 1, code_type_prolog_symbol,
|
||||
SafePredFlag);
|
||||
CurrentModule = PROLOG_MODULE;
|
||||
}
|
||||
|
2291
os/chartypes.yap
2291
os/chartypes.yap
File diff suppressed because it is too large
Load Diff
@ -93,6 +93,7 @@ static inline const char *enc_name(encoding_t enc)
|
||||
case ENC_UTF16_LE: return "utf16_le";
|
||||
case ENC_ISO_UTF32_BE: return "utf32_be";
|
||||
case ENC_ISO_UTF32_LE: return "utf32_le";
|
||||
default: return "thanks for watching!!";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
||||
{
|
||||
char tmp1[TMP_STRING_SIZE], *tmpbase;
|
||||
int ch;
|
||||
int column_boundary;
|
||||
Term mytargs[8], *targs;
|
||||
Int tnum, targ;
|
||||
const char *fstr = NULL, *fptr;
|
||||
@ -320,7 +319,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
||||
args = oargs;
|
||||
tail = otail;
|
||||
targ = 0;
|
||||
column_boundary = 0;
|
||||
if (IsVarTerm(tail)) {
|
||||
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
||||
return(FALSE);
|
||||
@ -782,7 +780,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
||||
while (repeats--) {
|
||||
f_putc(sno, (int) '\n');
|
||||
}
|
||||
column_boundary = 0;
|
||||
finfo.padders = 0;
|
||||
break;
|
||||
case 'N':
|
||||
@ -790,14 +787,12 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
||||
has_repeats = 1;
|
||||
if (GLOBAL_Stream[sno].linepos != 0) {
|
||||
f_putc(sno, '\n');
|
||||
column_boundary = 0;
|
||||
finfo.padders = 0;
|
||||
}
|
||||
if (repeats > 1) {
|
||||
Int i;
|
||||
for (i = 1; i < repeats; i++)
|
||||
f_putc(sno, '\n');
|
||||
column_boundary = 0;
|
||||
finfo.padders = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -29,6 +29,8 @@
|
||||
|
||||
// #include "verify.h"
|
||||
|
||||
#if !HAVE_OPEN_MEMSTREAM
|
||||
|
||||
#if !HAVE_FUNOPEN
|
||||
# error Sorry, not ported to your platform yet
|
||||
#else
|
||||
@ -192,3 +194,5 @@ open_memstream (char **buf, size_t *len)
|
||||
return f;
|
||||
}
|
||||
#endif /* HAVE_FUNOPEN */
|
||||
|
||||
#endif /* HAVE_OPEN_MEMSTREAM*/
|
||||
|
@ -156,14 +156,14 @@ read_stream_to_terms(USES_REGS1)
|
||||
{
|
||||
int sno = Yap_CheckStream (ARG1, Input_Stream_f, "read_line_to_codes/2");
|
||||
Term t, hd;
|
||||
yhandle_t tails, outs, news;
|
||||
yhandle_t tails, news;
|
||||
|
||||
if (sno < 0)
|
||||
return FALSE;
|
||||
|
||||
t = AbsPair(HR);
|
||||
RESET_VARIABLE(HR);
|
||||
outs = Yap_InitSlot( (CELL)(HR) );
|
||||
Yap_InitSlot( (CELL)(HR) );
|
||||
tails = Yap_InitSlot( (CELL)(HR) );
|
||||
news = Yap_InitSlot( (CELL)(HR) );
|
||||
HR++;
|
||||
|
@ -215,7 +215,7 @@ has_reposition(int sno,
|
||||
char *Yap_guessFileName(int f, int sno, char *nameb, size_t max) {
|
||||
#if __linux__
|
||||
char path[256];
|
||||
if (snprintf(path, 255, "/proc/self/fd/~d", f) && readlink(path, nameb, max))
|
||||
if (snprintf(path, 255, "/proc/self/fd/%d", f) && readlink(path, nameb, max))
|
||||
return nameb;
|
||||
#elif __APPLE__
|
||||
if (fcntl(f, F_GETPATH, nameb) != -1) {
|
||||
@ -720,7 +720,7 @@ static bool do_set_stream(int sno,
|
||||
GLOBAL_Stream[sno].status |= Eof_Error_Stream_f;
|
||||
GLOBAL_Stream[sno].status &= ~Reset_Eof_Stream_f;
|
||||
} else if (t2 == TermReset) {
|
||||
GLOBAL_Stream[sno].status |= GLOBAL_Stream[sno].status &=
|
||||
GLOBAL_Stream[sno].status &=
|
||||
~Eof_Error_Stream_f;
|
||||
GLOBAL_Stream[sno].status |= Reset_Eof_Stream_f;
|
||||
} else if (t2 == TermEOfCode) {
|
||||
@ -754,8 +754,7 @@ static bool do_set_stream(int sno,
|
||||
GLOBAL_Stream[sno].status |= RepError_Xml_f;
|
||||
GLOBAL_Stream[sno].status &= ~RepError_Prolog_f;
|
||||
} else if (t2 == TermError) {
|
||||
GLOBAL_Stream[sno].status |= GLOBAL_Stream[sno].status &=
|
||||
~RepError_Xml_f;
|
||||
GLOBAL_Stream[sno].status &= ~RepError_Xml_f;
|
||||
GLOBAL_Stream[sno].status |= RepError_Prolog_f;
|
||||
} else if (t2 == TermEOfCode) {
|
||||
GLOBAL_Stream[sno].status &= ~RepError_Xml_f;
|
||||
|
@ -103,6 +103,9 @@ static char SccsId[] = "%W% %G%";
|
||||
#if HAVE_LIBGEN_H
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#if HAVE_READLINE_READLINE_H
|
||||
#include <readline/readline.h>
|
||||
#endif
|
||||
|
17
os/yapio.h
17
os/yapio.h
@ -44,23 +44,6 @@ typedef struct AliasDescS {
|
||||
|
||||
#define MAX_ISO_LATIN1 255
|
||||
|
||||
/****************** character definition table **************************/
|
||||
|
||||
#define NUMBER_OF_CHARS 256
|
||||
extern char *Yap_chtype;
|
||||
|
||||
#include "inline-only.h"
|
||||
INLINE_ONLY EXTERN inline int chtype(Int);
|
||||
int Yap_wide_chtype(Int);
|
||||
|
||||
INLINE_ONLY EXTERN inline int
|
||||
chtype(Int ch)
|
||||
{
|
||||
if (ch < NUMBER_OF_CHARS)
|
||||
return Yap_chtype[ch];
|
||||
return Yap_wide_chtype(ch);
|
||||
}
|
||||
|
||||
|
||||
/* parser stack, used to be AuxSp, now is ASP */
|
||||
#define ParserAuxSp LOCAL_ScannerStack
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
option (HORUS "enable HORUS graphical model tookit" ON)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
#cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
set (PROGRAMS
|
||||
Problog.yap
|
||||
problog.yap
|
||||
problog_lbdd.yap
|
||||
problog_lfi.yap
|
||||
dtproblog.yap
|
||||
|
@ -41,17 +41,15 @@ CUDD will generate better/faster code.
|
||||
#include "cudd_config.h"
|
||||
#include "YapInterface.h"
|
||||
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_UTIL_H
|
||||
#include <cudd/util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#elif HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_CUDD_H
|
||||
#include "cudd/cudd.h"
|
||||
#elif HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#endif
|
||||
|
||||
static YAP_Functor FunctorDollarVar,
|
||||
|
@ -2,31 +2,31 @@
|
||||
|
||||
/* Define to 1 if you have the <cuddInt.h> header file. */
|
||||
#ifndef HAVE_CUDDINT_H
|
||||
#cmakedefine HAVE_CUDDINT_H ${HAVE_CUDDINT_H}
|
||||
#define HAVE_CUDDINT_H ${HAVE_CUDDINT_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <cudd/cuddInt.h> header file. */
|
||||
#ifndef HAVE_CUDD_CUDDINT_H
|
||||
#cmakedefine HAVE_CUDD_CUDDINT_H ${HAVE_CUDD_CUDDINT_H}
|
||||
#define HAVE_CUDD_CUDDINT_H ${HAVE_CUDD_CUDDINT_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <cudd/cudd.h> header file. */
|
||||
#ifndef HAVE_CUDD_CUDD_H
|
||||
#cmakedefine HAVE_CUDD_CUDD_H ${HAVE_CUDD_CUDD_H}
|
||||
#define HAVE_CUDD_CUDD_H ${HAVE_CUDD_CUDD_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <cudd.h> header file. */
|
||||
#ifndef HAVE_CUDD_H
|
||||
#cmakedefine HAVE_CUDD_H ${HAVE_CUDD_H}
|
||||
#define HAVE_CUDD_H ${HAVE_CUDD_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <cudd/util.h> header file. */
|
||||
#ifndef HAVE_CUDD_UTIL_H
|
||||
#cmakedefine HAVE_CUDD_UTIL_H ${HAVE_CUDD_UTIL_H}
|
||||
#define HAVE_CUDD_UTIL_H ${HAVE_CUDD_UTIL_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <util.h> header file. */
|
||||
#ifndef HAVE_UTIL_H
|
||||
#cmakedefine HAVE_UTIL_H ${HAVE_UTIL_H}
|
||||
#define HAVE_UTIL_H ${HAVE_UTIL_H}
|
||||
#endif
|
||||
|
||||
|
@ -194,24 +194,24 @@
|
||||
#include <time.h>
|
||||
#include "config.h"
|
||||
#include "../cudd_config.h"
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_CUDD_UTIL_H
|
||||
#include <cudd/util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#elif HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_CUDD_H
|
||||
#include "cudd/cudd.h"
|
||||
#elif HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#endif
|
||||
#if HAVE_CUDDINT_H
|
||||
#include "cuddInt.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_CUDD_CUDDINT_H
|
||||
#include "cudd/cuddInt.h"
|
||||
#elif HAVE_CUDDINT_H
|
||||
#include "cuddInt.h"
|
||||
#endif
|
||||
|
||||
#include "general.h"
|
||||
|
||||
#define IsHigh(manager, node) HIGH(manager) == node
|
||||
|
@ -193,24 +193,23 @@
|
||||
#include "pqueue.h"
|
||||
#include "config.h"
|
||||
#include "../cudd_config.h"
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_UTIL_H
|
||||
#include <cudd/util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#elif HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
#if HAVE_CUDD_CUDD_H
|
||||
#include "cudd/cudd.h"
|
||||
#elif HAVE_CUDD_H
|
||||
#include "cudd.h"
|
||||
#endif
|
||||
#if HAVE_CUDDINT_H
|
||||
#include "cuddInt.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_CUDD_CUDDINT_H
|
||||
#include "cudd/cuddInt.h"
|
||||
#elif HAVE_CUDDINT_H
|
||||
#include "cuddInt.h"
|
||||
#endif
|
||||
|
||||
#include "general.h"
|
||||
|
||||
#define IsHigh(manager, node) HIGH(manager) == node
|
||||
|
1
packages/gecode/4.4.0/gecode-version.txt
vendored
Normal file
1
packages/gecode/4.4.0/gecode-version.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
4.4.0
|
3582
packages/gecode/4.4.0/gecode_yap_auto_generated.yap
vendored
Normal file
3582
packages/gecode/4.4.0/gecode_yap_auto_generated.yap
vendored
Normal file
File diff suppressed because it is too large
Load Diff
28
packages/gecode/4.4.0/gecode_yap_cc_forward_auto_generated.icc
vendored
Normal file
28
packages/gecode/4.4.0/gecode_yap_cc_forward_auto_generated.icc
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// -*- c++ -*-
|
||||
//=============================================================================
|
||||
// Copyright (C) 2011 by Denys Duchier
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation, either version 3 of the License, or (at your
|
||||
// option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
// more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//=============================================================================
|
||||
|
||||
static RestartMode gecode_RestartMode_from_term(YAP_Term);
|
||||
static FloatRelType gecode_FloatRelType_from_term(YAP_Term);
|
||||
static ReifyMode gecode_ReifyMode_from_term(YAP_Term);
|
||||
static IntRelType gecode_IntRelType_from_term(YAP_Term);
|
||||
static BoolOpType gecode_BoolOpType_from_term(YAP_Term);
|
||||
static IntConLevel gecode_IntConLevel_from_term(YAP_Term);
|
||||
static TaskType gecode_TaskType_from_term(YAP_Term);
|
||||
static ExtensionalPropKind gecode_ExtensionalPropKind_from_term(YAP_Term);
|
||||
static SetRelType gecode_SetRelType_from_term(YAP_Term);
|
||||
static SetOpType gecode_SetOpType_from_term(YAP_Term);
|
5292
packages/gecode/4.4.0/gecode_yap_cc_impl_auto_generated.icc
vendored
Normal file
5292
packages/gecode/4.4.0/gecode_yap_cc_impl_auto_generated.icc
vendored
Normal file
File diff suppressed because it is too large
Load Diff
646
packages/gecode/4.4.0/gecode_yap_cc_init_auto_generated.icc
vendored
Normal file
646
packages/gecode/4.4.0/gecode_yap_cc_init_auto_generated.icc
vendored
Normal file
@ -0,0 +1,646 @@
|
||||
// -*- c++ -*-
|
||||
//=============================================================================
|
||||
// Copyright (C) 2011 by Denys Duchier
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation, either version 3 of the License, or (at your
|
||||
// option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
// more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//=============================================================================
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_NONE");
|
||||
gecode_RM_NONE = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_CONSTANT");
|
||||
gecode_RM_CONSTANT = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_LINEAR");
|
||||
gecode_RM_LINEAR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_LUBY");
|
||||
gecode_RM_LUBY = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_GEOMETRIC");
|
||||
gecode_RM_GEOMETRIC = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_EQ");
|
||||
gecode_FRT_EQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_NQ");
|
||||
gecode_FRT_NQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_LQ");
|
||||
gecode_FRT_LQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_LE");
|
||||
gecode_FRT_LE = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_GQ");
|
||||
gecode_FRT_GQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("FRT_GR");
|
||||
gecode_FRT_GR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_EQV");
|
||||
gecode_RM_EQV = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_IMP");
|
||||
gecode_RM_IMP = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("RM_PMI");
|
||||
gecode_RM_PMI = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_EQ");
|
||||
gecode_IRT_EQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_NQ");
|
||||
gecode_IRT_NQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_LQ");
|
||||
gecode_IRT_LQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_LE");
|
||||
gecode_IRT_LE = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_GQ");
|
||||
gecode_IRT_GQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("IRT_GR");
|
||||
gecode_IRT_GR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("BOT_AND");
|
||||
gecode_BOT_AND = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("BOT_OR");
|
||||
gecode_BOT_OR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("BOT_IMP");
|
||||
gecode_BOT_IMP = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("BOT_EQV");
|
||||
gecode_BOT_EQV = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("BOT_XOR");
|
||||
gecode_BOT_XOR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("ICL_VAL");
|
||||
gecode_ICL_VAL = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("ICL_BND");
|
||||
gecode_ICL_BND = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("ICL_DOM");
|
||||
gecode_ICL_DOM = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("ICL_DEF");
|
||||
gecode_ICL_DEF = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("TT_FIXP");
|
||||
gecode_TT_FIXP = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("TT_FIXS");
|
||||
gecode_TT_FIXS = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("TT_FIXE");
|
||||
gecode_TT_FIXE = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("EPK_DEF");
|
||||
gecode_EPK_DEF = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("EPK_SPEED");
|
||||
gecode_EPK_SPEED = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("EPK_MEMORY");
|
||||
gecode_EPK_MEMORY = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_EQ");
|
||||
gecode_SRT_EQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_NQ");
|
||||
gecode_SRT_NQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_SUB");
|
||||
gecode_SRT_SUB = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_SUP");
|
||||
gecode_SRT_SUP = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_DISJ");
|
||||
gecode_SRT_DISJ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_CMPL");
|
||||
gecode_SRT_CMPL = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_LQ");
|
||||
gecode_SRT_LQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_LE");
|
||||
gecode_SRT_LE = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_GQ");
|
||||
gecode_SRT_GQ = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SRT_GR");
|
||||
gecode_SRT_GR = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
{ YAP_Atom X= YAP_LookupAtom("SOT_UNION");
|
||||
gecode_SOT_UNION = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SOT_DUNION");
|
||||
gecode_SOT_DUNION = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SOT_INTER");
|
||||
gecode_SOT_INTER = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
{ YAP_Atom X= YAP_LookupAtom("SOT_MINUS");
|
||||
gecode_SOT_MINUS = YAP_MkAtomTerm(X);
|
||||
YAP_AtomGetHold(X); }
|
||||
|
||||
YAP_UserCPredicate("gecode_constraint_unary_464", gecode_constraint_unary_464, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_460", gecode_constraint_unary_460, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_351", gecode_constraint_nvalues_351, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_353", gecode_constraint_nvalues_353, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_347", gecode_constraint_nvalues_347, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_349", gecode_constraint_nvalues_349, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_max_308", gecode_constraint_max_308, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_max_306", gecode_constraint_max_306, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_max_307", gecode_constraint_max_307, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_max_311", gecode_constraint_max_311, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_206", gecode_constraint_dom_206, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_215", gecode_constraint_dom_215, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_argmin_56", gecode_constraint_argmin_56, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_convex_97", gecode_constraint_convex_97, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_335", gecode_constraint_nooverlap_335, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_15", gecode_constraint_assign_15, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_6", gecode_constraint_assign_6, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_3", gecode_constraint_assign_3, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_1", gecode_constraint_assign_1, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_9", gecode_constraint_assign_9, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_17", gecode_constraint_assign_17, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_12", gecode_constraint_assign_12, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_19", gecode_constraint_assign_19, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_element_226", gecode_constraint_element_226, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_230", gecode_constraint_element_230, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_220", gecode_constraint_element_220, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_218", gecode_constraint_element_218, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_225", gecode_constraint_element_225, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_233", gecode_constraint_element_233, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_236", gecode_constraint_element_236, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_242", gecode_constraint_element_242, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_234", gecode_constraint_element_234, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_443", gecode_constraint_sequence_443, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_notMax_341", gecode_constraint_notMax_341, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_ite_262", gecode_constraint_ite_262, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_457", gecode_constraint_unary_457, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_nroot_345", gecode_constraint_nroot_345, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_91", gecode_constraint_circuit_91, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_82", gecode_constraint_circuit_82, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_205", gecode_constraint_dom_205, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_204", gecode_constraint_dom_204, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_208", gecode_constraint_dom_208, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_200", gecode_constraint_dom_200, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_191", gecode_constraint_dom_191, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_187", gecode_constraint_dom_187, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_193", gecode_constraint_dom_193, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_214", gecode_constraint_dom_214, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_216", gecode_constraint_dom_216, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_212", gecode_constraint_dom_212, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_72", gecode_constraint_channel_72, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_68", gecode_constraint_channel_68, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_66", gecode_constraint_channel_66, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_337", gecode_constraint_nooverlap_337, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_340", gecode_constraint_nooverlap_340, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_element_228", gecode_constraint_element_228, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_element_222", gecode_constraint_element_222, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_element_224", gecode_constraint_element_224, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_element_232", gecode_constraint_element_232, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_element_240", gecode_constraint_element_240, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_element_238", gecode_constraint_element_238, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_max_304", gecode_constraint_max_304, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_max_305", gecode_constraint_max_305, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_max_310", gecode_constraint_max_310, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_unshare_469", gecode_constraint_unshare_469, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_unshare_467", gecode_constraint_unshare_467, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_path_364", gecode_constraint_path_364, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_path_363", gecode_constraint_path_363, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_34", gecode_constraint_branch_34, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_28", gecode_constraint_branch_28, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_40", gecode_constraint_branch_40, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_mult_331", gecode_constraint_mult_331, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_mult_330", gecode_constraint_mult_330, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_clause_95", gecode_constraint_clause_95, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_clause_93", gecode_constraint_clause_93, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_372", gecode_constraint_precede_372, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_argmax_53", gecode_constraint_argmax_53, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_distinct_166", gecode_constraint_distinct_166, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_member_318", gecode_constraint_member_318, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_member_317", gecode_constraint_member_317, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_member_314", gecode_constraint_member_314, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_member_313", gecode_constraint_member_313, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_mod_329", gecode_constraint_mod_329, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_cardinality_63", gecode_constraint_cardinality_63, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_atmostOne_59", gecode_constraint_atmostOne_59, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channelSorted_79", gecode_constraint_channelSorted_79, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_259", gecode_constraint_extensional_259, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_254", gecode_constraint_extensional_254, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_278", gecode_constraint_linear_278, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_276", gecode_constraint_linear_276, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_264", gecode_constraint_linear_264, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_268", gecode_constraint_linear_268, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_296", gecode_constraint_linear_296, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_300", gecode_constraint_linear_300, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_88", gecode_constraint_circuit_88, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_412", gecode_constraint_rel_412, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_414", gecode_constraint_rel_414, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_428", gecode_constraint_rel_428, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_426", gecode_constraint_rel_426, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_398", gecode_constraint_rel_398, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_394", gecode_constraint_rel_394, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_392", gecode_constraint_rel_392, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_389", gecode_constraint_rel_389, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_388", gecode_constraint_rel_388, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_385", gecode_constraint_rel_385, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_384", gecode_constraint_rel_384, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_381", gecode_constraint_rel_381, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_379", gecode_constraint_rel_379, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_408", gecode_constraint_rel_408, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_410", gecode_constraint_rel_410, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_404", gecode_constraint_rel_404, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_417", gecode_constraint_rel_417, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_416", gecode_constraint_rel_416, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_421", gecode_constraint_rel_421, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_420", gecode_constraint_rel_420, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_425", gecode_constraint_rel_425, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_436", gecode_constraint_rel_436, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_438", gecode_constraint_rel_438, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_378", gecode_constraint_rel_378, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_376", gecode_constraint_rel_376, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_min_324", gecode_constraint_min_324, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_min_322", gecode_constraint_min_322, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_min_323", gecode_constraint_min_323, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_min_327", gecode_constraint_min_327, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_cardinality_62", gecode_constraint_cardinality_62, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_cardinality_64", gecode_constraint_cardinality_64, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_count_115", gecode_constraint_count_115, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_count_112", gecode_constraint_count_112, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_count_106", gecode_constraint_count_106, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_count_105", gecode_constraint_count_105, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_count_102", gecode_constraint_count_102, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sqrt_453", gecode_constraint_sqrt_453, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_sqrt_452", gecode_constraint_sqrt_452, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_163", gecode_constraint_cumulatives_163, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_161", gecode_constraint_cumulatives_161, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_159", gecode_constraint_cumulatives_159, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_157", gecode_constraint_cumulatives_157, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_155", gecode_constraint_cumulatives_155, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_153", gecode_constraint_cumulatives_153, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_151", gecode_constraint_cumulatives_151, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_149", gecode_constraint_cumulatives_149, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_350", gecode_constraint_nvalues_350, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_352", gecode_constraint_nvalues_352, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_346", gecode_constraint_nvalues_346, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nvalues_348", gecode_constraint_nvalues_348, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_binpacking_60", gecode_constraint_binpacking_60, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_291", gecode_constraint_linear_291, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_295", gecode_constraint_linear_295, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_283", gecode_constraint_linear_283, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_287", gecode_constraint_linear_287, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_abs_52", gecode_constraint_abs_52, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_convex_96", gecode_constraint_convex_96, 2);
|
||||
YAP_UserCPredicate("gecode_constraint_div_169", gecode_constraint_div_169, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_div_168", gecode_constraint_div_168, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_418", gecode_constraint_rel_418, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_422", gecode_constraint_rel_422, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_401", gecode_constraint_rel_401, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_402", gecode_constraint_rel_402, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_390", gecode_constraint_rel_390, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_386", gecode_constraint_rel_386, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_382", gecode_constraint_rel_382, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_380", gecode_constraint_rel_380, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_431", gecode_constraint_rel_431, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_432", gecode_constraint_rel_432, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_433", gecode_constraint_rel_433, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_434", gecode_constraint_rel_434, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_weights_471", gecode_constraint_weights_471, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_max_309", gecode_constraint_max_309, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_path_359", gecode_constraint_path_359, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_465", gecode_constraint_unary_465, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_461", gecode_constraint_unary_461, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_455", gecode_constraint_unary_455, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_458", gecode_constraint_unary_458, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nroot_344", gecode_constraint_nroot_344, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_nroot_343", gecode_constraint_nroot_343, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sorted_446", gecode_constraint_sorted_446, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_86", gecode_constraint_circuit_86, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_83", gecode_constraint_circuit_83, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_80", gecode_constraint_circuit_80, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_195", gecode_constraint_dom_195, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_192", gecode_constraint_dom_192, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_178", gecode_constraint_dom_178, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_176", gecode_constraint_dom_176, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_174", gecode_constraint_dom_174, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_186", gecode_constraint_dom_186, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_185", gecode_constraint_dom_185, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_183", gecode_constraint_dom_183, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_181", gecode_constraint_dom_181, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_203", gecode_constraint_dom_203, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_207", gecode_constraint_dom_207, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_202", gecode_constraint_dom_202, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_210", gecode_constraint_dom_210, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_199", gecode_constraint_dom_199, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_198", gecode_constraint_dom_198, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_190", gecode_constraint_dom_190, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_189", gecode_constraint_dom_189, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_213", gecode_constraint_dom_213, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_211", gecode_constraint_dom_211, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_abs_51", gecode_constraint_abs_51, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_abs_50", gecode_constraint_abs_50, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_74", gecode_constraint_channel_74, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_69", gecode_constraint_channel_69, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_8", gecode_constraint_assign_8, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_5", gecode_constraint_assign_5, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_11", gecode_constraint_assign_11, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_14", gecode_constraint_assign_14, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_405", gecode_constraint_rel_405, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_395", gecode_constraint_rel_395, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_path_362", gecode_constraint_path_362, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_45", gecode_constraint_branch_45, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_29", gecode_constraint_branch_29, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_23", gecode_constraint_branch_23, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_22", gecode_constraint_branch_22, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_35", gecode_constraint_branch_35, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_47", gecode_constraint_branch_47, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_41", gecode_constraint_branch_41, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_49", gecode_constraint_branch_49, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_mult_332", gecode_constraint_mult_332, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_87", gecode_constraint_circuit_87, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_84", gecode_constraint_circuit_84, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_81", gecode_constraint_circuit_81, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_clause_94", gecode_constraint_clause_94, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_clause_92", gecode_constraint_clause_92, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_374", gecode_constraint_precede_374, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_371", gecode_constraint_precede_371, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_370", gecode_constraint_precede_370, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_75", gecode_constraint_channel_75, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_132", gecode_constraint_cumulative_132, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_135", gecode_constraint_cumulative_135, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_128", gecode_constraint_cumulative_128, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_131", gecode_constraint_cumulative_131, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_125", gecode_constraint_cumulative_125, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_144", gecode_constraint_cumulative_144, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_147", gecode_constraint_cumulative_147, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_140", gecode_constraint_cumulative_140, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_143", gecode_constraint_cumulative_143, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_137", gecode_constraint_cumulative_137, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_distinct_167", gecode_constraint_distinct_167, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_distinct_164", gecode_constraint_distinct_164, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_member_319", gecode_constraint_member_319, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_member_315", gecode_constraint_member_315, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_mod_328", gecode_constraint_mod_328, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sqr_450", gecode_constraint_sqr_450, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_sqr_449", gecode_constraint_sqr_449, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_442", gecode_constraint_sequence_442, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_440", gecode_constraint_sequence_440, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_path_360", gecode_constraint_path_360, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_path_357", gecode_constraint_path_357, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_path_354", gecode_constraint_path_354, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_divmod_172", gecode_constraint_divmod_172, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_sorted_447", gecode_constraint_sorted_447, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_258", gecode_constraint_extensional_258, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_261", gecode_constraint_extensional_261, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_253", gecode_constraint_extensional_253, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_256", gecode_constraint_extensional_256, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_90", gecode_constraint_circuit_90, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_89", gecode_constraint_circuit_89, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_argmin_57", gecode_constraint_argmin_57, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_77", gecode_constraint_channel_77, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_67", gecode_constraint_channel_67, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_70", gecode_constraint_channel_70, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_65", gecode_constraint_channel_65, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_73", gecode_constraint_channel_73, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_71", gecode_constraint_channel_71, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_78", gecode_constraint_channel_78, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_channel_76", gecode_constraint_channel_76, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_count_98", gecode_constraint_count_98, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_100", gecode_constraint_count_100, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_116", gecode_constraint_count_116, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_118", gecode_constraint_count_118, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_108", gecode_constraint_count_108, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_110", gecode_constraint_count_110, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_107", gecode_constraint_count_107, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_103", gecode_constraint_count_103, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_113", gecode_constraint_count_113, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_120", gecode_constraint_count_120, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_122", gecode_constraint_count_122, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_162", gecode_constraint_cumulatives_162, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_160", gecode_constraint_cumulatives_160, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_158", gecode_constraint_cumulatives_158, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_156", gecode_constraint_cumulatives_156, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_154", gecode_constraint_cumulatives_154, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_152", gecode_constraint_cumulatives_152, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_150", gecode_constraint_cumulatives_150, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulatives_148", gecode_constraint_cumulatives_148, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_binpacking_61", gecode_constraint_binpacking_61, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_257", gecode_constraint_extensional_257, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_260", gecode_constraint_extensional_260, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_252", gecode_constraint_extensional_252, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_extensional_255", gecode_constraint_extensional_255, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_299", gecode_constraint_linear_299, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_303", gecode_constraint_linear_303, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_267", gecode_constraint_linear_267, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_271", gecode_constraint_linear_271, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_275", gecode_constraint_linear_275, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_273", gecode_constraint_linear_273, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_290", gecode_constraint_linear_290, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_289", gecode_constraint_linear_289, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_294", gecode_constraint_linear_294, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_293", gecode_constraint_linear_293, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_282", gecode_constraint_linear_282, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_281", gecode_constraint_linear_281, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_286", gecode_constraint_linear_286, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_285", gecode_constraint_linear_285, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_339", gecode_constraint_nooverlap_339, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_334", gecode_constraint_nooverlap_334, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_div_170", gecode_constraint_div_170, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_sqr_451", gecode_constraint_sqr_451, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_path_361", gecode_constraint_path_361, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_path_358", gecode_constraint_path_358, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_path_355", gecode_constraint_path_355, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_463", gecode_constraint_unary_463, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_466", gecode_constraint_unary_466, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_459", gecode_constraint_unary_459, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_462", gecode_constraint_unary_462, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_unary_456", gecode_constraint_unary_456, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_sorted_445", gecode_constraint_sorted_445, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sorted_448", gecode_constraint_sorted_448, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_229", gecode_constraint_element_229, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_element_223", gecode_constraint_element_223, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_element_241", gecode_constraint_element_241, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_element_239", gecode_constraint_element_239, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_16", gecode_constraint_assign_16, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_7", gecode_constraint_assign_7, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_4", gecode_constraint_assign_4, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_2", gecode_constraint_assign_2, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_10", gecode_constraint_assign_10, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_18", gecode_constraint_assign_18, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_13", gecode_constraint_assign_13, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_assign_20", gecode_constraint_assign_20, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_element_227", gecode_constraint_element_227, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_231", gecode_constraint_element_231, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_221", gecode_constraint_element_221, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_219", gecode_constraint_element_219, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_250", gecode_constraint_element_250, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_248", gecode_constraint_element_248, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_246", gecode_constraint_element_246, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_244", gecode_constraint_element_244, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_237", gecode_constraint_element_237, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_243", gecode_constraint_element_243, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_element_235", gecode_constraint_element_235, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_444", gecode_constraint_sequence_444, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_30", gecode_constraint_branch_30, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_26", gecode_constraint_branch_26, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_24", gecode_constraint_branch_24, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_32", gecode_constraint_branch_32, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_36", gecode_constraint_branch_36, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_42", gecode_constraint_branch_42, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_38", gecode_constraint_branch_38, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_circuit_85", gecode_constraint_circuit_85, 7);
|
||||
YAP_UserCPredicate("gecode_constraint_pow_367", gecode_constraint_pow_367, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_pow_366", gecode_constraint_pow_366, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_373", gecode_constraint_precede_373, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_precede_369", gecode_constraint_precede_369, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_argmax_55", gecode_constraint_argmax_55, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_134", gecode_constraint_cumulative_134, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_130", gecode_constraint_cumulative_130, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_124", gecode_constraint_cumulative_124, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_127", gecode_constraint_cumulative_127, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_146", gecode_constraint_cumulative_146, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_142", gecode_constraint_cumulative_142, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_136", gecode_constraint_cumulative_136, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_139", gecode_constraint_cumulative_139, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_distinct_165", gecode_constraint_distinct_165, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_min_320", gecode_constraint_min_320, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_min_321", gecode_constraint_min_321, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_min_326", gecode_constraint_min_326, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_sqrt_454", gecode_constraint_sqrt_454, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_441", gecode_constraint_sequence_441, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_sequence_439", gecode_constraint_sequence_439, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_unshare_470", gecode_constraint_unshare_470, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_unshare_468", gecode_constraint_unshare_468, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_path_365", gecode_constraint_path_365, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_path_356", gecode_constraint_path_356, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_divmod_171", gecode_constraint_divmod_171, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_31", gecode_constraint_branch_31, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_27", gecode_constraint_branch_27, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_25", gecode_constraint_branch_25, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_33", gecode_constraint_branch_33, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_37", gecode_constraint_branch_37, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_43", gecode_constraint_branch_43, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_39", gecode_constraint_branch_39, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_338", gecode_constraint_nooverlap_338, 9);
|
||||
YAP_UserCPredicate("gecode_constraint_argmin_58", gecode_constraint_argmin_58, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_126", gecode_constraint_cumulative_126, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_138", gecode_constraint_cumulative_138, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_member_316", gecode_constraint_member_316, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_member_312", gecode_constraint_member_312, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_count_117", gecode_constraint_count_117, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_119", gecode_constraint_count_119, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_121", gecode_constraint_count_121, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_123", gecode_constraint_count_123, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_109", gecode_constraint_count_109, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_111", gecode_constraint_count_111, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_99", gecode_constraint_count_99, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_count_101", gecode_constraint_count_101, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_pow_368", gecode_constraint_pow_368, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_notMin_342", gecode_constraint_notMin_342, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_133", gecode_constraint_cumulative_133, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_129", gecode_constraint_cumulative_129, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_145", gecode_constraint_cumulative_145, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_cumulative_141", gecode_constraint_cumulative_141, 8);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_46", gecode_constraint_branch_46, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_21", gecode_constraint_branch_21, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_44", gecode_constraint_branch_44, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_branch_48", gecode_constraint_branch_48, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_194", gecode_constraint_dom_194, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_196", gecode_constraint_dom_196, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_177", gecode_constraint_dom_177, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_179", gecode_constraint_dom_179, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_175", gecode_constraint_dom_175, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_173", gecode_constraint_dom_173, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_184", gecode_constraint_dom_184, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_182", gecode_constraint_dom_182, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_180", gecode_constraint_dom_180, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_201", gecode_constraint_dom_201, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_209", gecode_constraint_dom_209, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_197", gecode_constraint_dom_197, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_188", gecode_constraint_dom_188, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_dom_217", gecode_constraint_dom_217, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_298", gecode_constraint_linear_298, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_297", gecode_constraint_linear_297, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_302", gecode_constraint_linear_302, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_301", gecode_constraint_linear_301, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_279", gecode_constraint_linear_279, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_277", gecode_constraint_linear_277, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_266", gecode_constraint_linear_266, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_265", gecode_constraint_linear_265, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_270", gecode_constraint_linear_270, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_269", gecode_constraint_linear_269, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_274", gecode_constraint_linear_274, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_272", gecode_constraint_linear_272, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_288", gecode_constraint_linear_288, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_292", gecode_constraint_linear_292, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_280", gecode_constraint_linear_280, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_linear_284", gecode_constraint_linear_284, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_333", gecode_constraint_nooverlap_333, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_nooverlap_336", gecode_constraint_nooverlap_336, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_element_251", gecode_constraint_element_251, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_element_249", gecode_constraint_element_249, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_element_247", gecode_constraint_element_247, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_element_245", gecode_constraint_element_245, 6);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_411", gecode_constraint_rel_411, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_413", gecode_constraint_rel_413, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_429", gecode_constraint_rel_429, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_427", gecode_constraint_rel_427, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_399", gecode_constraint_rel_399, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_400", gecode_constraint_rel_400, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_397", gecode_constraint_rel_397, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_393", gecode_constraint_rel_393, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_391", gecode_constraint_rel_391, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_396", gecode_constraint_rel_396, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_387", gecode_constraint_rel_387, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_383", gecode_constraint_rel_383, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_407", gecode_constraint_rel_407, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_409", gecode_constraint_rel_409, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_403", gecode_constraint_rel_403, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_406", gecode_constraint_rel_406, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_415", gecode_constraint_rel_415, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_419", gecode_constraint_rel_419, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_423", gecode_constraint_rel_423, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_424", gecode_constraint_rel_424, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_430", gecode_constraint_rel_430, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_435", gecode_constraint_rel_435, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_437", gecode_constraint_rel_437, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_377", gecode_constraint_rel_377, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_rel_375", gecode_constraint_rel_375, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_min_325", gecode_constraint_min_325, 5);
|
||||
YAP_UserCPredicate("gecode_constraint_count_114", gecode_constraint_count_114, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_count_104", gecode_constraint_count_104, 3);
|
||||
YAP_UserCPredicate("gecode_constraint_argmax_54", gecode_constraint_argmax_54, 4);
|
||||
YAP_UserCPredicate("gecode_constraint_ite_263", gecode_constraint_ite_263, 6);
|
@ -666,15 +666,18 @@ def gecode_version():
|
||||
@@GECODE_VERSION""")
|
||||
f.close()
|
||||
cxx.preprocess(file_hh,output_file=file_txt)
|
||||
f = open(file_txt)
|
||||
version = ""
|
||||
for line in f:
|
||||
if line.startswith("@@"):
|
||||
version = line[3:-2]
|
||||
break
|
||||
f.close()
|
||||
os.remove(file_hh)
|
||||
os.remove(file_txt)
|
||||
if True:
|
||||
f = open(file_txt)
|
||||
version = ""
|
||||
for line in f:
|
||||
if line.startswith("@@"):
|
||||
version = line[3:-2]
|
||||
break
|
||||
f.close()
|
||||
os.remove(file_hh)
|
||||
os.remove(file_txt)
|
||||
else:
|
||||
version = "4.4.0"
|
||||
GECODE_VERSION = version
|
||||
return version
|
||||
|
||||
|
@ -610,7 +610,7 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = /usr/local/include/gecode
|
||||
INPUT = /usr/include/gecode
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
23233
packages/gecode/dev/extractor/xml/namespaceGecode.xml
Normal file
23233
packages/gecode/dev/extractor/xml/namespaceGecode.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
|
||||
#CHECK: PythonLibs
|
||||
|
||||
set (PYTHON_SOURCES
|
||||
@ -6,8 +7,8 @@ set (PYTHON_SOURCES
|
||||
#try to use Brew first
|
||||
#set ( PYTHON_LIBRARY /Anaconda/lib/libpython2.7.dylib )
|
||||
#set ( PYTHON_INCLUDE_DIR /Anaconda/include/python2.7 )
|
||||
set( PYTHON_LIBRARY /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib) # - path to the python library
|
||||
set( PYTHON_INCLUDE_DIR /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/include/python2.7 ) # - path to where Python.h is found
|
||||
#set( PYTHON_LIBRARY /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib) # - path to the python library
|
||||
#set( PYTHON_INCLUDE_DIR /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/include/python2.7 ) # - path to where Python.h is found
|
||||
|
||||
macro_optional_find_package(PythonInterp ON)
|
||||
macro_optional_find_package (PythonLibs ON)
|
||||
|
@ -13,9 +13,16 @@ INCLUDE_DIRECTORIES(
|
||||
${YAP_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
.
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
#indexers
|
||||
ADD_SUBDIRECTORY(rtree)
|
||||
ADD_SUBDIRECTORY(b+tree)
|
||||
ADD_SUBDIRECTORY(uthash)
|
||||
|
||||
disallow_intree_builds()
|
||||
|
||||
#project (utf8proc C)
|
||||
|
||||
# Be sure to also update these in Makefile!
|
||||
|
21
packages/udi/cmake/FindJudy.cmake
Normal file
21
packages/udi/cmake/FindJudy.cmake
Normal file
@ -0,0 +1,21 @@
|
||||
#
|
||||
# Judy
|
||||
#
|
||||
|
||||
FIND_PATH(JUDY_INCLUDE_DIR Judy.h ${JUDY_ROOT}/include)
|
||||
FIND_LIBRARY(JUDY_LIBRARY Judy ${JUDY_ROOT}/lib)
|
||||
|
||||
IF (JUDY_INCLUDE_DIR AND JUDY_LIBRARY)
|
||||
SET(JUDY_FOUND TRUE)
|
||||
ENDIF (JUDY_INCLUDE_DIR AND JUDY_LIBRARY)
|
||||
|
||||
|
||||
IF (JUDY_FOUND)
|
||||
IF (NOT JUDY_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Judy: ${JUDY_LIBRARY}")
|
||||
ENDIF (NOT JUDY_FIND_QUIETLY)
|
||||
ELSE (JUDY_FOUND)
|
||||
IF (JUDY_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find Judy")
|
||||
ENDIF (JUDY_FIND_REQUIRED)
|
||||
ENDIF (JUDY_FOUND)
|
129
packages/udi/judy.c
Normal file
129
packages/udi/judy.c
Normal file
@ -0,0 +1,129 @@
|
||||
// needs to e cleaned up
|
||||
|
||||
#if JUDY_FOUND
|
||||
#include <Judy.h>
|
||||
/* Judy1 integer sparse set intersection */
|
||||
static inline int j1_callback(void *key, void *data, void *arg)
|
||||
{
|
||||
int r;
|
||||
Pvoid_t *arrayP = (Pvoid_t *) arg;
|
||||
J1S(r, *arrayP, (Word_t) data);
|
||||
if (r == JERR)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
yamop *
|
||||
Yap_udi_join(struct ClauseList *clauselist. UdiPArg parg. UdiInfo info)
|
||||
{
|
||||
#if JUDY_FOUND
|
||||
/*TODO: do more tests to this algorithm*/
|
||||
int i;
|
||||
Pvoid_t tmp = (Pvoid_t) NULL;
|
||||
Pvoid_t result = (Pvoid_t) NULL;
|
||||
Word_t count = 0L;
|
||||
Word_t idx_r = 0L;
|
||||
Word_t idx_tmp = 0L;
|
||||
int rc = 0;
|
||||
yamop **x;
|
||||
|
||||
/*
|
||||
* I will start with the simplest approach
|
||||
* for each index create a set and intersect it with the
|
||||
* next
|
||||
*
|
||||
* In the future it could pay to sort according to index type
|
||||
* to improve intersection part
|
||||
*/
|
||||
for (i = 0; i < utarray_len(info->args) ; i++) {
|
||||
parg = (UdiPArg) utarray_eltptr(info->args,i);
|
||||
r = parg->control->search(parg->idxstr, parg->arg, j1_callback, &tmp);
|
||||
if (r == -1) /*this arg does not prune search*/
|
||||
continue;
|
||||
rc ++;
|
||||
J1C(count, result, 0, -1);
|
||||
if (r == 0) /* this arg gave 0 results -> FAIL*/
|
||||
{
|
||||
if (count > 0) // clear previous result if they exists
|
||||
J1FA(count, result);
|
||||
return Yap_FAILCODE();
|
||||
}
|
||||
|
||||
if (count == 0) // first result_set
|
||||
{
|
||||
result = tmp;
|
||||
tmp = (Pvoid_t) NULL;
|
||||
}
|
||||
else /*intersection*/
|
||||
{
|
||||
idx_tmp = 0L;
|
||||
idx_r = 0L;
|
||||
J1F(count, result, idx_r); //succeeds one time at least
|
||||
assert(count > 0);
|
||||
J1F(count, tmp, idx_tmp); //succeeds one time at least
|
||||
assert(count > 0);
|
||||
while (count)
|
||||
{
|
||||
while (idx_r < idx_tmp)
|
||||
{
|
||||
J1U(count, result, idx_r); //does not belong
|
||||
J1N(count, result, idx_r); //next
|
||||
if (! count) break; //end result set
|
||||
}
|
||||
if(idx_r == idx_tmp)
|
||||
{
|
||||
J1N(count, result, idx_r); //next
|
||||
if (! count) break; //end result set
|
||||
J1N(count, tmp, idx_tmp); //next tmp
|
||||
//if (! count) break; //end tmp set will break while
|
||||
}
|
||||
else // (idx_r > idx_tmp)
|
||||
{
|
||||
idx_tmp = idx_r; // fast forward
|
||||
J1F(count, tmp, idx_tmp); // first starting in idx_r
|
||||
//if (! count) break; //end tmp set will break while
|
||||
}
|
||||
}
|
||||
J1F(count, result, idx_r); // first starting in idx_r
|
||||
//clear up the rest
|
||||
while (idx_r > idx_tmp && count) //result has more setted values
|
||||
{
|
||||
J1U(count, result, idx_r); //does not belong
|
||||
J1N(count, result, idx_r); //next
|
||||
}
|
||||
J1FA(count, tmp); //free tmp
|
||||
}
|
||||
}
|
||||
if (rc == 0) /*no search performed*/
|
||||
return NULL;
|
||||
|
||||
J1C(count, result, 0, -1);
|
||||
if (count == 0) { /*result set empty -> FAIL */
|
||||
J1FA(count, result);
|
||||
return Yap_FAILCODE();
|
||||
}
|
||||
|
||||
/*convert Juddy1 to clauselist*/
|
||||
Yap_ClauseListInit(clauselistp);
|
||||
idx_r = 0L;
|
||||
J1F(count, result, idx_r);
|
||||
while (count)
|
||||
{
|
||||
x = (yamop **) utarray_eltptr(info->clauselist, idx_r - 1);
|
||||
Yap_ClauseListExtend(
|
||||
clauselist,
|
||||
*x,
|
||||
info->p);
|
||||
J1N(count, result, idx_r);
|
||||
}
|
||||
J1FA(count,result);
|
||||
fprintf(stderr,"J1 used space %ld bytes for %d clausules\n",
|
||||
count, Yap_ClauseListCount(clauselist));
|
||||
Yap_ClauseListClose(clauselist);
|
||||
#else
|
||||
fprintf(stderr,"Without libJudy only one argument indexed is allowed."
|
||||
"Falling back to Yap Indexing\n");
|
||||
return NULL; //NO Judy Available
|
||||
#endif
|
||||
}
|
@ -21,6 +21,11 @@
|
||||
* @defgroup YAPChars Sequences of Characters: atoms, strings, lists of codes.
|
||||
* @ingroup builtins
|
||||
*
|
||||
* The Prolog library includes a set of built-in predicates designed to
|
||||
support manipulation of sequences of text, represented either as
|
||||
lists, atoms or strings.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -250,6 +250,7 @@ rules.
|
||||
:- use_module('../swi/library/predopts.pl').
|
||||
:- use_module('../swi/library/menu.pl').
|
||||
:- use_module('../library/ypp.yap').
|
||||
:- use_module('../os/chartypes.yap').
|
||||
|
||||
yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
|
||||
|
||||
@ -258,8 +259,6 @@ yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
|
||||
:- set_prolog_flag(generate_debug_info,true).
|
||||
|
||||
|
||||
% grep:- recorda('$dialect',yap,_).
|
||||
|
||||
%
|
||||
% cleanup ensure loaded and recover some data-base space.
|
||||
%
|
||||
|
Reference in New Issue
Block a user