Merge branch 'master' of ssh://git.dcc.fc.up.pt/yap-6.3

Conflicts:
	configure
	packages/clib
	packages/real
This commit is contained in:
Vítor Santos Costa 2014-02-12 00:44:34 +00:00
commit 89789d6828
25 changed files with 61 additions and 261 deletions

View File

@ -497,9 +497,7 @@
#include "absmi.h"
#include "heapgc.h"
#ifdef CUT_C
#include "cut_c.h"
#endif
#ifdef PUSH_X
#else
@ -2688,14 +2686,12 @@ Yap_absmi(int inp)
/* trust_fail */
BOp(trust_fail, e);
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;
@ -3603,11 +3599,9 @@ Yap_absmi(int inp)
/* cut */
BACKUP_B();
#ifdef CUT_C
while (POP_CHOICE_POINT(B->cp_b)) {
POP_EXECUTE();
}
#endif /* CUT_C */
B = B->cp_b; /* cut_fail */
HB = B->cp_h; /* cut_fail */
RECOVER_B();
@ -7659,10 +7653,8 @@ Yap_absmi(int inp)
CUT_wait_leftmost();
#endif /* YAPOR */
CACHE_Y(YREG);
#ifdef CUT_C
/* Alocate space for the cut_c structure*/
CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG);
#endif
S_YREG = S_YREG - PREG->u.OtapFs.extra;
store_args(PREG->u.OtapFs.s);
store_yaam_regs(NEXTOP(PREG, OtapFs), 0);
@ -7680,21 +7672,17 @@ Yap_absmi(int inp)
saveregs();
SREG = (CELL *) ((f) (PASS_REGS1));
/* This last instruction changes B B*/
#ifdef CUT_C
while (POP_CHOICE_POINT(B)){
cut_c_pop();
}
#endif
setregs();
}
if (!SREG) {
#ifdef CUT_C
/* Removes the cut functions from the stack
without executing them because we have fail
and not cuted the predicate*/
while(POP_CHOICE_POINT(B))
cut_c_pop();
#endif
FAIL();
}
if ((CELL *) B == YREG && ASP != (CELL *) B) {
@ -7727,7 +7715,6 @@ Yap_absmi(int inp)
goto TRYCC;
ENDBOp();
#ifdef CUT_C
BOp(cut_c, OtapFs);
/*This is a phantom instruction. This is not executed by the WAM*/
#ifdef DEBUG
@ -7736,17 +7723,14 @@ Yap_absmi(int inp)
printf ("ERROR: Should not print this message FILE: absmi.c %d\n",__LINE__);
#endif /*DEBUG*/
ENDBOp();
#endif
BOp(try_userc, OtapFs);
#ifdef YAPOR
CUT_wait_leftmost();
#endif /* YAPOR */
CACHE_Y(YREG);
#ifdef CUT_C
/* Alocate space for the cut_c structure*/
CUT_C_PUSH(NEXTOP(NEXTOP(PREG,OtapFs),OtapFs),S_YREG);
#endif
S_YREG = S_YREG - PREG->u.OtapFs.extra;
store_args(PREG->u.OtapFs.s);
store_yaam_regs(NEXTOP(PREG, OtapFs), 0);
@ -7806,13 +7790,11 @@ Yap_absmi(int inp)
setregs();
LOCAL_PrologMode &= ~UserCCallMode;
if (!SREG) {
#ifdef CUT_C
/* Removes the cut functions from the stack
without executing them because we have fail
and not cuted the predicate*/
while(POP_CHOICE_POINT(B))
cut_c_pop();
#endif
FAIL();
}
if ((CELL *) B == YREG && ASP != (CELL *) B) {
@ -7828,7 +7810,6 @@ Yap_absmi(int inp)
JMPNext();
ENDBOp();
#ifdef CUT_C
BOp(cut_userc, OtapFs);
/*This is a phantom instruction. This is not executed by the WAM*/
#ifdef DEBUG
@ -7839,7 +7820,6 @@ Yap_absmi(int inp)
CACHE_A1();
JMPNext();
ENDBOp();
#endif
/************************************************************************\

View File

@ -363,9 +363,7 @@
#include "or.macros.h"
#endif /* YAPOR */
#include "threads.h"
#ifdef CUT_C
#include "cut_c.h"
#endif /* CUT_C */
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
@ -515,10 +513,8 @@ X_API void YAP_PredicateInfo(void *,Atom *,UInt *,Term *);
X_API void YAP_UserCPredicate(char *,CPredicate,UInt);
X_API void YAP_UserBackCPredicate(char *,CPredicate,CPredicate,UInt,unsigned int);
X_API void YAP_UserCPredicateWithArgs(char *,CPredicate,UInt,Term);
#ifdef CUT_C
X_API void YAP_UserBackCutCPredicate(char *,CPredicate,CPredicate,CPredicate,UInt,unsigned int);
X_API void *YAP_ExtraSpaceCut(void);
#endif
X_API Term YAP_SetCurrentModule(Term);
X_API Term YAP_CurrentModule(void);
X_API Term YAP_CreateModule(Atom);
@ -1166,7 +1162,6 @@ YAP_ArityOfFunctor(Functor f)
return (ArityOfFunctor(f));
}
#ifdef CUT_C
X_API void *
YAP_ExtraSpaceCut(void)
{
@ -1179,7 +1174,6 @@ YAP_ExtraSpaceCut(void)
RECOVER_B();
return(ptr);
}
#endif /*CUT_C*/
X_API void *
YAP_ExtraSpace(void)
@ -1203,14 +1197,12 @@ YAP_cut_up(void)
{
CACHE_REGS
BACKUP_B();
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
/* This is complicated: make sure we can restore the ASP
pointer back to where cut_up called it. Slots depend on it. */
if (ENV > B->cp_env) {
@ -3505,23 +3497,16 @@ X_API void
YAP_UserBackCPredicate(char *name, CPredicate init, CPredicate cont,
UInt arity, unsigned int extra)
{
#ifdef CUT_C
Yap_InitCPredBackCut(name, arity, extra, init, cont, NULL ,UserCPredFlag);
#else
Yap_InitCPredBack(name, arity, extra, init, cont, UserCPredFlag);
#endif
}
#ifdef CUT_C
X_API void
YAP_UserBackCutCPredicate(char *name, CPredicate init, CPredicate cont, CPredicate cut,
UInt arity, unsigned int extra)
{
Yap_InitCPredBackCut(name, arity, extra, init, cont, cut, UserCPredFlag);
}
#endif
X_API void
YAP_UserCPredicateWithArgs(char *a, CPredicate f, UInt arity, Term mod)

View File

@ -1,5 +1,3 @@
#ifdef CUT_C
#include "Yap.h"
#include "cut_c.h"
#include <stdio.h>
@ -33,5 +31,3 @@ void cut_c_push(cut_c_str_ptr new_top){
Yap_REGS.CUT_C_TOP=new_top;
return;
}
#endif /*CUT_C*/

View File

@ -22,9 +22,7 @@ static char SccsId[] = "@(#)cdmgr.c 1.1 05/02/98";
#include "pl-shared.h"
#include "yapio.h"
#include "attvar.h"
#ifdef CUT_C
#include "cut_c.h"
#endif
static Int CallPredicate(PredEntry *, choiceptr, yamop * CACHE_TYPE);
static Int EnterCreepMode(Term, Term CACHE_TYPE);
@ -1229,7 +1227,6 @@ execute_pred(PredEntry *ppe, CELL *pt USES_REGS)
/* restore the old environment */
/* get to previous environment */
cut_B = (choiceptr)ENV[E_CB];
#ifdef CUT_C
{
/* Note that
cut_B == (choiceptr)ENV[E_CB] */
@ -1238,7 +1235,6 @@ execute_pred(PredEntry *ppe, CELL *pt USES_REGS)
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
CUT_prune_to(cut_B);
#endif /* YAPOR */
@ -1799,9 +1795,7 @@ Yap_InitYaamRegs( int myworker_id )
#endif
Yap_AllocateDefaultArena(128*1024, 2, myworker_id);
Yap_InitPreAllocCodeSpace( myworker_id );
#ifdef CUT_C
cut_c_initialize( myworker_id );
#endif
Yap_PrepGoal(0, NULL, NULL PASS_REGS);
#ifdef TABLING
/* ensure that LOCAL_top_dep_fr is always valid */

View File

@ -22,9 +22,7 @@
#include "sshift.h"
#include "compile.h"
#include "attvar.h"
#ifdef CUT_C
#include "cut_c.h"
#endif /* CUT_C */
#if HAVE_STRING_H
#include <string.h>
#endif
@ -137,10 +135,8 @@ SetHeapRegs(int copying_threads USES_REGS)
UNLOCK(LOCAL_SignalLock);
if (HR)
HR = PtoGloAdjust(HR);
#ifdef CUT_C
if (Yap_REGS.CUT_C_TOP)
Yap_REGS.CUT_C_TOP = CutCAdjust(Yap_REGS.CUT_C_TOP);
#endif
if (HB)
HB = PtoGloAdjust(HB);
if (LOCAL_OpenArray)
@ -1986,9 +1982,7 @@ Yap_CopyThreadStacks(int worker_q, int worker_p, int incremental)
if (ASP > CellPtr(B))
ASP = CellPtr(B);
LCL0 = REMOTE_ThreadHandle(worker_p).current_yaam_regs->LCL0_;
#ifdef CUT_C
Yap_REGS.CUT_C_TOP = REMOTE_ThreadHandle(worker_p).current_yaam_regs->CUT_C_TOP;
#endif
LOCAL_DynamicArrays = NULL;
LOCAL_StaticArrays = NULL;
LOCAL_GlobalVariables = NULL;

View File

@ -492,9 +492,7 @@ static char SccsId[] = "%W% %G%";
#if HAVE_STRING_H
#include <string.h>
#endif
#ifdef CUT_C
#include "cut_c.h"
#endif
#if defined(YAPOR) || defined(THREADS)
#define SET_JLBL(X) jlbl = &(ipc->u.X)
@ -6200,14 +6198,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
#if TABLING
case _table_trust:
#endif
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;
@ -6230,14 +6226,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
case _table_trust_me:
#endif
b0 = B;
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;
@ -6369,7 +6363,7 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
LogUpdClause *lcl = ipc->u.OtILl.d;
/* make sure we don't erase the clause we are jumping to, notice that
ErLogUpdIndex may remove several references in one go.
Notice we only need to do this if we´ re jumping to the clause.
Notice we only need to do this if we´ re jumping to the clause.
*/
if (newpc && !(lcl->ClFlags & (DirtyMask|InUseMask))) {
lcl->ClFlags |= InUseMask;
@ -6383,14 +6377,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
}
}
#endif
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;
@ -6657,14 +6649,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
return NULL;
default:
if (b0) {
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;
@ -6687,14 +6677,12 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
}
if (b0) {
/* I did a trust */
#ifdef CUT_C
{
while (POP_CHOICE_POINT(B->cp_b))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
{
choiceptr cut_pt;

View File

@ -69,11 +69,7 @@ static void InTTYLine(char *);
static void SetOp(int, int, char *, Term);
static void InitOps(void);
static void InitDebug(void);
#ifdef CUT_C
static void CleanBack(PredEntry *, CPredicate, CPredicate, CPredicate);
#else
static void CleanBack(PredEntry *, CPredicate, CPredicate);
#endif
static void InitStdPreds(void);
static void InitFlags(void);
static void InitCodes(void);
@ -682,11 +678,7 @@ Yap_InitAsmPred(char *Name, unsigned long int Arity, int code, CPredicate def,
static void
#ifdef CUT_C
CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut)
#else
CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont)
#endif
{
yamop *code;
if (pe->cs.p_code.FirstClause != pe->cs.p_code.LastClause ||
@ -717,7 +709,6 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont)
PUT_YAMOP_SEQ(code);
#endif /* YAPOR */
code->u.OtapFs.f = Cont;
#ifdef CUT_C
code = NEXTOP(code,OtapFs);
if (pe->PredFlags & UserCPredFlag)
code->opc = Yap_opcode(_cut_c);
@ -725,11 +716,8 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont)
code->opc = Yap_opcode(_cut_userc);
code->u.OtapFs.p = pe;
code->u.OtapFs.f = Cut;
#endif
}
#ifdef CUT_C
void
Yap_InitCPredBack(char *Name, unsigned long int Arity,
unsigned int Extra, CPredicate Start,
@ -743,24 +731,11 @@ Yap_InitCPredBackCut(char *Name, unsigned long int Arity,
CPredicate Cont,CPredicate Cut, UInt flags){
Yap_InitCPredBack_(Name,Arity,Extra,Start,Cont,Cut,flags);
}
#else
Yap_InitCPredBackCut(char *Name, unsigned long int Arity,
unsigned int Extra, CPredicate Start,
CPredicate Cont,CPredicate Cut, UInt flags){
Yap_InitCPredBack(Name,Arity,Extra,Start,Cont,flags);
}
#endif /* CUT_C */
void
#ifdef CUT_C
Yap_InitCPredBack_(char *Name, unsigned long int Arity,
unsigned int Extra, CPredicate Start,
CPredicate Cont, CPredicate Cut, UInt flags)
#else
Yap_InitCPredBack(char *Name, unsigned long int Arity,
unsigned int Extra, CPredicate Start,
CPredicate Cont, UInt flags)
#endif
{
CACHE_REGS
PredEntry *pe = NULL;
@ -796,11 +771,7 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
if (pe->cs.p_code.FirstClause != NIL)
{
flags = update_flags_from_prolog(flags, pe);
#ifdef CUT_C
CleanBack(pe, Start, Cont, Cut);
#else
CleanBack(pe, Start, Cont);
#endif /*CUT_C*/
}
else {
StaticClause *cl;
@ -814,11 +785,7 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
pe->PredFlags |= SequentialPredFlag;
#endif /* YAPOR */
#ifdef CUT_C
cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),l));
#else
cl = (StaticClause *)Yap_AllocCodeSpace((CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),l));
#endif
if (cl == NULL) {
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"No Heap Space in InitCPredBack");
@ -826,15 +793,9 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
}
cl->ClFlags = StaticMask;
cl->ClNext = NULL;
#ifdef CUT_C
Yap_ClauseSpace += (CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),l);
cl->ClSize =
(CELL)NEXTOP(NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),OtapFs),e);
#else
Yap_ClauseSpace += (CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),l);
cl->ClSize =
(CELL)NEXTOP(NEXTOP(NEXTOP(code,OtapFs),OtapFs),e);
#endif
cl->usc.ClLine = Yap_source_line_no();
code = cl->ClCode;
@ -866,7 +827,6 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
PUT_YAMOP_SEQ(code);
#endif /* YAPOR */
code = NEXTOP(code,OtapFs);
#ifdef CUT_C
if (flags & UserCPredFlag)
code->opc = Yap_opcode(_cut_userc);
else
@ -876,7 +836,6 @@ Yap_InitCPredBack(char *Name, unsigned long int Arity,
code->u.OtapFs.s = Arity;
code->u.OtapFs.extra = Extra;
code = NEXTOP(code,OtapFs);
#endif /* CUT_C */
code->opc = Yap_opcode(_Ystop);
code->u.l.l = cl->ClCode;
}

View File

@ -19,9 +19,7 @@
#include "absmi.h"
#ifdef CUT_C
#include "cut_c.h"
#endif
static Int p_atom( USES_REGS1 );
static Int p_atomic( USES_REGS1 );
@ -797,14 +795,12 @@ p_cut_by( USES_REGS1 )
#else
pt0 = (choiceptr)(LCL0-IntOfTerm(d0));
#endif
#ifdef CUT_C
{
while (POP_CHOICE_POINT(pt0))
{
POP_EXECUTE();
}
}
#endif /* CUT_C */
#ifdef YAPOR
CUT_prune_to(pt0);
#endif /* YAPOR */

View File

@ -16,12 +16,9 @@
/********* abstract machine registers **********************************/
#ifdef YAP_H
#ifdef CUT_C
#include "cut_c.h"
#endif
#endif
#define MaxTemps 512
#define MaxArithms 32
@ -104,10 +101,8 @@ typedef struct regstore_t
#endif /* DEPTH_LIMIT */
yamop *CP_; /* 28 continuation program counter */
CELL *ENV_; /* 1 current environment */
#ifdef CUT_C
struct cut_c_str *CUT_C_TOP;
#endif
#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL)
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
struct myddas_global *MYDDAS_GLOBAL_POINTER;
#endif
yamop *P_; /* 7 prolog machine program counter */

View File

@ -203,14 +203,10 @@
OPCODE(call_c_wfail ,slp),
OPCODE(try_c ,OtapFs),
OPCODE(retry_c ,OtapFs),
#ifdef CUT_C
OPCODE(cut_c ,OtapFs),
#endif
OPCODE(try_userc ,OtapFs),
OPCODE(retry_userc ,OtapFs),
#ifdef CUT_C
OPCODE(cut_userc ,OtapFs),
#endif
OPCODE(lock_pred ,e),
OPCODE(index_pred ,e),
#ifdef THREADS

View File

@ -238,9 +238,7 @@ void Yap_InitAsmPred(char *, unsigned long int, int, CPredicate, UInt);
void Yap_InitCmpPred(char *, unsigned long int, CmpPredicate, UInt);
void Yap_InitCPredBack(char *, unsigned long int, unsigned int, CPredicate,CPredicate,UInt);
void Yap_InitCPredBackCut(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
#ifdef CUT_C
void Yap_InitCPredBack_(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
#endif
void Yap_InitWorkspace(UInt,UInt,UInt,UInt,UInt,int,int,int);
#ifdef YAPOR

View File

@ -412,11 +412,9 @@ Yap_unify_constant(register Term a, register Term cons)
static inline int
do_cut(int i) {
CACHE_REGS
#ifdef CUT_C
if (POP_CHOICE_POINT(B->cp_b)) {
cut_c_pop();
}
#endif
Yap_TrimTrail();
B = B->cp_b;
return i;

View File

@ -107,12 +107,8 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
pc = pc->u.OtaLl.n;
break;
/* instructions type OtapFs */
#ifdef CUT_C
case _cut_c:
#endif
#ifdef CUT_C
case _cut_userc:
#endif
case _retry_c:
case _retry_userc:
case _try_c:

View File

@ -117,12 +117,8 @@
pc = NEXTOP(pc,OtaLl);
break;
/* instructions type OtapFs */
#ifdef CUT_C
case _cut_c:
#endif
#ifdef CUT_C
case _cut_userc:
#endif
case _retry_c:
case _retry_userc:
case _try_c:

View File

@ -67,12 +67,8 @@
pc = pc->u.OtaLl.n;
break;
/* instructions type OtapFs */
#ifdef CUT_C
case _cut_c:
#endif
#ifdef CUT_C
case _cut_userc:
#endif
case _retry_c:
case _retry_userc:
case _try_c:

82
configure vendored
View File

@ -835,8 +835,6 @@ ac_user_opts='
enable_option_checking
enable_tabling
enable_or_parallelism
enable_rational_trees
enable_coroutining
enable_depth_limit
enable_wam_profile
enable_low_level_tracer
@ -1513,8 +1511,6 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-tabling support tabling
--enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads
--enable-rational-trees support infinite rational trees
--enable-coroutining support co-routining, attributed variables and constraints
--enable-depth-limit support depth-bound computation
--enable-wam-profile support low level profiling of abstract machine
--enable-low-level-tracer support support for procedure-call tracing
@ -4114,20 +4110,6 @@ else
orparallelism=no
fi
# Check whether --enable-rational-trees was given.
if test "${enable_rational_trees+set}" = set; then :
enableval=$enable_rational_trees; rationaltrees="$enableval"
else
rationaltrees=yes
fi
# Check whether --enable-coroutining was given.
if test "${enable_coroutining+set}" = set; then :
enableval=$enable_coroutining; rationaltrees="$enableval";coroutining="$enableval"
else
coroutining=yes
fi
# Check whether --enable-depth-limit was given.
if test "${enable_depth_limit+set}" = set; then :
enableval=$enable_depth_limit; depthlimit="$enableval"
@ -6414,22 +6396,22 @@ CMFLAGS=-fpic
CIFLAGS=-I.
if test "$use_prism" = no; then
PKG_PRISM="@# "
else
PKG_PRISM=""
else
PKG_PRISM="packages/prism/src/c packages/prism/src/prolog"
fi
if test -e "$srcdir"/packages/archive/Makefile.in; then
PKG_LIBARCHIVE=""
PKG_LIBARCHIVE="packages/archive"
else
PKG_LIBARCHIVE="@# "
PKG_LIBARCHIVE=""
fi
if test -e "$srcdir"/packages/odbc/Makefile.in; then
PKG_ODBC=""
PKG_ODBC="packages/odbc"
else
PKG_ODBC="@# "
PKG_ODBC=""
fi
if test "$use_chr" = no; then
@ -7113,22 +7095,7 @@ else
YAPLIB_CFLAGS="$CFLAGS"
fi
if test "$coroutining" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1"
fi
if test "$rationaltrees" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1"
fi
if test "$rationaltrees" = "yes" -a "$coroutining" = "yes"
then
INSTALLCLP=""
else
INSTALLCLP="@#"
fi
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DRATIONAL_TREES=1"
if test "$debugyap" = "yes"
then
@ -7195,12 +7162,6 @@ else
esac
fi
if test "$cutc" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1"
fi
if test "$tabling" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DTABLING=1"
@ -9420,7 +9381,7 @@ fi
if test "$PKG_CLIB" = ""
if test "$PKG_CLIB" != ""
then
@ -9827,9 +9788,8 @@ esac
export CC LD CFLAGS LDFLAGS;
mkdir -p packages/clib/maildrop/rfc822;
mkdir -p packages/clib/maildrop/rfc2045;
MIME_DIR=`dirname "$srcdir"/packages/clib/maildrop`
( cd packages/clib/maildrop/rfc822 && $CONFIG_SHELL "$MIME_DIR"/maildrop/rfc822/configure --host=$host)
( cd packages/clib/maildrop/rfc2045 && $CONFIG_SHELL "$MIME_DIR"/maildrop/rfc2045/configure --host=$host)
( cd packages/clib/maildrop/rfc822 && $CONFIG_SHELL ../../../../"$srcdir"/packages/clib/maildrop/rfc822/configure --host=$host)
( cd packages/clib/maildrop/rfc2045 && $CONFIG_SHELL ../../../../"$srcdir"/packages/clib/maildrop/rfc2045/configure --host=$host)
)
@ -10099,7 +10059,7 @@ fi
fi
if test "$PKG_LIBARCHIVE" = ""
if test "$PKG_LIBARCHIVE" != ""
then
@ -10234,12 +10194,12 @@ fi
if test "$ARCHIVE_TARGETS" = "nolib"
then
PKG_LIBARCHIVE="@# "
PKG_LIBARCHIVE=""
fi
fi
if test "$PKG_ODBC" = ""; then
if test "$PKG_ODBC" != ""; then
@ -10832,7 +10792,7 @@ ODBC_PLTARGETS=`echo $ODBC_TARGETS | sed "s/4pl\.$SO/.pl/g"`
if test "$ODBC_TARGETS" = "nolib"
then
PKG_ODBC="@# "
PKG_ODBC=""
fi
else
@ -11272,7 +11232,7 @@ fi
if test "$PKG_ZLIB" = ""
if test "$PKG_ZLIB" != ""
then
@ -11360,7 +11320,7 @@ fi
if test "$ZLIB_TARGETS" = "nolib"
then
PKG_ZLIB="@# "
PKG_ZLIB=""
fi
fi
@ -11699,7 +11659,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 11702 "configure" */
/* #line 11662 "configure" */
public class Test {
}
EOF
@ -11875,7 +11835,7 @@ EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
echo "configure: 11878: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: 11838: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@ -12006,7 +11966,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 12009 "configure" */
/* #line 11969 "configure" */
public class Test {
}
EOF
@ -12041,7 +12001,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
/* [#]line 12044 "configure" */
/* [#]line 12004 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
@ -14611,7 +14571,7 @@ if test "$ac_res" != no; then :
else
echo "Could not find libraries for Python";
ENABLE_PYTHON="@# "
PKG_PYTHON=""
fi
PYTHON_LIBS=$LIBS

View File

@ -80,12 +80,6 @@ AC_ARG_ENABLE(tabling,
AC_ARG_ENABLE(or-parallelism,
[ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ],
orparallelism="$enableval", orparallelism=no)
AC_ARG_ENABLE(rational-trees,
[ --enable-rational-trees support infinite rational trees ],
rationaltrees="$enableval" , rationaltrees=yes)
AC_ARG_ENABLE(coroutining,
[ --enable-coroutining support co-routining, attributed variables and constraints],
rationaltrees="$enableval";coroutining="$enableval", coroutining=yes)
AC_ARG_ENABLE(depth-limit,
[ --enable-depth-limit support depth-bound computation ],
depthlimit="$enableval", depthlimit=yes)
@ -627,22 +621,22 @@ CMFLAGS=-fpic
CIFLAGS=-I.
if test "$use_prism" = no; then
PKG_PRISM="@# "
else
PKG_PRISM=""
else
PKG_PRISM="packages/prism/src/c packages/prism/src/prolog"
fi
AC_SUBST(PKG_PRISM)
if test -e "$srcdir"/packages/archive/Makefile.in; then
PKG_LIBARCHIVE=""
PKG_LIBARCHIVE="packages/archive"
else
PKG_LIBARCHIVE="@# "
PKG_LIBARCHIVE=""
fi
if test -e "$srcdir"/packages/odbc/Makefile.in; then
PKG_ODBC=""
PKG_ODBC="packages/odbc"
else
PKG_ODBC="@# "
PKG_ODBC=""
fi
if test "$use_chr" = no; then
@ -1061,23 +1055,8 @@ else
YAPLIB_CFLAGS="$CFLAGS"
fi
if test "$coroutining" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DCUT_C=1"
fi
if test "$rationaltrees" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DRATIONAL_TREES=1"
fi
YAP_EXTRAS="$YAP_EXTRAS -DCOROUTINING=1 -DRATIONAL_TREES=1"
if test "$rationaltrees" = "yes" -a "$coroutining" = "yes"
then
INSTALLCLP=""
else
INSTALLCLP="@#"
fi
if test "$debugyap" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DDEBUG=1"
@ -1140,12 +1119,6 @@ else
;;
esac
fi
if test "$cutc" = "yes"
then
YAP_EXTRAS="$YAP_EXTRAS -DCUT_C=1"
fi
if test "$tabling" = "yes"
then
@ -1743,32 +1716,32 @@ fi
m4_include([packages/myddas/configure.in])
if test "$PKG_CLIB" = ""
if test "$PKG_CLIB" != ""
then
m4_include([packages/clib/configure.in])
fi
if test "$PKG_LIBARCHIVE" = ""
if test "$PKG_LIBARCHIVE" != ""
then
m4_include([packages/archive/configure.in])
if test "$ARCHIVE_TARGETS" = "nolib"
then
PKG_LIBARCHIVE="@# "
PKG_LIBARCHIVE=""
fi
fi
if test "$PKG_ODBC" = ""; then
if test "$PKG_ODBC" != ""; then
m4_include([packages/odbc/configure.in])
if test "$ODBC_TARGETS" = "nolib"
then
PKG_ODBC="@# "
PKG_ODBC=""
fi
else
@ -1780,14 +1753,14 @@ fi
m4_include([packages/bdd/configure.in])
dnl zlib
if test "$PKG_ZLIB" = ""
if test "$PKG_ZLIB" != ""
then
m4_include([packages/zlib/configure.in])
if test "$ZLIB_TARGETS" = "nolib"
then
PKG_ZLIB="@# "
PKG_ZLIB=""
fi
fi

View File

@ -19,9 +19,7 @@
#include "config.h"
#include "YapInterface.h"
#ifdef CUT_C
#include "cut_c.h"
#endif
#ifdef _MSC_VER /* Microsoft's Visual C++ Compiler */
#ifdef HAVE_UNISTD_H

View File

@ -166,8 +166,8 @@ end_special(_, _).
special_op("clause_with_cut","TABLING_INNER_CUTS").
special_op("table_answer_resolution_completion","THREADS_CONSUMER_SHARING").
special_op("cut_c","CUT_C").
special_op("cut_userc","CUT_C").
/*special_op("cut_c","CUT_C").*/
/*special_op("cut_userc","CUT_C").*/
special_op("run_eam","BEAM").
special_op("retry_eam","BEAM").
special_op("thread_local","THREADS").

View File

@ -181,20 +181,20 @@ UTESTS_OBJS = \
$(utestsdir)/UnitTesting.o
LIB = $(srcdir)/horus.@SO@
HCLI = $(srcdir)/hcli
SOBJS = horus.@SO@
HCLI = hcli
UTESTING = $(srcdir)/run_tests
all: $(LIB) $(HCLI)
all: $(SOBJS) $(HCLI)
# Don't require $(UTESTING) by default as we
# don't want a hard dependency on CppUnit
with_tests: $(LIB) $(HCLI) $(UTESTING)
with_tests: $(SOBJS) $(HCLI) $(UTESTING)
@DO_SECOND_LD@$(LIB): $(LIB_OBJS)
@DO_SECOND_LD@$(SOBJS): $(LIB_OBJS)
@DO_SECOND_LD@ @SHLIB_CXX_LD@ $(LDFLAGS) -o $@ $(LIB_OBJS) @EXTRA_LIBS_FOR_SWIDLLS@
@ -212,13 +212,15 @@ $(UTESTING): $(UTESTS_OBJS)
install: all
$(INSTALL_PROGRAM) $(LIB) $(DESTDIR)$(YAPLIBDIR)
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
$(INSTALL_PROGRAM) $(HCLI) $(DESTDIR)$(BINDIR)
clean:
rm -f $(LIB) $(HCLI) $(UTESTING) *.o *~ $(utestsdir)/*.o $(utestsdir)/*~
rm -f $(SOBJS) $(HCLI) $(UTESTING) *.o *~ $(utestsdir)/*.o $(utestsdir)/*~
distclean: clean
rm -f Makefile
remove_dots:
rm -f *.dot *.png *.svg

@ -1 +1 @@
Subproject commit b83d419ba547a284a62ce951784849dc7b5ec712
Subproject commit 4424be7f21a07d4f29c1fcbf0330956d74fc07fa

View File

@ -15,7 +15,7 @@
* *
*************************************************************************/
#if defined MYDDAS_ODBC && defined CUT_C
#if defined MYDDAS_ODBC
#include <stdio.h>
#include <stdlib.h>
@ -765,7 +765,7 @@ c_db_odbc_get_fields_properties( USES_REGS1 ) {
list = fields_properties_list;
SQLSMALLINT bind_prim_key;
//por causa de as rows em odbc começam em 1 :)
//por causa de as rows em odbc come<EFBFBD>am em 1 :)
Short *null=(Short *)malloc(sizeof(Short)*(1+num_fields));
if (!SQLALLOCHANDLE(SQL_HANDLE_STMT, hdbc, &hstmt2, "db_get_fields_properties"))

View File

@ -268,7 +268,7 @@ c_db_preds_conn_start ( USES_REGS1 ){
MYDDAS_UTIL_CONNECTION node =
myddas_util_search_connection(conn);
/* Caso a ligacao já tenha sido apagada*/
/* Caso a ligacao já tenha sido apagada*/
if (node == NULL)
{
cut_fail();
@ -699,22 +699,22 @@ void
init_myddas(void)
{
CACHE_REGS
#if defined MYDDAS_MYSQL && defined CUT_C
#if defined MYDDAS_MYSQL
Yap_InitBackMYDDAS_MySQLPreds();
#endif
#if defined MYDDAS_ODBC && defined CUT_C
#if defined MYDDAS_ODBC
Yap_InitBackMYDDAS_ODBCPreds();
#endif
#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL)
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
Yap_InitBackMYDDAS_SharedPreds();
#endif
#if defined CUT_C && defined MYDDAS_MYSQL
#if defined MYDDAS_MYSQL
Yap_InitMYDDAS_MySQLPreds();
#endif
#if defined CUT_C && defined MYDDAS_ODBC
#if defined MYDDAS_ODBC
Yap_InitMYDDAS_ODBCPreds();
#endif
#if defined CUT_C && (defined MYDDAS_ODBC || defined MYDDAS_MYSQL)
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
Yap_InitMYDDAS_SharedPreds();
#endif
#if defined MYDDAS_TOP_LEVEL && defined MYDDAS_MYSQL // && defined HAVE_LIBREADLINE
@ -767,4 +767,4 @@ int WINAPI win_myddas(HANDLE hinst, DWORD reason, LPVOID reserved)
#endif /*CUT_C && (MYDDAS_MYSQL || MYDDAS_ODBC)*/
#endif /*MYDDAS_MYSQL || MYDDAS_ODBC*/

View File

@ -44,7 +44,7 @@ elif test -e "$srcdir"/packages/python/Makefile.in ; then
OLIBS=$LIBS
LIBS=$PYTHON_LIBS
AC_SEARCH_LIBS(Py_Initialize, [python"$PYTHONVERSION" python"$PYTHONVERSION"m],,[echo "Could not find libraries for Python";
ENABLE_PYTHON="@# "],"$OLIBS")
PKG_PYTHON=""],"$OLIBS")
PYTHON_LIBS=$LIBS
LIBS=$OLIBS
if test -d "$PYTHONHOME/include/python$PYTHONVERSION"; then

@ -1 +1 @@
Subproject commit 970bd759158b8ea164c0a178c66d624609a419ee
Subproject commit e8360ba2db265175a3b469bc9d51aff5cfccabb0