This commit is contained in:
Vitor Santos Costa 2018-06-18 12:13:33 +01:00
commit eb43305a38
42 changed files with 9936 additions and 3824 deletions

View File

@ -717,12 +717,15 @@ static Int number_chars(USES_REGS1) {
pop_text_stack(l);
return Yap_unify(ARG1, tf);
}
pop_text_stack(l);
LOCAL_ActiveError->errorRawTerm = 0;
Yap_ThrowExistingError();
return false;
}
pop_text_stack(l);
return true;
}

View File

@ -862,6 +862,7 @@ yamop *Yap_Error__(bool throw, const char *file, const char *function,
// reset_error_description();
if (!throw) {
Yap_JumpToEnv();
pop_text_stack(LOCAL_MallocDepth+1);
}
LOCAL_PrologMode = UserMode;
return P;
@ -962,10 +963,11 @@ yap_error_descriptor_t *Yap_GetException(yap_error_descriptor_t *i) {
void Yap_PrintException(void) { printErr(LOCAL_ActiveError); }
bool Yap_RaiseException(void) {
if (LOCAL_CommittedError == NULL ||
LOCAL_CommittedError->errorNo == YAP_NO_ERROR)
if (LOCAL_ActiveError == NULL ||
LOCAL_ActiveError->errorNo == YAP_NO_ERROR)
return false;
return Yap_JumpToEnv();
Yap_RestartYap(5);
//return Yap_JumpToEnv();
}
bool Yap_ResetException(yap_error_descriptor_t *i) {

View File

@ -1423,11 +1423,12 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
Int OldBorder = LOCAL_CBorder;
// yap_error_descriptor_t *err_info= LOCAL_ActiveError;
LOCAL_CBorder = LCL0 - ENV;
LOCAL_MallocDepth = AllocLevel();
yhandle_t sls = Yap_CurrentSlot();
sigjmp_buf signew, *sighold = LOCAL_RestartEnv;
LOCAL_RestartEnv = &signew;
int i = AllocLevel();
volatile int i = AllocLevel();
if /* top &&*/ ((lval = sigsetjmp(signew, 1)) != 0) {
switch (lval) {
case 1: { /* restart */
@ -1458,7 +1459,7 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
*/
/* reset the registers so that we don't have trash in abstract
* machine */
pop_text_stack(i);
pop_text_stack(i+1);
Yap_set_fpu_exceptions(
getAtomicGlobalPrologFlag(ARITHMETIC_EXCEPTIONS_FLAG));
P = (yamop *)FAILCODE;
@ -1467,7 +1468,7 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
} break;
case 3: { /* saved state */
// LOCAL_ActiveError = err_info;
pop_text_stack(i);
pop_text_stack(i+1);
LOCAL_CBorder = OldBorder;
LOCAL_RestartEnv = sighold;
LOCAL_PrologMode = UserMode;
@ -1481,7 +1482,7 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
// LOCAL_ActiveError = err_info;
while (B) {
LOCAL_ActiveError->errorNo = ABORT_EVENT;
pop_text_stack(i);
pop_text_stack(i+1);
Yap_CloseSlots(sls);
Yap_JumpToEnv();
}
@ -1489,7 +1490,7 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
P = (yamop *)FAILCODE;
LOCAL_RestartEnv = sighold;
Yap_CloseSlots(sls);
pop_text_stack(i);
pop_text_stack(i+1);
return false;
break;
case 5:
@ -1512,13 +1513,15 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
(CELL *)(B->cp_b) > LCL0 - LOCAL_CBorder) {
LOCAL_RestartEnv = sighold;
LOCAL_CBorder = OldBorder;
return false;
pop_text_stack(i+1);
return false;
}
P = FAILCODE;
}
}
YENV = ASP;
YENV[E_CB] = Unsigned(B);
pop_text_stack(i+1);
out = Yap_absmi(0);
/* make sure we don't leave a FAIL signal hanging around */
Yap_get_signal(YAP_FAIL_SIGNAL);
@ -1526,6 +1529,7 @@ static bool exec_absmi(bool top, yap_reset_t reset_mode USES_REGS) {
CalculateStackGap(PASS_REGS1);
LOCAL_CBorder = OldBorder;
LOCAL_RestartEnv = sighold;
pop_text_stack(i+1);
return out;
}
@ -1576,14 +1580,15 @@ void Yap_PrepGoal(arity_t arity, CELL *pt, choiceptr saved_b USES_REGS) {
static bool do_goal(yamop *CodeAdr, int arity, CELL *pt, bool top USES_REGS) {
choiceptr saved_b = B;
bool out;
Yap_PrepGoal(arity, pt, saved_b PASS_REGS);
CACHE_A1();
CACHE_S();
CACHE_A1();
P = (yamop *)CodeAdr;
// S = CellPtr(RepPredProp(
// PredPropByFunc(Yap_MkFunctor(AtomCall, 1), 0))); /* A1 mishaps */
out = exec_absmi(top, YAP_EXEC_ABSMI PASS_REGS);
ENDCACHE_S();
// if (out) {
// out = Yap_GetFromSlot(sl);
// }
@ -2113,6 +2118,7 @@ static Int jump_env(USES_REGS1) {
LCL0 - (CELL *)B > LOCAL_CBorder) {
// we're failing up to the top layer
}
pop_text_stack(LOCAL_MallocDepth+1);
return out;
}

View File

@ -633,7 +633,7 @@ type_of_verb(rest,passive).
*/
#include "absmi.h"
#include <absmi.h>
#include <Yatom.h>

View File

@ -1854,7 +1854,7 @@ void Yap_dump_stack(void) {
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
fprintf(stderr, "%% \n%% YAP Program:\n");
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
fprintf(stderr, "%% Program Position\n\n", Yap_errorName(errno) );
fprintf(stderr, "%% Program Position: %s\n\n", Yap_errorName(errno) );
fprintf(stderr, "%% PC: %s\n", (char *)HR);
Yap_detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, 256);
fprintf(stderr, "%% Continuation: %s\n", (char *)HR);
@ -1932,7 +1932,7 @@ fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
}
if (b_ptr) {
if (!max_count--) {
fprintf(stderr, "%%\** .....\n");
fprintf(stderr, "\** .....\n");
return;
}
if (b_ptr->cp_ap && /* tabling */
@ -1951,6 +1951,7 @@ fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
}
}
void DumpActiveGoals(USES_REGS1) {
/* try to dump active goals */
CELL *ep = YENV; /* and current environment */
@ -2006,7 +2007,7 @@ void DumpActiveGoals(USES_REGS1) {
op_numbers opnum;
if (!ONLOCAL(b_ptr) || b_ptr->cp_b == NULL)
break;
fprintf(stderr, "%%p ", b_ptr);
fprintf(stderr, "%% %p ", b_ptr);
pe = Yap_PredForChoicePt(b_ptr, &opnum);
if (opnum == _Nstop) {
fprintf(stderr, " ********** C-Code Interface Boundary ***********\n");
@ -2094,15 +2095,15 @@ void Yap_detect_bug_location(yamop *yap_pc, int where_from, int psize) {
if ((cl = Yap_PredForCode(yap_pc, where_from, &pred_name, &pred_arity,
&pred_module)) == 0) {
/* system predicate */
fprintf(stderr, "%%s", "meta-call");
fprintf(stderr, "%% %s", "meta-call");
} else if (pred_module == 0) {
fprintf(stderr, "in prolog:%s/%lu", RepAtom(pred_name)->StrOfAE,
(unsigned long int)pred_arity);
} else if (cl < 0) {
fprintf(stderr, "%%s:%s/%lu", RepAtom(AtomOfTerm(pred_module))->StrOfAE,
fprintf(stderr, "%% %s:%s/%lu", RepAtom(AtomOfTerm(pred_module))->StrOfAE,
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity);
} else {
fprintf(stderr, "%%s:%s/%lu at clause %lu",
fprintf(stderr, "%% %s:%s/%lu at clause %lu",
RepAtom(AtomOfTerm(pred_module))->StrOfAE,
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity,
(unsigned long int)cl);

View File

@ -305,7 +305,7 @@ static void *codes2buf(Term t0, void *b0, bool *get_codes USES_REGS) {
if (!IsVarTerm(t)) {
if (t != TermNil) {
Yap_ThrowError(TYPE_ERROR_LIST, t0, "scanning list of codes");
Yap_ThrowError(TYPE_ERROR_LIST, t, "scanning list of codes");
return NULL;
}
}
@ -508,6 +508,7 @@ unsigned char *Yap_readText(seq_tv_t *inp USES_REGS) {
s = Malloc(2 * MaxTmp(PASS_REGS1));
if (snprintf(s, MaxTmp(PASS_REGS1) - 1, Int_FORMAT,
IntegerOfTerm(inp->val.t)) < 0) {
pop_text_stack(lvl);
AUX_ERROR(inp->val.t, 2 * MaxTmp(PASS_REGS1), s, char);
}
return pop_output_text_stack(lvl, s);
@ -527,6 +528,7 @@ unsigned char *Yap_readText(seq_tv_t *inp USES_REGS) {
char *s;
s = Malloc(MaxTmp());
if (!Yap_mpz_to_string(Yap_BigIntOfTerm(inp->val.t), s, MaxTmp() - 1, 10)) {
pop_text_stack(lvl);
AUX_ERROR(inp->val.t, MaxTmp(PASS_REGS1), s, char);
}
return inp->val.uc = pop_output_text_stack(lvl, s);
@ -766,7 +768,7 @@ void *write_buffer(unsigned char *s0, seq_tv_t *out USES_REGS) {
pop_text_stack(l);
return NULL;
}
out->val.c = pop_output_text_stack__(l, out->val.c);
out->val.c = pop_output_text_stack(l, out->val.c);
return out->val.c;
}

View File

@ -159,13 +159,15 @@ static void consult(const char *b_file USES_REGS) {
Functor functor_query = Yap_MkFunctor(Yap_LookupAtom("?-"), 1);
Functor functor_command1 = Yap_MkFunctor(Yap_LookupAtom(":-"), 1);
Functor functor_compile2 = Yap_MkFunctor(Yap_LookupAtom("c_compile"), 1);
char *full;
/* consult in C */
int lvl = push_text_stack();
char *full = Malloc(YAP_FILENAME_MAX + 1);
full[0] = '\0';
/* the consult mode does not matter here, really */
if ((osno = Yap_CheckAlias(AtomLoopStream)) < 0)
if ((osno = Yap_CheckAlias(AtomLoopStream)) < 0) {
osno = 0;
}
c_stream = YAP_InitConsult(YAP_BOOT_MODE, b_file, &full, &oactive);
if (c_stream < 0) {
fprintf(stderr, "[ FATAL ERROR: could not open file %s ]\n", b_file);
@ -977,7 +979,6 @@ static void end_init(YAP_init_args *iap) {
if (iap->HaltAfterBoot) Yap_exit(0);
LOCAL_PrologMode &= ~BootMode;
CurrentModule = USER_MODULE;
}
static void start_modules(void) {
@ -1046,10 +1047,16 @@ X_API void YAP_Init(YAP_init_args *yap_init) {
init_globals(yap_init);
start_modules();
consult(Yap_BOOTFILE PASS_REGS);
if (yap_init->install && Yap_OUTPUT_STARTUP) {
setAtomicGlobalPrologFlag(RESOURCE_DATABASE_FLAG,
MkAtomTerm(Yap_LookupAtom(Yap_INPUT_STARTUP)));
setBooleanGlobalPrologFlag(SAVED_PROGRAM_FLAG, true);
}
YAP_RunGoalOnce(TermInitProlog);
if (yap_init->install && Yap_OUTPUT_STARTUP) {
Term t = MkAtomTerm(Yap_LookupAtom(Yap_OUTPUT_STARTUP));
Term g = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("qsave_program"), 1),
Term g = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("qsave_program"), 1),
1, &t);
YAP_RunGoalOnce(g);

View File

@ -319,7 +319,6 @@ set(libpl ${YAP_INSTALL_PLDIR})
# include( Model )
include(cudd )
include(java )
set(pl_library "" CACHE INTERNAL "prolog library files")
set(pl_os_library "" CACHE INTERNAL "prolog os files")
@ -374,8 +373,8 @@ endif()
set(YAP_FOUND ON)
set(YAP_MAJOR_VERSION 6)
set(YAP_MINOR_VERSION 3)
set(YAP_PATCH_VERSION 5)
set(YAP_MINOR_VERSION 4)
set(YAP_PATCH_VERSION 0)
set(YAP_FULL_VERSION
${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}.${YAP_PATCH_VERSION})
@ -780,6 +779,71 @@ endif ()
add_subDIRECTORY(packages/real)
option(WITH_JAVA "Try to use Java (currently Java 6,7,8)" ON)
if (WITH_JAVA)
#detect java setup, as it is shared between different installations.
find_package(Java COMPONENTS Runtime Development)
# find_package(Java COMPONENTS Development)
# find_package(Java COMPONENTS Runtime)
#find_package(JavaLibs)
if (Java_Development_FOUND)
set (STD_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
set (CMAKE_FIND_FRAMEWORK LAST) # CMake will find the Java returned by /usr/libexec/java_home.
find_package(JNI)
set (CMAKE_FIND_FRAMEWORK ${STD_CMAKE_FIND_FRAMEWORK})
if (NOT JNI_FOUND)
set (JAVA_HOME ${JAVA_INCLUDE_PATH}/..)
endif()
if (JNI_FOUND)
include(UseJava)
#
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
# Java_IDLJ_EXECUTABLE = the full path to the Java idl compiler
# Java_JAR_EXECUTABLE = the full path to the Java archiver
# Java_JARSIGNER_EXECUTABLE = the full path to the Java jar signer
# Java_VERSION_STRING = Version of java found, eg. 1.6.0_12
# Java_VERSION_MAJOR = The major version of the package found.
# Java_VERSION_MINOR = The minor version of the package found.
# Java_VERSION_PATCH = The patch version of the package found.
# Java_VERSION_TWEAK = The tweak version of the package found (after '_')
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
#
# The Java_ADDITIONAL_VERSIONS variable can be used to specify a list
# of version numbers that should be taken into account when searching
# for Java. You need to set this variable before calling
# find_package(JavaLibs).
#
#macro_optional_find_package(JNI ON)
# JNI_INCLUDE_DIRS = the include dirs to use
# JNI_LIBRARIES = the libraries to use
# JNI_FOUND = TRUE if JNI headers and libraries were found.
# JAVA_AWT_LIBRARY = the path to the jawt library
# JAVA_JVM_LIBRARY = the path to the jvm library
# JAVA_INCLUDE_PATH = the include path to jni.h
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
endif (JNI_FOUND)
endif (Java_Development_FOUND)
endif(WITH_JAVA)
add_subDIRECTORY(packages/jpl)
add_subDIRECTORY(packages/bdd)

View File

@ -6,6 +6,8 @@
#ifndef _YAPDB_H
#define _YAPDB_H
#include <YapInterface.h>
#define YAP_CPP_DB_INTERFACE 1
@ -70,7 +72,7 @@ class X_API YAPModuleProp : public YAPProp {
public:
YAPModuleProp(YAPModule tmod) { m = Yap_GetModuleEntry(tmod.gt()); };
YAPModuleProp() { CACHE_REGS m = Yap_GetModuleEntry(Yap_CurrentModule()); };
YAPModuleProp() { m = Yap_GetModuleEntry(YAP_CurrentModule()); };
virtual YAPModule module() { return YAPModule(m->AtomOfME); };
};

View File

@ -94,7 +94,7 @@ public:
/// should be a callable
/// goal.
inline YAPQuery(const char *s) : YAPPredicate(s, goal, names, (nts = &ARG1)) {
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %d",
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %ld",
LOCAL_CurSlot);
openQuery();
@ -114,7 +114,7 @@ public:
/// It i;
///};
/// build a query from a term
YAPQuery(YAPTerm t) : YAPPredicate((goal = t.term()),(nts=Yap_XREGS+1)) {
YAPQuery(YAPTerm t) : YAPPredicate((goal = t.term()), nts) {
BACKUP_MACHINE_REGS();
openQuery();
names = TermNil ;

View File

@ -24,7 +24,7 @@
#define MaxTemps 512
#define MaxArithms 32
#ifdef i386
#if defined(i386) && CELLSIZE == 4
#define PUSH_REGS 1
#undef PUSH_X
#endif
@ -34,7 +34,7 @@
#undef PUSH_X
#endif
#ifdef __x86_64__
#if defined(__x86_64__) && CELLSIZE == 8
#define PUSH_REGS 1
#undef PUSH_X
#endif

View File

@ -20,6 +20,7 @@
#ifndef YATOM_H
#define YATOM_H 1
INLINE_ONLY inline EXTERN Atom AbsAtom(AtomEntry *p);
INLINE_ONLY inline EXTERN AtomEntry *RepAtom(Atom a);

View File

@ -58,7 +58,7 @@
#define USE_PREFETCH 1
#endif
#ifdef i386
#if defined(i386) && CELLSIZE == 4
#define Y_IN_MEM 1
#define S_IN_MEM 1
#define TR_IN_MEM 1
@ -86,7 +86,7 @@ register struct yami *P1REG asm("bp"); /* can't use yamop before Yap.h */
#define TR_IN_MEM 1
#endif /* sparc_ */
#ifdef __x86_64__
#if defined(__x86_64__) && CELLSIZE == 8
#define SHADOW_P 1
#ifdef BP_FREE
#undef BP_FREE
@ -100,7 +100,7 @@ register struct yami *P1REG asm("bp"); /* can't use yamop before Yap.h */
#endif /* __x86_64__ */
#if defined(__arm__) || defined(__thumb__) || defined(mips) || \
defined(__mips64) || defined(__aarch64__)
defined(__mips64) || defined(__arch64__)
#define Y_IN_MEM 1
#define S_IN_MEM 1
@ -119,7 +119,7 @@ register struct yami *P1REG asm("bp"); /* can't use yamop before Yap.h */
#define SHADOW_S 1
#endif
#ifdef i386
#if defined(i386) && CELLSIZE == 4
#define Y_IN_MEM 1
#define S_IN_MEM 1
#define TR_IN_MEM 1
@ -305,30 +305,6 @@ INLINE_ONLY inline EXTERN void restore_absmi_regs(REGSTORE *old_regs) {
#endif
#if S_IN_MEM
#define CACHE_A1()
#define CACHED_A1() ARG1
#else
#ifndef _NATIVE
#define CACHE_A1() (SREG = (CELL *)ARG1)
#define CACHED_A1() ((CELL)SREG)
#else
#define CACHE_A1() ((*_SREG) = (CELL *)ARG1)
#define CACHED_A1() ((CELL)(*_SREG))
#endif /* _NATIVE */
#endif /* S_IN_MEM */
/***************************************************************
* TR is usually, but not always, a register. This affects *
* backtracking *
@ -374,11 +350,19 @@ INLINE_ONLY inline EXTERN void restore_absmi_regs(REGSTORE *old_regs) {
#define READ_IN_S() S_SREG = SREG
#define CACHE_A1() (SREG = (CELL *)ARG1)
#define CACHED_A1() ((CELL)SREG)
#else
#define READ_IN_S() S_SREG = *_SREG
#endif
#define CACHE_A1() ((*_SREG) = (CELL *)ARG1)
#define CACHED_A1() ((CELL)(*_SREG))
#endif
#else
@ -390,6 +374,10 @@ INLINE_ONLY inline EXTERN void restore_absmi_regs(REGSTORE *old_regs) {
#define READ_IN_S()
#define CACHE_A1()
#define CACHED_A1() (ARG1)
#define S_SREG SREG
#endif

View File

@ -1,11 +1,11 @@
#ifndef _YAP_INLINE_ONLY_H_
#define _YAP_INLINE_ONLY_H_
#ifdef __GNUC__
#if defined(__GNUC__ )
#define INLINE_ONLY __attribute__((gnu_inline,always_inline))
//#define INLINE_ONLY
#else
#define INLINE_ONLY EXTERN
#define INLINE_ONLY
#endif
#endif

View File

@ -121,6 +121,7 @@ LOCAL_INIT(Int, LastGcTime, 0L);
LOCAL_INIT(Int, LastSSTime, 0L);
LOCAL_INIT(CELL *, OpenArray, NULL);
/* in a single gc */
LOCAL_INIT(int, MallocDepth, 0L);
LOCAL_INIT(Int, total_marked, 0L);
LOCAL_INIT(Int, total_oldies, 0L);
LOCAL_INIT(struct choicept *, current_B, NULL);

View File

@ -1,126 +0,0 @@
// play nice
#ifndef HAVE_PYTHON
/* #undef HAVE_PYTHON */
#endif
#if HAVE_PYTHON
#include <Python.h>
#endif
/* Define if you have libreadline */
#ifndef HAVE_LIBREADLINE
#define HAVE_LIBREADLINE CACHE;YES;BOOL;Readline works.
#endif
/* Define to 1 if you have the <readline/history.h> header file. */
#ifndef HAVE_READLINE_HISTORY_H
#define HAVE_READLINE_HISTORY_H 1
#endif
/* Define to 1 if you have the <readline/readline.h> header file. */
#ifndef HAVE_READLINE_READLINE_H
#define HAVE_READLINE_READLINE_H 1
#endif
#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
#define USE_READLINE 1
#endif
/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if
you don't. */
#ifndef HAVE_DECL_RL_CATCH_SIGNALS_
#define HAVE_DECL_RL_CATCH_SIGNALS 1
#endif
/* Define to 1 if you have the declaration of `rl_done ', and to 0 if you
don't. */
#ifndef HAVE_DECL_RL_DONE_
/* #undef HAVE_DECL_RL_DONE_ */
#endif
/* Define to 1 if you have the declaration of `rl_event_hook', and to 0 if you
don't. */
#ifndef HAVE_DECL_RL_EVENT_HOOK
/* #undef HAVE_DECL_RL_EVENT_HOOK */
#endif
/* Define to 1 if you have the declaration of `rl_readline_state', and to 0 if
you don't. */
#ifndef HAVE_DECL_RL_READLINE_STATE
/* #undef HAVE_DECL_RL_READLINE_STATE */
#endif
/* Define to 1 if you have the `rl_begin_undo_group' function. */
#ifndef HAVE_RL_BEGIN_UNDO_GROUP
#define HAVE_RL_BEGIN_UNDO_GROUP 1
#endif
/* Define to 1 if you have the `rl_clear_pending_input' function. */
#ifndef HAVE_RL_CLEAR_PENDING_INPUT
#define HAVE_RL_CLEAR_PENDING_INPUT 1
#endif
/* Define to 1 if the system has the type `rl_completion_entry_function'). */
#ifndef HAVE_RL_COMPLETION_ENTRY_FUNCTION
/* #undef HAVE_RL_COMPLETION_ENTRY_FUNCTION */
#endif
/* Define to 1 if the system has the type `rl_completion_func_t'. */
#ifndef HAVE_RL_COMPLETION_FUNC_T
/* #undef HAVE_RL_COMPLETION_FUNC_T */
#endif
/* Define to 1 if you have the `rl_completion_matches' function. */
#ifndef HAVE_RL_COMPLETION_MATCHES
/* #undef HAVE_RL_COMPLETION_MATCHES */
#endif
/* Define to 1 if you have the `rl_discard_argument' function. */
#ifndef HAVE_RL_DISCARD_ARGUMENT
#define HAVE_RL_DISCARD_ARGUMENT 1
#endif
/* Define to 1 if you have the `rl_done' variable. */
#ifndef HAVE_RL_DONE
#define HAVE_RL_DONE
#endif
/* Define to 1 if you have the `rl_filename_completion_function' function. */
#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION
#define HAVE_RL_FILENAME_COMPLETION_FUNCTION
#endif
/* Define to 1 if you have the `rl_free_line_state' function. */
#ifndef HAVE_RL_FREE_LINE_STATE
#define HAVE_RL_FREE_LINE_STATE 1
#endif
/* Define to 1 if the system has the type `rl_hook_func_t'. */
#ifndef HAVE_RL_HOOK_FUNC_T
/* #undef HAVE_RL_HOOK_FUNC_T */
#endif
/* Define to 1 if you have the `rl_insert_close' function. */
#ifndef HAVE_RL_INSERT_CLOSE
#define HAVE_RL_INSERT_CLOSE 1
#endif
/* Define to 1 if you have the `rl_reset_after_signal' function. */
#ifndef HAVE_RL_RESET_AFTER_SIGNAL
#define HAVE_RL_RESET_AFTER_SIGNAL 1
#endif
/* Define to 1 if you have the `rl_set_keyboard_input_timeout' function. */
#ifndef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT
#define HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT 1
#endif
/* Define to 1 if you have the `rl_set_prompt' function. */
#ifndef HAVE_RL_SET_PROMPT
#define HAVE_RL_SET_PROMPT 1
#endif
/* Define to 1 if you have the `rl_set_signals' function. */
#ifndef HAVE_RL_SET_SIGNALS
#define HAVE_RL_SET_SIGNALS 1
#endif

View File

@ -1,62 +0,0 @@
option(WITH_JAVA "Try to use Java (currently Java 6,7,8)" ON)
if (WITH_JAVA)
#detect java setup, as it is shared between different installations.
find_package(Java 1.8 COMPONENTS Runtime Development)
# find_package(Java COMPONENTS Development)
# find_package(Java COMPONENTS Runtime)
#find_package(JavaLibs)
if (Java_Development_FOUND)
find_package(JNI)
if (NOT JNI_FOUND)
set (JAVA_HOME ${JAVA_INCLUDE_PATH}/..)
endif()
find_package(JNI)
if (JNI_FOUND)
include(UseJava)
#
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
# Java_IDLJ_EXECUTABLE = the full path to the Java idl compiler
# Java_JAR_EXECUTABLE = the full path to the Java archiver
# Java_JARSIGNER_EXECUTABLE = the full path to the Java jar signer
# Java_VERSION_STRING = Version of java found, eg. 1.6.0_12
# Java_VERSION_MAJOR = The major version of the package found.
# Java_VERSION_MINOR = The minor version of the package found.
# Java_VERSION_PATCH = The patch version of the package found.
# Java_VERSION_TWEAK = The tweak version of the package found (after '_')
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
#
# The Java_ADDITIONAL_VERSIONS variable can be used to specify a list
# of version numbers that should be taken into account when searching
# for Java. You need to set this variable before calling
# find_package(JavaLibs).
#
#macro_optional_find_package(JNI ON)
# JNI_INCLUDE_DIRS = the include dirs to use
# JNI_LIBRARIES = the libraries to use
# JNI_FOUND = TRUE if JNI headers and libraries were found.
# JAVA_AWT_LIBRARY = the path to the jawt library
# JAVA_JVM_LIBRARY = the path to the jvm library
# JAVA_INCLUDE_PATH = the include path to jni.h
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
endif (JNI_FOUND)
endif (Java_Development_FOUND)
endif(WITH_JAVA)

View File

@ -109,7 +109,7 @@ typedef struct vfs {
int (*writers)(int ch, int sno);
/** VFS dep
endent area */
cell_size_t priv[4];
void *priv;
struct vfs *next;
} VFS_t;

View File

File diff suppressed because it is too large Load Diff

14
kernel
View File

@ -1,14 +0,0 @@
mkdir tmp_k
cd tmp_k
cp -a ~/github/ipykernel/* .
for i in *py */*py */*/*py; do
sed -i '.bk' -e 's/ipkernel/yapkernel/g' $i
sed -i '.bk' -e 's/ipykernel/yap_kernel/g' $i
sed -i '.bk' -e 's/IPKernelApp/YAP_KernelApp/g' $i
sed -i '.bk' -e 's/IPythonKernel/YAPKernel/g' $i
sed -i '.bk' -e 's/IPKernel/YAPKernel/g' $i
done
mv ipykernel yap_kernel
mv ipykernel_launcher.py yap_kernel_launcher.py
mv yap_kernel/ipkernel.py yap_kernel/yapkernel.py

57
l
View File

@ -1,57 +0,0 @@
Attempting to finalize metadata for yap4py
INFO:conda_build.metadata:Attempting to finalize metadata for yap4py
Traceback (most recent call last):
File "/home/vsc/anaconda3/bin/conda-build", line 11, in <module>
sys.exit(main())
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 388, in main
execute(sys.argv[1:])
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 379, in execute
verify=args.verify)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/api.py", line 185, in build
need_source_download=need_source_download, config=config, variants=variants)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/build.py", line 1774, in build_tree
notest=notest,
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/build.py", line 882, in build
output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/render.py", line 553, in expand_outputs
for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 1767, in get_output_metadata_set
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 640, in finalize_outputs_pass
fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/render.py", line 290, in finalize_metadata
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/render.py", line 113, in get_env_dependencies
channel_urls=tuple(m.config.channel_urls))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda_build/environ.py", line 683, in get_install_actions
actions = install_actions(prefix, index, specs, force=True)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/plan.py", line 461, in install_actions
update_deps, pinned)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/plan.py", line 631, in get_actions_for_dists
pkgs = r.install(specs, installed, update_deps=update_deps)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 813, in install
pkgs = self.solve(specs, returnall=returnall)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 853, in solve
reduced_index = self.get_reduced_index(specs)
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 437, in get_reduced_index
found = filter_group([s])
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 417, in filter_group
res = filter_group(set(deps))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 417, in filter_group
res = filter_group(set(deps))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 417, in filter_group
res = filter_group(set(deps))
[Previous line repeated 1 more times]
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 391, in filter_group
for ms in self.ms_depends(fkey)))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 391, in <genexpr>
for ms in self.ms_depends(fkey)))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/resolve.py", line 390, in <genexpr>
all(any(filter.get(f2, True) for f2 in self.find_matches(ms))
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/models/dist.py", line 242, in __hash__
return hash(self.__key__())
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/models/dist.py", line 223, in __key__
return self.channel, self.dist_name, self.with_features_depends
File "/home/vsc/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 417, in __get__
return self.unbox(instance, instance_type, val)
KeyboardInterrupt

View File

@ -1,37 +0,0 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "pt.up.yap.app"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
cmake {
// cFlags "-DTEST_C_FLAG1" "-DTEST_C_FLAG2"
// cppFlags "-DTEST_CPP_FLAG2" "-DTEST_CPP_FLAG2"
abiFilters "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
}

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":lib" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":lib" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-idling-resource/2.2.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/exposed-instrumentation-api-publish/0.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/rules/0.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support.test/runner/0.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-core-2.2.2" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.4.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="runner-0.5" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="exposed-instrumentation-api-publish-0.5" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-idling-resource-2.2.2" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="rules-0.5" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-library-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="javax.annotation-api-1.2" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="javax.inject-1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-integration-1.3" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-23.4.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="javawriter-2.1.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.4.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-23.4.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="jsr305-2.0.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.4.0" level="project" />
</component>
</module>

View File

@ -78,6 +78,9 @@ open_asset(VFS_t *me, const char *fname, const char *io_mode, int sno) {
// strcpy(dir, fname);
// char *d = basename(dir);
am = AAssetManager_open(Yap_assetManager(), fname, mode);
if (am==NULL)
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "failed open %s <%s>", fname, strerror(errno) );
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "open %s <%s>", fname, io_mode );
// while (dp) {
// char *f = AAssetDir_getNextFileName(dp);

View File

@ -671,7 +671,7 @@ static Int list_directory(USES_REGS1) {
#if __ANDROID__
{
const char *dirName = buf + strlen("/assets/");
AAssetManager *mgr = GLOBAL_VFS->priv[0].mgr;
AAssetManager *mgr = GLOBAL_VFS->priv;
AAssetDir *de;
const char *dp;
@ -680,8 +680,8 @@ static Int list_directory(USES_REGS1) {
strerror(errno));
}
while ((dp = AAssetDir_getNextFileName(de))) {
YAP_Term ti = YAP_MkAtomTerm(YAP_LookupAtom(dp));
YAP_PutInSlot(sl, YAP_MkPairTerm(ti, YAP_GetFromSlot(sl)));
YAP_Term ti = MkAtomTerm(Yap_LookupAtom(dp));
Yap_PutInHandle(sl, MkPairTerm(ti, Yap_GetFromHandle(sl)));
}
AAssetDir_close(de);
}

View File

@ -401,6 +401,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
*HR++ = oargs;
*HR++ = otail;
if (!Yap_growheap(FALSE, LOCAL_Error_Size, NULL)) {
pop_text_stack(l);
Yap_Error(RESOURCE_ERROR_HEAP, otail, "format/2");
return false;
}
@ -428,6 +429,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
return false;
}
if (IsVarTerm(args)) {
pop_text_stack(l);
format_clean_up(sno0, sno, finfo);
Yap_Error(INSTANTIATION_ERROR, args, "format/2");
return FALSE;
@ -437,16 +439,19 @@ static Int doformat(volatile Term otail, volatile Term oargs,
args = ArgOfTerm(2, args);
if (IsVarTerm(fmod)) {
format_clean_up(sno0, sno, finfo);
pop_text_stack(l);
Yap_Error(INSTANTIATION_ERROR, fmod, "format/2");
return false;
}
if (!IsAtomTerm(fmod)) {
format_clean_up(sno0, sno, finfo);
pop_text_stack(l);
Yap_Error(TYPE_ERROR_ATOM, fmod, "format/2");
return false;
}
if (IsVarTerm(args)) {
format_clean_up(sno0, sno, finfo);
pop_text_stack(l);
Yap_Error(INSTANTIATION_ERROR, args, "format/2");
return FALSE;
}
@ -460,6 +465,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
if (tnum == FORMAT_COPY_ARGS_ERROR ||
tnum == FORMAT_COPY_ARGS_OVERFLOW) {
format_clean_up(sno0, sno, finfo);
pop_text_stack(l);
return false;
}
else if (tnum == tsz ) {
@ -484,6 +490,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
fstr = NULL;
format_clean_up(sno, sno0, finfo);
pop_text_stack(l);
return false;
}
GLOBAL_Stream[sno].status |= CloseOnException_Stream_f;
@ -801,6 +808,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
if (!alloc_fstr)
fstr = NULL;
format_clean_up(sno, sno0, finfo);
pop_text_stack(l);
return false;
}
ARG1 = Yap_GetFromHandle(s1);
@ -837,6 +845,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
targs = NULL;
}
format_clean_up(sno, sno0, finfo);
pop_text_stack(l);
Yap_RaiseException();
return false;
}
@ -973,6 +982,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
}
format_clean_up(sno, sno0, finfo);
LOCAL_Error_TYPE = YAP_NO_ERROR;
pop_text_stack(l);
return false;
}
}
@ -997,6 +1007,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
fstr = NULL;
targs = NULL;
format_clean_up(sno, sno0, finfo);
pop_text_stack(l);
return true;
}

View File

@ -0,0 +1 @@
6.0.1

File diff suppressed because it is too large Load Diff

View 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 IntPropLevel gecode_IntPropLevel_from_term(YAP_Term);
static TaskType gecode_TaskType_from_term(YAP_Term);
static TraceEvent gecode_TraceEvent_from_term(YAP_Term);
static SetRelType gecode_SetRelType_from_term(YAP_Term);
static SetOpType gecode_SetOpType_from_term(YAP_Term);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,675 @@
// -*- 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("IPL_DEF");
gecode_IPL_DEF = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_VAL");
gecode_IPL_VAL = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_BND");
gecode_IPL_BND = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_DOM");
gecode_IPL_DOM = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_BASIC");
gecode_IPL_BASIC = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_ADVANCED");
gecode_IPL_ADVANCED = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("IPL_BASIC_ADVANCED");
gecode_IPL_BASIC_ADVANCED = 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("TE_INIT");
gecode_TE_INIT = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_PRUNE");
gecode_TE_PRUNE = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_FIX");
gecode_TE_FIX = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_FAIL");
gecode_TE_FAIL = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_DONE");
gecode_TE_DONE = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_PROPAGATE");
gecode_TE_PROPAGATE = YAP_MkAtomTerm(X);
YAP_AtomGetHold(X); }
{ YAP_Atom X= YAP_LookupAtom("TE_COMMIT");
gecode_TE_COMMIT = 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_branch_1", gecode_constraint_branch_1, 2);
YAP_UserCPredicate("gecode_constraint_convex_2", gecode_constraint_convex_2, 2);
YAP_UserCPredicate("gecode_constraint_convex_3", gecode_constraint_convex_3, 3);
YAP_UserCPredicate("gecode_constraint_abs_4", gecode_constraint_abs_4, 3);
YAP_UserCPredicate("gecode_constraint_abs_5", gecode_constraint_abs_5, 3);
YAP_UserCPredicate("gecode_constraint_abs_6", gecode_constraint_abs_6, 4);
YAP_UserCPredicate("gecode_constraint_argmax_7", gecode_constraint_argmax_7, 3);
YAP_UserCPredicate("gecode_constraint_argmax_8", gecode_constraint_argmax_8, 4);
YAP_UserCPredicate("gecode_constraint_argmax_10", gecode_constraint_argmax_10, 4);
YAP_UserCPredicate("gecode_constraint_argmax_9", gecode_constraint_argmax_9, 5);
YAP_UserCPredicate("gecode_constraint_argmax_11", gecode_constraint_argmax_11, 5);
YAP_UserCPredicate("gecode_constraint_argmax_12", gecode_constraint_argmax_12, 6);
YAP_UserCPredicate("gecode_constraint_argmin_13", gecode_constraint_argmin_13, 3);
YAP_UserCPredicate("gecode_constraint_argmin_14", gecode_constraint_argmin_14, 4);
YAP_UserCPredicate("gecode_constraint_argmin_16", gecode_constraint_argmin_16, 4);
YAP_UserCPredicate("gecode_constraint_argmin_15", gecode_constraint_argmin_15, 5);
YAP_UserCPredicate("gecode_constraint_argmin_17", gecode_constraint_argmin_17, 5);
YAP_UserCPredicate("gecode_constraint_argmin_18", gecode_constraint_argmin_18, 6);
YAP_UserCPredicate("gecode_constraint_assign_19", gecode_constraint_assign_19, 3);
YAP_UserCPredicate("gecode_constraint_assign_21", gecode_constraint_assign_21, 3);
YAP_UserCPredicate("gecode_constraint_assign_23", gecode_constraint_assign_23, 3);
YAP_UserCPredicate("gecode_constraint_assign_25", gecode_constraint_assign_25, 3);
YAP_UserCPredicate("gecode_constraint_assign_27", gecode_constraint_assign_27, 3);
YAP_UserCPredicate("gecode_constraint_assign_30", gecode_constraint_assign_30, 3);
YAP_UserCPredicate("gecode_constraint_assign_33", gecode_constraint_assign_33, 3);
YAP_UserCPredicate("gecode_constraint_assign_36", gecode_constraint_assign_36, 3);
YAP_UserCPredicate("gecode_constraint_assign_20", gecode_constraint_assign_20, 4);
YAP_UserCPredicate("gecode_constraint_assign_22", gecode_constraint_assign_22, 4);
YAP_UserCPredicate("gecode_constraint_assign_24", gecode_constraint_assign_24, 4);
YAP_UserCPredicate("gecode_constraint_assign_26", gecode_constraint_assign_26, 4);
YAP_UserCPredicate("gecode_constraint_assign_28", gecode_constraint_assign_28, 4);
YAP_UserCPredicate("gecode_constraint_assign_31", gecode_constraint_assign_31, 4);
YAP_UserCPredicate("gecode_constraint_assign_34", gecode_constraint_assign_34, 4);
YAP_UserCPredicate("gecode_constraint_assign_37", gecode_constraint_assign_37, 4);
YAP_UserCPredicate("gecode_constraint_assign_29", gecode_constraint_assign_29, 5);
YAP_UserCPredicate("gecode_constraint_assign_32", gecode_constraint_assign_32, 5);
YAP_UserCPredicate("gecode_constraint_assign_35", gecode_constraint_assign_35, 5);
YAP_UserCPredicate("gecode_constraint_assign_38", gecode_constraint_assign_38, 5);
YAP_UserCPredicate("gecode_constraint_binpacking_39", gecode_constraint_binpacking_39, 4);
YAP_UserCPredicate("gecode_constraint_binpacking_40", gecode_constraint_binpacking_40, 5);
YAP_UserCPredicate("gecode_constraint_branch_41", gecode_constraint_branch_41, 3);
YAP_UserCPredicate("gecode_constraint_branch_43", gecode_constraint_branch_43, 3);
YAP_UserCPredicate("gecode_constraint_branch_45", gecode_constraint_branch_45, 3);
YAP_UserCPredicate("gecode_constraint_branch_47", gecode_constraint_branch_47, 3);
YAP_UserCPredicate("gecode_constraint_branch_42", gecode_constraint_branch_42, 4);
YAP_UserCPredicate("gecode_constraint_branch_44", gecode_constraint_branch_44, 4);
YAP_UserCPredicate("gecode_constraint_branch_46", gecode_constraint_branch_46, 4);
YAP_UserCPredicate("gecode_constraint_branch_48", gecode_constraint_branch_48, 4);
YAP_UserCPredicate("gecode_constraint_branch_49", gecode_constraint_branch_49, 4);
YAP_UserCPredicate("gecode_constraint_branch_55", gecode_constraint_branch_55, 4);
YAP_UserCPredicate("gecode_constraint_branch_61", gecode_constraint_branch_61, 4);
YAP_UserCPredicate("gecode_constraint_branch_64", gecode_constraint_branch_64, 4);
YAP_UserCPredicate("gecode_constraint_branch_67", gecode_constraint_branch_67, 4);
YAP_UserCPredicate("gecode_constraint_branch_73", gecode_constraint_branch_73, 4);
YAP_UserCPredicate("gecode_constraint_branch_79", gecode_constraint_branch_79, 4);
YAP_UserCPredicate("gecode_constraint_branch_85", gecode_constraint_branch_85, 4);
YAP_UserCPredicate("gecode_constraint_branch_50", gecode_constraint_branch_50, 5);
YAP_UserCPredicate("gecode_constraint_branch_52", gecode_constraint_branch_52, 5);
YAP_UserCPredicate("gecode_constraint_branch_56", gecode_constraint_branch_56, 5);
YAP_UserCPredicate("gecode_constraint_branch_58", gecode_constraint_branch_58, 5);
YAP_UserCPredicate("gecode_constraint_branch_62", gecode_constraint_branch_62, 5);
YAP_UserCPredicate("gecode_constraint_branch_65", gecode_constraint_branch_65, 5);
YAP_UserCPredicate("gecode_constraint_branch_68", gecode_constraint_branch_68, 5);
YAP_UserCPredicate("gecode_constraint_branch_70", gecode_constraint_branch_70, 5);
YAP_UserCPredicate("gecode_constraint_branch_74", gecode_constraint_branch_74, 5);
YAP_UserCPredicate("gecode_constraint_branch_76", gecode_constraint_branch_76, 5);
YAP_UserCPredicate("gecode_constraint_branch_80", gecode_constraint_branch_80, 5);
YAP_UserCPredicate("gecode_constraint_branch_82", gecode_constraint_branch_82, 5);
YAP_UserCPredicate("gecode_constraint_branch_86", gecode_constraint_branch_86, 5);
YAP_UserCPredicate("gecode_constraint_branch_88", gecode_constraint_branch_88, 5);
YAP_UserCPredicate("gecode_constraint_branch_51", gecode_constraint_branch_51, 6);
YAP_UserCPredicate("gecode_constraint_branch_53", gecode_constraint_branch_53, 6);
YAP_UserCPredicate("gecode_constraint_branch_57", gecode_constraint_branch_57, 6);
YAP_UserCPredicate("gecode_constraint_branch_59", gecode_constraint_branch_59, 6);
YAP_UserCPredicate("gecode_constraint_branch_63", gecode_constraint_branch_63, 6);
YAP_UserCPredicate("gecode_constraint_branch_66", gecode_constraint_branch_66, 6);
YAP_UserCPredicate("gecode_constraint_branch_69", gecode_constraint_branch_69, 6);
YAP_UserCPredicate("gecode_constraint_branch_71", gecode_constraint_branch_71, 6);
YAP_UserCPredicate("gecode_constraint_branch_75", gecode_constraint_branch_75, 6);
YAP_UserCPredicate("gecode_constraint_branch_77", gecode_constraint_branch_77, 6);
YAP_UserCPredicate("gecode_constraint_branch_81", gecode_constraint_branch_81, 6);
YAP_UserCPredicate("gecode_constraint_branch_83", gecode_constraint_branch_83, 6);
YAP_UserCPredicate("gecode_constraint_branch_87", gecode_constraint_branch_87, 6);
YAP_UserCPredicate("gecode_constraint_branch_89", gecode_constraint_branch_89, 6);
YAP_UserCPredicate("gecode_constraint_branch_54", gecode_constraint_branch_54, 7);
YAP_UserCPredicate("gecode_constraint_branch_60", gecode_constraint_branch_60, 7);
YAP_UserCPredicate("gecode_constraint_branch_72", gecode_constraint_branch_72, 7);
YAP_UserCPredicate("gecode_constraint_branch_78", gecode_constraint_branch_78, 7);
YAP_UserCPredicate("gecode_constraint_branch_84", gecode_constraint_branch_84, 7);
YAP_UserCPredicate("gecode_constraint_branch_90", gecode_constraint_branch_90, 7);
YAP_UserCPredicate("gecode_constraint_cardinality_91", gecode_constraint_cardinality_91, 4);
YAP_UserCPredicate("gecode_constraint_cardinality_92", gecode_constraint_cardinality_92, 4);
YAP_UserCPredicate("gecode_constraint_channel_93", gecode_constraint_channel_93, 3);
YAP_UserCPredicate("gecode_constraint_channel_95", gecode_constraint_channel_95, 3);
YAP_UserCPredicate("gecode_constraint_channel_96", gecode_constraint_channel_96, 3);
YAP_UserCPredicate("gecode_constraint_channel_97", gecode_constraint_channel_97, 3);
YAP_UserCPredicate("gecode_constraint_channel_100", gecode_constraint_channel_100, 3);
YAP_UserCPredicate("gecode_constraint_channel_94", gecode_constraint_channel_94, 4);
YAP_UserCPredicate("gecode_constraint_channel_98", gecode_constraint_channel_98, 4);
YAP_UserCPredicate("gecode_constraint_channel_101", gecode_constraint_channel_101, 4);
YAP_UserCPredicate("gecode_constraint_channel_99", gecode_constraint_channel_99, 5);
YAP_UserCPredicate("gecode_constraint_channel_102", gecode_constraint_channel_102, 5);
YAP_UserCPredicate("gecode_constraint_channel_103", gecode_constraint_channel_103, 6);
YAP_UserCPredicate("gecode_constraint_circuit_104", gecode_constraint_circuit_104, 4);
YAP_UserCPredicate("gecode_constraint_circuit_115", gecode_constraint_circuit_115, 4);
YAP_UserCPredicate("gecode_constraint_circuit_105", gecode_constraint_circuit_105, 5);
YAP_UserCPredicate("gecode_constraint_circuit_106", gecode_constraint_circuit_106, 5);
YAP_UserCPredicate("gecode_constraint_circuit_108", gecode_constraint_circuit_108, 5);
YAP_UserCPredicate("gecode_constraint_circuit_107", gecode_constraint_circuit_107, 6);
YAP_UserCPredicate("gecode_constraint_circuit_109", gecode_constraint_circuit_109, 6);
YAP_UserCPredicate("gecode_constraint_circuit_110", gecode_constraint_circuit_110, 6);
YAP_UserCPredicate("gecode_constraint_circuit_111", gecode_constraint_circuit_111, 7);
YAP_UserCPredicate("gecode_constraint_circuit_112", gecode_constraint_circuit_112, 2);
YAP_UserCPredicate("gecode_constraint_circuit_113", gecode_constraint_circuit_113, 3);
YAP_UserCPredicate("gecode_constraint_circuit_114", gecode_constraint_circuit_114, 3);
YAP_UserCPredicate("gecode_constraint_clause_116", gecode_constraint_clause_116, 5);
YAP_UserCPredicate("gecode_constraint_clause_118", gecode_constraint_clause_118, 5);
YAP_UserCPredicate("gecode_constraint_clause_117", gecode_constraint_clause_117, 6);
YAP_UserCPredicate("gecode_constraint_clause_119", gecode_constraint_clause_119, 6);
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_count_124", gecode_constraint_count_124, 5);
YAP_UserCPredicate("gecode_constraint_count_126", gecode_constraint_count_126, 5);
YAP_UserCPredicate("gecode_constraint_count_128", gecode_constraint_count_128, 5);
YAP_UserCPredicate("gecode_constraint_count_130", gecode_constraint_count_130, 5);
YAP_UserCPredicate("gecode_constraint_count_133", gecode_constraint_count_133, 5);
YAP_UserCPredicate("gecode_constraint_count_137", gecode_constraint_count_137, 5);
YAP_UserCPredicate("gecode_constraint_count_141", gecode_constraint_count_141, 5);
YAP_UserCPredicate("gecode_constraint_count_142", gecode_constraint_count_142, 5);
YAP_UserCPredicate("gecode_constraint_count_144", gecode_constraint_count_144, 5);
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_125", gecode_constraint_count_125, 6);
YAP_UserCPredicate("gecode_constraint_count_127", gecode_constraint_count_127, 6);
YAP_UserCPredicate("gecode_constraint_count_129", gecode_constraint_count_129, 6);
YAP_UserCPredicate("gecode_constraint_count_131", gecode_constraint_count_131, 6);
YAP_UserCPredicate("gecode_constraint_count_143", gecode_constraint_count_143, 6);
YAP_UserCPredicate("gecode_constraint_count_145", gecode_constraint_count_145, 6);
YAP_UserCPredicate("gecode_constraint_count_132", gecode_constraint_count_132, 4);
YAP_UserCPredicate("gecode_constraint_count_135", gecode_constraint_count_135, 4);
YAP_UserCPredicate("gecode_constraint_count_136", gecode_constraint_count_136, 4);
YAP_UserCPredicate("gecode_constraint_count_139", gecode_constraint_count_139, 4);
YAP_UserCPredicate("gecode_constraint_count_140", gecode_constraint_count_140, 4);
YAP_UserCPredicate("gecode_constraint_count_134", gecode_constraint_count_134, 3);
YAP_UserCPredicate("gecode_constraint_count_138", gecode_constraint_count_138, 3);
YAP_UserCPredicate("gecode_constraint_cumulative_146", gecode_constraint_cumulative_146, 5);
YAP_UserCPredicate("gecode_constraint_cumulative_158", gecode_constraint_cumulative_158, 5);
YAP_UserCPredicate("gecode_constraint_cumulative_147", gecode_constraint_cumulative_147, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_148", gecode_constraint_cumulative_148, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_150", gecode_constraint_cumulative_150, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_154", gecode_constraint_cumulative_154, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_159", gecode_constraint_cumulative_159, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_160", gecode_constraint_cumulative_160, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_162", gecode_constraint_cumulative_162, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_166", gecode_constraint_cumulative_166, 6);
YAP_UserCPredicate("gecode_constraint_cumulative_149", gecode_constraint_cumulative_149, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_151", gecode_constraint_cumulative_151, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_152", gecode_constraint_cumulative_152, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_155", gecode_constraint_cumulative_155, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_156", gecode_constraint_cumulative_156, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_161", gecode_constraint_cumulative_161, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_163", gecode_constraint_cumulative_163, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_164", gecode_constraint_cumulative_164, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_167", gecode_constraint_cumulative_167, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_168", gecode_constraint_cumulative_168, 7);
YAP_UserCPredicate("gecode_constraint_cumulative_153", gecode_constraint_cumulative_153, 8);
YAP_UserCPredicate("gecode_constraint_cumulative_157", gecode_constraint_cumulative_157, 8);
YAP_UserCPredicate("gecode_constraint_cumulative_165", gecode_constraint_cumulative_165, 8);
YAP_UserCPredicate("gecode_constraint_cumulative_169", gecode_constraint_cumulative_169, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_170", gecode_constraint_cumulatives_170, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_172", gecode_constraint_cumulatives_172, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_174", gecode_constraint_cumulatives_174, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_176", gecode_constraint_cumulatives_176, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_178", gecode_constraint_cumulatives_178, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_180", gecode_constraint_cumulatives_180, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_182", gecode_constraint_cumulatives_182, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_184", gecode_constraint_cumulatives_184, 8);
YAP_UserCPredicate("gecode_constraint_cumulatives_171", gecode_constraint_cumulatives_171, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_173", gecode_constraint_cumulatives_173, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_175", gecode_constraint_cumulatives_175, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_177", gecode_constraint_cumulatives_177, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_179", gecode_constraint_cumulatives_179, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_181", gecode_constraint_cumulatives_181, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_183", gecode_constraint_cumulatives_183, 9);
YAP_UserCPredicate("gecode_constraint_cumulatives_185", gecode_constraint_cumulatives_185, 9);
YAP_UserCPredicate("gecode_constraint_distinct_186", gecode_constraint_distinct_186, 3);
YAP_UserCPredicate("gecode_constraint_distinct_188", gecode_constraint_distinct_188, 3);
YAP_UserCPredicate("gecode_constraint_distinct_191", gecode_constraint_distinct_191, 3);
YAP_UserCPredicate("gecode_constraint_distinct_192", gecode_constraint_distinct_192, 3);
YAP_UserCPredicate("gecode_constraint_distinct_187", gecode_constraint_distinct_187, 4);
YAP_UserCPredicate("gecode_constraint_distinct_189", gecode_constraint_distinct_189, 4);
YAP_UserCPredicate("gecode_constraint_distinct_193", gecode_constraint_distinct_193, 4);
YAP_UserCPredicate("gecode_constraint_distinct_190", gecode_constraint_distinct_190, 2);
YAP_UserCPredicate("gecode_constraint_div_194", gecode_constraint_div_194, 4);
YAP_UserCPredicate("gecode_constraint_div_195", gecode_constraint_div_195, 4);
YAP_UserCPredicate("gecode_constraint_div_196", gecode_constraint_div_196, 5);
YAP_UserCPredicate("gecode_constraint_divmod_197", gecode_constraint_divmod_197, 5);
YAP_UserCPredicate("gecode_constraint_divmod_198", gecode_constraint_divmod_198, 6);
YAP_UserCPredicate("gecode_constraint_dom_199", gecode_constraint_dom_199, 3);
YAP_UserCPredicate("gecode_constraint_dom_203", gecode_constraint_dom_203, 3);
YAP_UserCPredicate("gecode_constraint_dom_205", gecode_constraint_dom_205, 3);
YAP_UserCPredicate("gecode_constraint_dom_206", gecode_constraint_dom_206, 3);
YAP_UserCPredicate("gecode_constraint_dom_208", gecode_constraint_dom_208, 3);
YAP_UserCPredicate("gecode_constraint_dom_212", gecode_constraint_dom_212, 3);
YAP_UserCPredicate("gecode_constraint_dom_226", gecode_constraint_dom_226, 3);
YAP_UserCPredicate("gecode_constraint_dom_227", gecode_constraint_dom_227, 3);
YAP_UserCPredicate("gecode_constraint_dom_230", gecode_constraint_dom_230, 3);
YAP_UserCPredicate("gecode_constraint_dom_231", gecode_constraint_dom_231, 3);
YAP_UserCPredicate("gecode_constraint_dom_232", gecode_constraint_dom_232, 3);
YAP_UserCPredicate("gecode_constraint_dom_234", gecode_constraint_dom_234, 3);
YAP_UserCPredicate("gecode_constraint_dom_236", gecode_constraint_dom_236, 3);
YAP_UserCPredicate("gecode_constraint_dom_243", gecode_constraint_dom_243, 3);
YAP_UserCPredicate("gecode_constraint_dom_200", gecode_constraint_dom_200, 4);
YAP_UserCPredicate("gecode_constraint_dom_201", gecode_constraint_dom_201, 4);
YAP_UserCPredicate("gecode_constraint_dom_204", gecode_constraint_dom_204, 4);
YAP_UserCPredicate("gecode_constraint_dom_207", gecode_constraint_dom_207, 4);
YAP_UserCPredicate("gecode_constraint_dom_209", gecode_constraint_dom_209, 4);
YAP_UserCPredicate("gecode_constraint_dom_210", gecode_constraint_dom_210, 4);
YAP_UserCPredicate("gecode_constraint_dom_213", gecode_constraint_dom_213, 4);
YAP_UserCPredicate("gecode_constraint_dom_214", gecode_constraint_dom_214, 4);
YAP_UserCPredicate("gecode_constraint_dom_216", gecode_constraint_dom_216, 4);
YAP_UserCPredicate("gecode_constraint_dom_220", gecode_constraint_dom_220, 4);
YAP_UserCPredicate("gecode_constraint_dom_222", gecode_constraint_dom_222, 4);
YAP_UserCPredicate("gecode_constraint_dom_228", gecode_constraint_dom_228, 4);
YAP_UserCPredicate("gecode_constraint_dom_229", gecode_constraint_dom_229, 4);
YAP_UserCPredicate("gecode_constraint_dom_233", gecode_constraint_dom_233, 4);
YAP_UserCPredicate("gecode_constraint_dom_235", gecode_constraint_dom_235, 4);
YAP_UserCPredicate("gecode_constraint_dom_237", gecode_constraint_dom_237, 4);
YAP_UserCPredicate("gecode_constraint_dom_238", gecode_constraint_dom_238, 4);
YAP_UserCPredicate("gecode_constraint_dom_240", gecode_constraint_dom_240, 4);
YAP_UserCPredicate("gecode_constraint_dom_241", gecode_constraint_dom_241, 4);
YAP_UserCPredicate("gecode_constraint_dom_202", gecode_constraint_dom_202, 5);
YAP_UserCPredicate("gecode_constraint_dom_211", gecode_constraint_dom_211, 5);
YAP_UserCPredicate("gecode_constraint_dom_215", gecode_constraint_dom_215, 5);
YAP_UserCPredicate("gecode_constraint_dom_217", gecode_constraint_dom_217, 5);
YAP_UserCPredicate("gecode_constraint_dom_218", gecode_constraint_dom_218, 5);
YAP_UserCPredicate("gecode_constraint_dom_221", gecode_constraint_dom_221, 5);
YAP_UserCPredicate("gecode_constraint_dom_223", gecode_constraint_dom_223, 5);
YAP_UserCPredicate("gecode_constraint_dom_224", gecode_constraint_dom_224, 5);
YAP_UserCPredicate("gecode_constraint_dom_239", gecode_constraint_dom_239, 5);
YAP_UserCPredicate("gecode_constraint_dom_242", gecode_constraint_dom_242, 5);
YAP_UserCPredicate("gecode_constraint_dom_219", gecode_constraint_dom_219, 6);
YAP_UserCPredicate("gecode_constraint_dom_225", gecode_constraint_dom_225, 6);
YAP_UserCPredicate("gecode_constraint_element_244", gecode_constraint_element_244, 4);
YAP_UserCPredicate("gecode_constraint_element_246", gecode_constraint_element_246, 4);
YAP_UserCPredicate("gecode_constraint_element_248", gecode_constraint_element_248, 4);
YAP_UserCPredicate("gecode_constraint_element_254", gecode_constraint_element_254, 4);
YAP_UserCPredicate("gecode_constraint_element_256", gecode_constraint_element_256, 4);
YAP_UserCPredicate("gecode_constraint_element_260", gecode_constraint_element_260, 4);
YAP_UserCPredicate("gecode_constraint_element_262", gecode_constraint_element_262, 4);
YAP_UserCPredicate("gecode_constraint_element_245", gecode_constraint_element_245, 5);
YAP_UserCPredicate("gecode_constraint_element_247", gecode_constraint_element_247, 5);
YAP_UserCPredicate("gecode_constraint_element_249", gecode_constraint_element_249, 5);
YAP_UserCPredicate("gecode_constraint_element_255", gecode_constraint_element_255, 5);
YAP_UserCPredicate("gecode_constraint_element_257", gecode_constraint_element_257, 5);
YAP_UserCPredicate("gecode_constraint_element_261", gecode_constraint_element_261, 5);
YAP_UserCPredicate("gecode_constraint_element_263", gecode_constraint_element_263, 5);
YAP_UserCPredicate("gecode_constraint_element_250", gecode_constraint_element_250, 7);
YAP_UserCPredicate("gecode_constraint_element_252", gecode_constraint_element_252, 7);
YAP_UserCPredicate("gecode_constraint_element_258", gecode_constraint_element_258, 7);
YAP_UserCPredicate("gecode_constraint_element_264", gecode_constraint_element_264, 7);
YAP_UserCPredicate("gecode_constraint_element_251", gecode_constraint_element_251, 8);
YAP_UserCPredicate("gecode_constraint_element_253", gecode_constraint_element_253, 8);
YAP_UserCPredicate("gecode_constraint_element_259", gecode_constraint_element_259, 8);
YAP_UserCPredicate("gecode_constraint_element_265", gecode_constraint_element_265, 8);
YAP_UserCPredicate("gecode_constraint_extensional_266", gecode_constraint_extensional_266, 3);
YAP_UserCPredicate("gecode_constraint_extensional_268", gecode_constraint_extensional_268, 3);
YAP_UserCPredicate("gecode_constraint_extensional_270", gecode_constraint_extensional_270, 3);
YAP_UserCPredicate("gecode_constraint_extensional_272", gecode_constraint_extensional_272, 3);
YAP_UserCPredicate("gecode_constraint_extensional_267", gecode_constraint_extensional_267, 4);
YAP_UserCPredicate("gecode_constraint_extensional_269", gecode_constraint_extensional_269, 4);
YAP_UserCPredicate("gecode_constraint_extensional_271", gecode_constraint_extensional_271, 4);
YAP_UserCPredicate("gecode_constraint_extensional_273", gecode_constraint_extensional_273, 4);
YAP_UserCPredicate("gecode_constraint_ite_274", gecode_constraint_ite_274, 5);
YAP_UserCPredicate("gecode_constraint_ite_276", gecode_constraint_ite_276, 5);
YAP_UserCPredicate("gecode_constraint_ite_277", gecode_constraint_ite_277, 5);
YAP_UserCPredicate("gecode_constraint_ite_279", gecode_constraint_ite_279, 5);
YAP_UserCPredicate("gecode_constraint_ite_275", gecode_constraint_ite_275, 6);
YAP_UserCPredicate("gecode_constraint_ite_278", gecode_constraint_ite_278, 6);
YAP_UserCPredicate("gecode_constraint_linear_280", gecode_constraint_linear_280, 4);
YAP_UserCPredicate("gecode_constraint_linear_284", gecode_constraint_linear_284, 4);
YAP_UserCPredicate("gecode_constraint_linear_292", gecode_constraint_linear_292, 4);
YAP_UserCPredicate("gecode_constraint_linear_294", gecode_constraint_linear_294, 4);
YAP_UserCPredicate("gecode_constraint_linear_312", gecode_constraint_linear_312, 4);
YAP_UserCPredicate("gecode_constraint_linear_316", gecode_constraint_linear_316, 4);
YAP_UserCPredicate("gecode_constraint_linear_281", gecode_constraint_linear_281, 5);
YAP_UserCPredicate("gecode_constraint_linear_282", gecode_constraint_linear_282, 5);
YAP_UserCPredicate("gecode_constraint_linear_285", gecode_constraint_linear_285, 5);
YAP_UserCPredicate("gecode_constraint_linear_286", gecode_constraint_linear_286, 5);
YAP_UserCPredicate("gecode_constraint_linear_288", gecode_constraint_linear_288, 5);
YAP_UserCPredicate("gecode_constraint_linear_290", gecode_constraint_linear_290, 5);
YAP_UserCPredicate("gecode_constraint_linear_293", gecode_constraint_linear_293, 5);
YAP_UserCPredicate("gecode_constraint_linear_295", gecode_constraint_linear_295, 5);
YAP_UserCPredicate("gecode_constraint_linear_296", gecode_constraint_linear_296, 5);
YAP_UserCPredicate("gecode_constraint_linear_300", gecode_constraint_linear_300, 5);
YAP_UserCPredicate("gecode_constraint_linear_304", gecode_constraint_linear_304, 5);
YAP_UserCPredicate("gecode_constraint_linear_308", gecode_constraint_linear_308, 5);
YAP_UserCPredicate("gecode_constraint_linear_313", gecode_constraint_linear_313, 5);
YAP_UserCPredicate("gecode_constraint_linear_314", gecode_constraint_linear_314, 5);
YAP_UserCPredicate("gecode_constraint_linear_317", gecode_constraint_linear_317, 5);
YAP_UserCPredicate("gecode_constraint_linear_318", gecode_constraint_linear_318, 5);
YAP_UserCPredicate("gecode_constraint_linear_283", gecode_constraint_linear_283, 6);
YAP_UserCPredicate("gecode_constraint_linear_287", gecode_constraint_linear_287, 6);
YAP_UserCPredicate("gecode_constraint_linear_289", gecode_constraint_linear_289, 6);
YAP_UserCPredicate("gecode_constraint_linear_291", gecode_constraint_linear_291, 6);
YAP_UserCPredicate("gecode_constraint_linear_297", gecode_constraint_linear_297, 6);
YAP_UserCPredicate("gecode_constraint_linear_298", gecode_constraint_linear_298, 6);
YAP_UserCPredicate("gecode_constraint_linear_301", gecode_constraint_linear_301, 6);
YAP_UserCPredicate("gecode_constraint_linear_302", gecode_constraint_linear_302, 6);
YAP_UserCPredicate("gecode_constraint_linear_305", gecode_constraint_linear_305, 6);
YAP_UserCPredicate("gecode_constraint_linear_306", gecode_constraint_linear_306, 6);
YAP_UserCPredicate("gecode_constraint_linear_309", gecode_constraint_linear_309, 6);
YAP_UserCPredicate("gecode_constraint_linear_310", gecode_constraint_linear_310, 6);
YAP_UserCPredicate("gecode_constraint_linear_315", gecode_constraint_linear_315, 6);
YAP_UserCPredicate("gecode_constraint_linear_319", gecode_constraint_linear_319, 6);
YAP_UserCPredicate("gecode_constraint_linear_299", gecode_constraint_linear_299, 7);
YAP_UserCPredicate("gecode_constraint_linear_303", gecode_constraint_linear_303, 7);
YAP_UserCPredicate("gecode_constraint_linear_307", gecode_constraint_linear_307, 7);
YAP_UserCPredicate("gecode_constraint_linear_311", gecode_constraint_linear_311, 7);
YAP_UserCPredicate("gecode_constraint_max_320", gecode_constraint_max_320, 4);
YAP_UserCPredicate("gecode_constraint_max_321", gecode_constraint_max_321, 4);
YAP_UserCPredicate("gecode_constraint_max_325", gecode_constraint_max_325, 4);
YAP_UserCPredicate("gecode_constraint_max_322", gecode_constraint_max_322, 5);
YAP_UserCPredicate("gecode_constraint_max_323", gecode_constraint_max_323, 3);
YAP_UserCPredicate("gecode_constraint_max_324", gecode_constraint_max_324, 3);
YAP_UserCPredicate("gecode_constraint_member_326", gecode_constraint_member_326, 3);
YAP_UserCPredicate("gecode_constraint_member_330", gecode_constraint_member_330, 3);
YAP_UserCPredicate("gecode_constraint_member_327", gecode_constraint_member_327, 4);
YAP_UserCPredicate("gecode_constraint_member_328", gecode_constraint_member_328, 4);
YAP_UserCPredicate("gecode_constraint_member_331", gecode_constraint_member_331, 4);
YAP_UserCPredicate("gecode_constraint_member_332", gecode_constraint_member_332, 4);
YAP_UserCPredicate("gecode_constraint_member_329", gecode_constraint_member_329, 5);
YAP_UserCPredicate("gecode_constraint_member_333", gecode_constraint_member_333, 5);
YAP_UserCPredicate("gecode_constraint_min_334", gecode_constraint_min_334, 4);
YAP_UserCPredicate("gecode_constraint_min_335", gecode_constraint_min_335, 4);
YAP_UserCPredicate("gecode_constraint_min_339", gecode_constraint_min_339, 4);
YAP_UserCPredicate("gecode_constraint_min_336", gecode_constraint_min_336, 5);
YAP_UserCPredicate("gecode_constraint_min_337", gecode_constraint_min_337, 3);
YAP_UserCPredicate("gecode_constraint_min_338", gecode_constraint_min_338, 3);
YAP_UserCPredicate("gecode_constraint_mod_340", gecode_constraint_mod_340, 4);
YAP_UserCPredicate("gecode_constraint_mod_341", gecode_constraint_mod_341, 5);
YAP_UserCPredicate("gecode_constraint_mult_342", gecode_constraint_mult_342, 4);
YAP_UserCPredicate("gecode_constraint_mult_343", gecode_constraint_mult_343, 4);
YAP_UserCPredicate("gecode_constraint_mult_344", gecode_constraint_mult_344, 5);
YAP_UserCPredicate("gecode_constraint_nooverlap_345", gecode_constraint_nooverlap_345, 5);
YAP_UserCPredicate("gecode_constraint_nooverlap_346", gecode_constraint_nooverlap_346, 6);
YAP_UserCPredicate("gecode_constraint_nooverlap_347", gecode_constraint_nooverlap_347, 6);
YAP_UserCPredicate("gecode_constraint_nooverlap_348", gecode_constraint_nooverlap_348, 7);
YAP_UserCPredicate("gecode_constraint_nooverlap_349", gecode_constraint_nooverlap_349, 7);
YAP_UserCPredicate("gecode_constraint_nooverlap_350", gecode_constraint_nooverlap_350, 8);
YAP_UserCPredicate("gecode_constraint_nooverlap_351", gecode_constraint_nooverlap_351, 8);
YAP_UserCPredicate("gecode_constraint_nooverlap_352", gecode_constraint_nooverlap_352, 9);
YAP_UserCPredicate("gecode_constraint_nroot_353", gecode_constraint_nroot_353, 4);
YAP_UserCPredicate("gecode_constraint_nroot_354", gecode_constraint_nroot_354, 4);
YAP_UserCPredicate("gecode_constraint_nroot_355", gecode_constraint_nroot_355, 5);
YAP_UserCPredicate("gecode_constraint_nvalues_356", gecode_constraint_nvalues_356, 4);
YAP_UserCPredicate("gecode_constraint_nvalues_358", gecode_constraint_nvalues_358, 4);
YAP_UserCPredicate("gecode_constraint_nvalues_360", gecode_constraint_nvalues_360, 4);
YAP_UserCPredicate("gecode_constraint_nvalues_362", gecode_constraint_nvalues_362, 4);
YAP_UserCPredicate("gecode_constraint_nvalues_357", gecode_constraint_nvalues_357, 5);
YAP_UserCPredicate("gecode_constraint_nvalues_359", gecode_constraint_nvalues_359, 5);
YAP_UserCPredicate("gecode_constraint_nvalues_361", gecode_constraint_nvalues_361, 5);
YAP_UserCPredicate("gecode_constraint_nvalues_363", gecode_constraint_nvalues_363, 5);
YAP_UserCPredicate("gecode_constraint_path_364", gecode_constraint_path_364, 6);
YAP_UserCPredicate("gecode_constraint_path_375", gecode_constraint_path_375, 6);
YAP_UserCPredicate("gecode_constraint_path_365", gecode_constraint_path_365, 7);
YAP_UserCPredicate("gecode_constraint_path_366", gecode_constraint_path_366, 7);
YAP_UserCPredicate("gecode_constraint_path_368", gecode_constraint_path_368, 7);
YAP_UserCPredicate("gecode_constraint_path_367", gecode_constraint_path_367, 8);
YAP_UserCPredicate("gecode_constraint_path_369", gecode_constraint_path_369, 8);
YAP_UserCPredicate("gecode_constraint_path_370", gecode_constraint_path_370, 8);
YAP_UserCPredicate("gecode_constraint_path_371", gecode_constraint_path_371, 9);
YAP_UserCPredicate("gecode_constraint_path_372", gecode_constraint_path_372, 4);
YAP_UserCPredicate("gecode_constraint_path_373", gecode_constraint_path_373, 5);
YAP_UserCPredicate("gecode_constraint_path_374", gecode_constraint_path_374, 5);
YAP_UserCPredicate("gecode_constraint_pow_376", gecode_constraint_pow_376, 4);
YAP_UserCPredicate("gecode_constraint_pow_377", gecode_constraint_pow_377, 4);
YAP_UserCPredicate("gecode_constraint_pow_378", gecode_constraint_pow_378, 5);
YAP_UserCPredicate("gecode_constraint_precede_379", gecode_constraint_precede_379, 3);
YAP_UserCPredicate("gecode_constraint_precede_380", gecode_constraint_precede_380, 4);
YAP_UserCPredicate("gecode_constraint_precede_381", gecode_constraint_precede_381, 4);
YAP_UserCPredicate("gecode_constraint_precede_382", gecode_constraint_precede_382, 5);
YAP_UserCPredicate("gecode_constraint_rel_383", gecode_constraint_rel_383, 4);
YAP_UserCPredicate("gecode_constraint_rel_385", gecode_constraint_rel_385, 4);
YAP_UserCPredicate("gecode_constraint_rel_391", gecode_constraint_rel_391, 4);
YAP_UserCPredicate("gecode_constraint_rel_395", gecode_constraint_rel_395, 4);
YAP_UserCPredicate("gecode_constraint_rel_399", gecode_constraint_rel_399, 4);
YAP_UserCPredicate("gecode_constraint_rel_401", gecode_constraint_rel_401, 4);
YAP_UserCPredicate("gecode_constraint_rel_403", gecode_constraint_rel_403, 4);
YAP_UserCPredicate("gecode_constraint_rel_407", gecode_constraint_rel_407, 4);
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_415", gecode_constraint_rel_415, 4);
YAP_UserCPredicate("gecode_constraint_rel_417", gecode_constraint_rel_417, 4);
YAP_UserCPredicate("gecode_constraint_rel_419", gecode_constraint_rel_419, 4);
YAP_UserCPredicate("gecode_constraint_rel_422", gecode_constraint_rel_422, 4);
YAP_UserCPredicate("gecode_constraint_rel_423", gecode_constraint_rel_423, 4);
YAP_UserCPredicate("gecode_constraint_rel_425", gecode_constraint_rel_425, 4);
YAP_UserCPredicate("gecode_constraint_rel_427", gecode_constraint_rel_427, 4);
YAP_UserCPredicate("gecode_constraint_rel_429", gecode_constraint_rel_429, 4);
YAP_UserCPredicate("gecode_constraint_rel_430", gecode_constraint_rel_430, 4);
YAP_UserCPredicate("gecode_constraint_rel_431", gecode_constraint_rel_431, 4);
YAP_UserCPredicate("gecode_constraint_rel_433", gecode_constraint_rel_433, 4);
YAP_UserCPredicate("gecode_constraint_rel_436", gecode_constraint_rel_436, 4);
YAP_UserCPredicate("gecode_constraint_rel_437", gecode_constraint_rel_437, 4);
YAP_UserCPredicate("gecode_constraint_rel_439", gecode_constraint_rel_439, 4);
YAP_UserCPredicate("gecode_constraint_rel_441", gecode_constraint_rel_441, 4);
YAP_UserCPredicate("gecode_constraint_rel_443", gecode_constraint_rel_443, 4);
YAP_UserCPredicate("gecode_constraint_rel_384", gecode_constraint_rel_384, 5);
YAP_UserCPredicate("gecode_constraint_rel_386", gecode_constraint_rel_386, 5);
YAP_UserCPredicate("gecode_constraint_rel_387", gecode_constraint_rel_387, 5);
YAP_UserCPredicate("gecode_constraint_rel_389", gecode_constraint_rel_389, 5);
YAP_UserCPredicate("gecode_constraint_rel_392", gecode_constraint_rel_392, 5);
YAP_UserCPredicate("gecode_constraint_rel_393", gecode_constraint_rel_393, 5);
YAP_UserCPredicate("gecode_constraint_rel_396", gecode_constraint_rel_396, 5);
YAP_UserCPredicate("gecode_constraint_rel_397", gecode_constraint_rel_397, 5);
YAP_UserCPredicate("gecode_constraint_rel_400", gecode_constraint_rel_400, 5);
YAP_UserCPredicate("gecode_constraint_rel_402", gecode_constraint_rel_402, 5);
YAP_UserCPredicate("gecode_constraint_rel_404", gecode_constraint_rel_404, 5);
YAP_UserCPredicate("gecode_constraint_rel_405", gecode_constraint_rel_405, 5);
YAP_UserCPredicate("gecode_constraint_rel_408", gecode_constraint_rel_408, 5);
YAP_UserCPredicate("gecode_constraint_rel_409", gecode_constraint_rel_409, 5);
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_416", gecode_constraint_rel_416, 5);
YAP_UserCPredicate("gecode_constraint_rel_418", gecode_constraint_rel_418, 5);
YAP_UserCPredicate("gecode_constraint_rel_420", gecode_constraint_rel_420, 5);
YAP_UserCPredicate("gecode_constraint_rel_424", gecode_constraint_rel_424, 5);
YAP_UserCPredicate("gecode_constraint_rel_426", gecode_constraint_rel_426, 5);
YAP_UserCPredicate("gecode_constraint_rel_428", gecode_constraint_rel_428, 5);
YAP_UserCPredicate("gecode_constraint_rel_432", gecode_constraint_rel_432, 5);
YAP_UserCPredicate("gecode_constraint_rel_434", gecode_constraint_rel_434, 5);
YAP_UserCPredicate("gecode_constraint_rel_438", gecode_constraint_rel_438, 5);
YAP_UserCPredicate("gecode_constraint_rel_440", gecode_constraint_rel_440, 5);
YAP_UserCPredicate("gecode_constraint_rel_442", gecode_constraint_rel_442, 5);
YAP_UserCPredicate("gecode_constraint_rel_444", gecode_constraint_rel_444, 5);
YAP_UserCPredicate("gecode_constraint_rel_388", gecode_constraint_rel_388, 6);
YAP_UserCPredicate("gecode_constraint_rel_390", gecode_constraint_rel_390, 6);
YAP_UserCPredicate("gecode_constraint_rel_394", gecode_constraint_rel_394, 6);
YAP_UserCPredicate("gecode_constraint_rel_398", gecode_constraint_rel_398, 6);
YAP_UserCPredicate("gecode_constraint_rel_406", gecode_constraint_rel_406, 6);
YAP_UserCPredicate("gecode_constraint_rel_410", gecode_constraint_rel_410, 6);
YAP_UserCPredicate("gecode_constraint_rel_421", gecode_constraint_rel_421, 3);
YAP_UserCPredicate("gecode_constraint_rel_435", gecode_constraint_rel_435, 3);
YAP_UserCPredicate("gecode_constraint_relax_445", gecode_constraint_relax_445, 5);
YAP_UserCPredicate("gecode_constraint_sequence_446", gecode_constraint_sequence_446, 6);
YAP_UserCPredicate("gecode_constraint_sequence_448", gecode_constraint_sequence_448, 6);
YAP_UserCPredicate("gecode_constraint_sequence_447", gecode_constraint_sequence_447, 7);
YAP_UserCPredicate("gecode_constraint_sequence_449", gecode_constraint_sequence_449, 7);
YAP_UserCPredicate("gecode_constraint_sorted_450", gecode_constraint_sorted_450, 3);
YAP_UserCPredicate("gecode_constraint_sorted_451", gecode_constraint_sorted_451, 4);
YAP_UserCPredicate("gecode_constraint_sorted_452", gecode_constraint_sorted_452, 4);
YAP_UserCPredicate("gecode_constraint_sorted_453", gecode_constraint_sorted_453, 5);
YAP_UserCPredicate("gecode_constraint_sqr_454", gecode_constraint_sqr_454, 3);
YAP_UserCPredicate("gecode_constraint_sqr_455", gecode_constraint_sqr_455, 3);
YAP_UserCPredicate("gecode_constraint_sqr_456", gecode_constraint_sqr_456, 4);
YAP_UserCPredicate("gecode_constraint_sqrt_457", gecode_constraint_sqrt_457, 3);
YAP_UserCPredicate("gecode_constraint_sqrt_458", gecode_constraint_sqrt_458, 3);
YAP_UserCPredicate("gecode_constraint_sqrt_459", gecode_constraint_sqrt_459, 4);
YAP_UserCPredicate("gecode_constraint_unary_460", gecode_constraint_unary_460, 3);
YAP_UserCPredicate("gecode_constraint_unary_461", gecode_constraint_unary_461, 4);
YAP_UserCPredicate("gecode_constraint_unary_462", gecode_constraint_unary_462, 4);
YAP_UserCPredicate("gecode_constraint_unary_464", gecode_constraint_unary_464, 4);
YAP_UserCPredicate("gecode_constraint_unary_468", gecode_constraint_unary_468, 4);
YAP_UserCPredicate("gecode_constraint_unary_463", gecode_constraint_unary_463, 5);
YAP_UserCPredicate("gecode_constraint_unary_465", gecode_constraint_unary_465, 5);
YAP_UserCPredicate("gecode_constraint_unary_466", gecode_constraint_unary_466, 5);
YAP_UserCPredicate("gecode_constraint_unary_469", gecode_constraint_unary_469, 5);
YAP_UserCPredicate("gecode_constraint_unary_470", gecode_constraint_unary_470, 5);
YAP_UserCPredicate("gecode_constraint_unary_467", gecode_constraint_unary_467, 6);
YAP_UserCPredicate("gecode_constraint_unary_471", gecode_constraint_unary_471, 6);
YAP_UserCPredicate("gecode_constraint_unshare_472", gecode_constraint_unshare_472, 2);
YAP_UserCPredicate("gecode_constraint_unshare_474", gecode_constraint_unshare_474, 2);
YAP_UserCPredicate("gecode_constraint_unshare_473", gecode_constraint_unshare_473, 3);
YAP_UserCPredicate("gecode_constraint_unshare_475", gecode_constraint_unshare_475, 3);
YAP_UserCPredicate("gecode_constraint_when_476", gecode_constraint_when_476, 3);
YAP_UserCPredicate("gecode_constraint_when_477", gecode_constraint_when_477, 4);
YAP_UserCPredicate("gecode_constraint_when_478", gecode_constraint_when_478, 4);
YAP_UserCPredicate("gecode_constraint_when_479", gecode_constraint_when_479, 5);

View File

@ -1,5 +1,5 @@
all:
python code-generator.py
python3 code-generator.py
clean:
-rm -f *~ *.pyc

View File

@ -625,13 +625,13 @@ class YAPEnumProlog(object):
t = sp[1].rstrip(">")
for x in self.ENUM:
print("is_%s_('%s')." % (t, x))
print()
print("\n")
for x in self.ENUM:
print("is_%s_('%s','%s')." % (t, x, x))
print()
print("\n")
print("is_%s(X,Y) :- nonvar(X), is_%s_(X,Y)." % (t,t))
print("is_%s(X) :- is_%s_(X,_)." % (t,t))
print()
print("\n")
class YAPEnumPrologGenerator(object):

View File

@ -4504,12 +4504,15 @@ location( java_root, _, Home) :-
location(java_root, _, JRE) :-
% OS well-known
member(Root, [
/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaV '/usr/lib',
'/usr/local/lib',
'/opt/lib',
'/Library/Java/JavaVirtualMachines',
'/System/Library/Frameworks'
]),
'/Library/Java/JavaVirtualMachines',
'/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation',
'/System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching',
'/System/Library/Frameworks/JavaVM.framework/Versions/A/Java',
'/usr/lib',
'/usr/local/lib',
'/opt/lib',
'/System/Library/Frameworks'
]),
exists_directory(Root),
jdk_jre( Root, JRE).

View File

@ -1,10 +1,11 @@
set(CMAKE_MACOSX_RPATH 1)
# set(CMAKE_MACOSX_RPATH 1)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_lib(jplYap jpl.h jpl.c hacks.h)
include_directories (${JAVA_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS} )
include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_PATH} )
target_link_libraries(jplYap libYap ${JNI_LIBRARIES} ${JAVA_LIBRARIES})
target_link_libraries(jplYap libYap ${JAVA_JVM_LIBRARY} ${JAVA_AWT_LIBRARY})
set_target_properties(jplYap PROPERTIES
OUTPUT_NAME jpl

View File

@ -16,6 +16,9 @@ typedef struct myddas_global *MYDDAS_GLOBAL;
#include "myddas_util.h"
//extern void Yap_InitMYDDAS_SQLITE3Preds(void);
//extern void Yap_InitBackMYDDAS_SQLITE3Preds(void);
#ifdef MYDDAS_STATS
typedef struct myddas_stats_time_struct *MYDDAS_STATS_TIME;
typedef struct myddas_global_stats *MYDDAS_GLOBAL_STATS;

View File

@ -31,6 +31,7 @@ extern "C" {
#include <yapio.h>
#include <iopreds.h>
extern void Java_pt_up_yap_streamerJNI_swig_1module_1init(void);
@ -92,11 +93,9 @@ extern "C" {
void Java_pt_up_yap_streamerJNI_swig_1module_1init(void) {
if (andstream)
return;
andstream = new VFS_t();
andstream->name = "android output window";
andstream->name = "/android/user_error";
andstream->vflags = VFS_CAN_WRITE | VFS_HAS_PREFIX;
andstream->prefix = "/android";
andstream->suffix = NULL;
@ -108,13 +107,9 @@ void Java_pt_up_yap_streamerJNI_swig_1module_1init(void) {
andstream->seek = and_seek;
andstream->next = GLOBAL_VFS;
GLOBAL_VFS = andstream;
YAP_Term ts[1], args[1], goal;
ts[0] = MkAtomTerm(Yap_LookupAtom("android"));
args[0] = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("library"),1), 1, ts);
goal = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("compile"),1), 1, args);
YAP_RunGoalOnce(goal);
}
Yap_InitStdStream(StdOutStream, Output_Stream_f | Append_Stream_f, NULL, andstream);
Yap_InitStdStream(StdErrStream, Output_Stream_f | Append_Stream_f, NULL, andstream); //streamerInstance = 0;
} ;
}
}

View File

View File

1
x.py
View File

@ -1 +0,0 @@
import yap_kernel

0
x.yap
View File