Merge branch 'master' of yap.dcc.fc.up.pt:yap-6
This commit is contained in:
commit
8e290be453
@ -3510,6 +3510,7 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
|
|||||||
if (!ystop_found &&
|
if (!ystop_found &&
|
||||||
cip->cpc->nextInst != NULL &&
|
cip->cpc->nextInst != NULL &&
|
||||||
(cip->cpc->nextInst->op == mark_initialised_pvars_op ||
|
(cip->cpc->nextInst->op == mark_initialised_pvars_op ||
|
||||||
|
cip->cpc->nextInst->op == mark_live_regs_op ||
|
||||||
cip->cpc->nextInst->op == blob_op)) {
|
cip->cpc->nextInst->op == blob_op)) {
|
||||||
ystop_found = TRUE;
|
ystop_found = TRUE;
|
||||||
code_p = a_il((CELL)*entry_codep, _Ystop, code_p, pass_no, cip);
|
code_p = a_il((CELL)*entry_codep, _Ystop, code_p, pass_no, cip);
|
||||||
|
34
C/arith1.c
34
C/arith1.c
@ -418,6 +418,26 @@ eval1(Int fi, Term t) {
|
|||||||
RERROR();
|
RERROR();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
case op_erf:
|
||||||
|
{
|
||||||
|
Float dbl = get_float(t), out;
|
||||||
|
#if HAVE_ERF
|
||||||
|
out = erf(dbl);
|
||||||
|
RFLOAT(out);
|
||||||
|
#else
|
||||||
|
RERROR();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
case op_erfc:
|
||||||
|
{
|
||||||
|
Float dbl = get_float(t), out;
|
||||||
|
#if HAVE_ERF
|
||||||
|
out = erfc(dbl);
|
||||||
|
RFLOAT(out);
|
||||||
|
#else
|
||||||
|
RERROR();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
floor(x) maximum integer greatest or equal to X
|
floor(x) maximum integer greatest or equal to X
|
||||||
|
|
||||||
@ -814,6 +834,8 @@ static InitUnEntry InitUnTab[] = {
|
|||||||
{"float_integer_part", op_fintp},
|
{"float_integer_part", op_fintp},
|
||||||
{"sign", op_sign},
|
{"sign", op_sign},
|
||||||
{"lgamma", op_lgamma},
|
{"lgamma", op_lgamma},
|
||||||
|
{"erf",op_erf},
|
||||||
|
{"erfc",op_erfc},
|
||||||
{"random", op_random1}
|
{"random", op_random1}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -879,17 +901,7 @@ p_unary_op_as_integer(void)
|
|||||||
ExpEntry *p;
|
ExpEntry *p;
|
||||||
|
|
||||||
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 1)))) {
|
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 1)))) {
|
||||||
Term ti[2];
|
return Yap_unify(ARG1,ARG2);
|
||||||
|
|
||||||
/* error */
|
|
||||||
ti[0] = t;
|
|
||||||
ti[1] = MkIntTerm(1);
|
|
||||||
t = Yap_MkApplTerm(FunctorSlash, 2, ti);
|
|
||||||
Yap_Error(TYPE_ERROR_EVALUABLE, t,
|
|
||||||
"functor %s/%d for arithmetic expression",
|
|
||||||
RepAtom(name)->StrOfAE,2);
|
|
||||||
P = FAILCODE;
|
|
||||||
return(FALSE);
|
|
||||||
}
|
}
|
||||||
return Yap_unify_constant(ARG2,MkIntTerm(p->FOfEE));
|
return Yap_unify_constant(ARG2,MkIntTerm(p->FOfEE));
|
||||||
}
|
}
|
||||||
|
12
C/arith2.c
12
C/arith2.c
@ -1242,17 +1242,7 @@ p_binary_op_as_integer(void)
|
|||||||
ExpEntry *p;
|
ExpEntry *p;
|
||||||
|
|
||||||
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 2)))) {
|
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 2)))) {
|
||||||
Term ti[2];
|
return Yap_unify(ARG1,ARG2);
|
||||||
|
|
||||||
/* error */
|
|
||||||
ti[0] = t;
|
|
||||||
ti[1] = MkIntTerm(1);
|
|
||||||
t = Yap_MkApplTerm(FunctorSlash, 2, ti);
|
|
||||||
Yap_Error(TYPE_ERROR_EVALUABLE, t,
|
|
||||||
"functor %s/%d for arithmetic expression",
|
|
||||||
RepAtom(name)->StrOfAE,2);
|
|
||||||
P = FAILCODE;
|
|
||||||
return(FALSE);
|
|
||||||
}
|
}
|
||||||
return Yap_unify_constant(ARG2,MkIntTerm(p->FOfEE));
|
return Yap_unify_constant(ARG2,MkIntTerm(p->FOfEE));
|
||||||
}
|
}
|
||||||
|
@ -364,6 +364,9 @@
|
|||||||
#if !HAVE_STRNCPY
|
#if !HAVE_STRNCPY
|
||||||
#define strncpy(X,Y,Z) strcpy(X,Y)
|
#define strncpy(X,Y,Z) strcpy(X,Y)
|
||||||
#endif
|
#endif
|
||||||
|
#if !HAVE_STRNCAT
|
||||||
|
#define strncat(X,Y,Z) strcat(X,Y)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(YAP_EXPORTS)
|
#if defined(_MSC_VER) && defined(YAP_EXPORTS)
|
||||||
#define X_API __declspec(dllexport)
|
#define X_API __declspec(dllexport)
|
||||||
@ -2264,6 +2267,25 @@ do_bootfile (char *bootfilename)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
construct_init_file(char *boot_file, char *BootFile)
|
||||||
|
{
|
||||||
|
/* trust YAPSHAREDIR over YAP_PL_SRCDIR, and notice that the code is / dependent. */
|
||||||
|
#if HAVE_GETENV
|
||||||
|
if (getenv("YAPSHAREDIR")) {
|
||||||
|
strncpy(boot_file, getenv("YAPSHAREDIR"), 256);
|
||||||
|
strncat(boot_file, "/pl/", 255);
|
||||||
|
} else {
|
||||||
|
#endif
|
||||||
|
strncpy(boot_file, YAP_PL_SRCDIR, 256);
|
||||||
|
strncat(boot_file, "/", 255);
|
||||||
|
#if HAVE_GETENV
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
strncat(boot_file, BootFile, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* this routine is supposed to be called from an external program
|
/* this routine is supposed to be called from an external program
|
||||||
that wants to control Yap */
|
that wants to control Yap */
|
||||||
|
|
||||||
@ -2489,21 +2511,7 @@ YAP_Init(YAP_init_args *yap_init)
|
|||||||
|
|
||||||
/* read the bootfile */
|
/* read the bootfile */
|
||||||
if (!do_bootstrap) {
|
if (!do_bootstrap) {
|
||||||
#if HAVE_STRNCAT
|
construct_init_file(boot_file, BootFile);
|
||||||
strncpy(boot_file, YAP_PL_SRCDIR, 256);
|
|
||||||
#else
|
|
||||||
strcpy(boot_file, YAP_PL_SRCDIR);
|
|
||||||
#endif
|
|
||||||
#if HAVE_STRNCAT
|
|
||||||
strncat(boot_file, "/", 255);
|
|
||||||
#else
|
|
||||||
strcat(boot_file, "/");
|
|
||||||
#endif
|
|
||||||
#if HAVE_STRNCAT
|
|
||||||
strncat(boot_file, BootFile, 255);
|
|
||||||
#else
|
|
||||||
strcat(boot_file, BootFile);
|
|
||||||
#endif
|
|
||||||
yap_init->YapPrologBootFile = boot_file;
|
yap_init->YapPrologBootFile = boot_file;
|
||||||
}
|
}
|
||||||
do_bootfile (yap_init->YapPrologBootFile ? yap_init->YapPrologBootFile : BootFile);
|
do_bootfile (yap_init->YapPrologBootFile ? yap_init->YapPrologBootFile : BootFile);
|
||||||
@ -2513,21 +2521,7 @@ YAP_Init(YAP_init_args *yap_init)
|
|||||||
Atom atfile;
|
Atom atfile;
|
||||||
Functor fgoal;
|
Functor fgoal;
|
||||||
YAP_Term goal, as[2];
|
YAP_Term goal, as[2];
|
||||||
#if HAVE_STRNCAT
|
construct_init_file(init_file, InitFile);
|
||||||
strncpy(init_file, YAP_PL_SRCDIR, 256);
|
|
||||||
#else
|
|
||||||
strcpy(init_file, YAP_PL_SRCDIR);
|
|
||||||
#endif
|
|
||||||
#if HAVE_STRNCAT
|
|
||||||
strncat(init_file, "/", 255);
|
|
||||||
#else
|
|
||||||
strcat(init_file, "/");
|
|
||||||
#endif
|
|
||||||
#if HAVE_STRNCAT
|
|
||||||
strncat(init_file, InitFile, 255);
|
|
||||||
#else
|
|
||||||
strcat(init_file, InitFile);
|
|
||||||
#endif
|
|
||||||
/* consult init file */
|
/* consult init file */
|
||||||
atfile = Yap_LookupAtom(init_file);
|
atfile = Yap_LookupAtom(init_file);
|
||||||
as[0] = MkAtomTerm(atfile);
|
as[0] = MkAtomTerm(atfile);
|
||||||
|
23
C/cmppreds.c
23
C/cmppreds.c
@ -643,8 +643,11 @@ p_acomp(void)
|
|||||||
{ /* $a_compare(?R,+X,+Y) */
|
{ /* $a_compare(?R,+X,+Y) */
|
||||||
Term t1 = Deref(ARG1);
|
Term t1 = Deref(ARG1);
|
||||||
Term t2 = Deref(ARG2);
|
Term t2 = Deref(ARG2);
|
||||||
|
Int out;
|
||||||
|
|
||||||
return a_cmp(t1, t2);
|
out = a_cmp(t1, t2);
|
||||||
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
@ -675,42 +678,48 @@ a_eq(Term t1, Term t2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
out = a_cmp(t1,t2);
|
out = a_cmp(t1,t2);
|
||||||
return !ArithError && (out == 0);
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
a_dif(Term t1, Term t2)
|
a_dif(Term t1, Term t2)
|
||||||
{
|
{
|
||||||
Int out = a_cmp(Deref(t1),Deref(t2));
|
Int out = a_cmp(Deref(t1),Deref(t2));
|
||||||
return !ArithError && out != 0;
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
a_gt(Term t1, Term t2)
|
a_gt(Term t1, Term t2)
|
||||||
{ /* A > B */
|
{ /* A > B */
|
||||||
Int out = a_cmp(Deref(t1),Deref(t2));
|
Int out = a_cmp(Deref(t1),Deref(t2));
|
||||||
return !ArithError && out > 0;
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
a_ge(Term t1, Term t2)
|
a_ge(Term t1, Term t2)
|
||||||
{ /* A >= B */
|
{ /* A >= B */
|
||||||
Int out = a_cmp(Deref(t1),Deref(t2));
|
Int out = a_cmp(Deref(t1),Deref(t2));
|
||||||
return !ArithError && out >= 0;
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
a_lt(Term t1, Term t2)
|
a_lt(Term t1, Term t2)
|
||||||
{ /* A < B */
|
{ /* A < B */
|
||||||
Int out = a_cmp(Deref(t1),Deref(t2));
|
Int out = a_cmp(Deref(t1),Deref(t2));
|
||||||
return !ArithError && out < 0;
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
a_le(Term t1, Term t2)
|
a_le(Term t1, Term t2)
|
||||||
{ /* A <= B */
|
{ /* A <= B */
|
||||||
Int out = a_cmp(Deref(t1),Deref(t2));
|
Int out = a_cmp(Deref(t1),Deref(t2));
|
||||||
return !ArithError && out <= 0;
|
if (ArithError) { Yap_Error(Yap_Error_TYPE, Yap_Error_Term, Yap_ErrorMessage); return FALSE; }
|
||||||
|
return out <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
4
C/exec.c
4
C/exec.c
@ -1614,8 +1614,8 @@ Yap_InitYaamRegs(void)
|
|||||||
#ifdef SBA
|
#ifdef SBA
|
||||||
BSEG =
|
BSEG =
|
||||||
#endif /* SBA */
|
#endif /* SBA */
|
||||||
BBREG = B_FZ = B_BASE;
|
BBREG = B_FZ = (choiceptr) Yap_LocalBase;
|
||||||
TR = TR_FZ = TR_BASE;
|
TR = TR_FZ = (tr_fr_ptr) Yap_TrailBase;
|
||||||
#endif /* FROZEN_STACKS */
|
#endif /* FROZEN_STACKS */
|
||||||
LOCK(SignalLock);
|
LOCK(SignalLock);
|
||||||
CreepFlag = CalculateStackGap();
|
CreepFlag = CalculateStackGap();
|
||||||
|
16
C/index.c
16
C/index.c
@ -3448,7 +3448,7 @@ install_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
if (f == FunctorDBRef) {
|
if (f == FunctorDBRef) {
|
||||||
if (cls->u.t_ptr != sp->extra) break;
|
if (cls->u.t_ptr != sp->extra) break;
|
||||||
} else {
|
} else if (f == FunctorDouble) {
|
||||||
CELL *pt = RepAppl(sp->extra);
|
CELL *pt = RepAppl(sp->extra);
|
||||||
if (cls->u.t_ptr) {
|
if (cls->u.t_ptr) {
|
||||||
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
||||||
@ -3461,6 +3461,12 @@ install_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
#endif
|
#endif
|
||||||
if (t != t1) break;
|
if (t != t1) break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
CELL *pt = RepAppl(sp->extra);
|
||||||
|
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
||||||
|
Term t = MkIntTerm(pt[1] & (MAX_ABS_INT-1)),
|
||||||
|
t1 = MkIntTerm(pt1[1] & (MAX_ABS_INT-1));
|
||||||
|
if (t != t1) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3610,7 +3616,7 @@ install_log_upd_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
if (f == FunctorDBRef) {
|
if (f == FunctorDBRef) {
|
||||||
if (cls->u.t_ptr != sp->extra) break;
|
if (cls->u.t_ptr != sp->extra) break;
|
||||||
} else {
|
} else if (f == FunctorDouble) {
|
||||||
CELL *pt = RepAppl(sp->extra);
|
CELL *pt = RepAppl(sp->extra);
|
||||||
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
||||||
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
|
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
|
||||||
@ -3621,6 +3627,12 @@ install_log_upd_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
|
|||||||
t1 = MkIntTerm(pt1[1]);
|
t1 = MkIntTerm(pt1[1]);
|
||||||
#endif
|
#endif
|
||||||
if (t != t1) break;
|
if (t != t1) break;
|
||||||
|
} else {
|
||||||
|
CELL *pt = RepAppl(sp->extra);
|
||||||
|
CELL *pt1 = RepAppl(cls->u.t_ptr);
|
||||||
|
Term t = MkIntTerm(pt[1] & (MAX_ABS_INT-1)),
|
||||||
|
t1 = MkIntTerm(pt1[1] & (MAX_ABS_INT-1));
|
||||||
|
if (t != t1) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
2
H/Yap.h
2
H/Yap.h
@ -90,7 +90,7 @@
|
|||||||
#undef USE_THREADED_CODE
|
#undef USE_THREADED_CODE
|
||||||
#endif
|
#endif
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#define YAP_VERSION "Yap-6.0.2"
|
#define YAP_VERSION "Yap-6.0.3"
|
||||||
|
|
||||||
#define BIN_DIR "c:\\Yap\\bin"
|
#define BIN_DIR "c:\\Yap\\bin"
|
||||||
#define LIB_DIR "c:\\Yap\\lib\\Yap"
|
#define LIB_DIR "c:\\Yap\\lib\\Yap"
|
||||||
|
2
H/eval.h
2
H/eval.h
@ -93,6 +93,8 @@ typedef enum {
|
|||||||
op_fintp,
|
op_fintp,
|
||||||
op_sign,
|
op_sign,
|
||||||
op_lgamma,
|
op_lgamma,
|
||||||
|
op_erf,
|
||||||
|
op_erfc,
|
||||||
op_random1
|
op_random1
|
||||||
} arith1_op;
|
} arith1_op;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
11
Makefile.in
11
Makefile.in
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
#
|
#
|
||||||
@ -12,8 +13,8 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib
|
LIBDIR=@libdir@
|
||||||
YAPLIBDIR=$(EROOTDIR)/lib/Yap
|
YAPLIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
@ -59,7 +60,7 @@ YAPSTARTUP=startup.yss
|
|||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
MPI_CC=@MPI_CC@
|
MPI_CC=@MPI_CC@
|
||||||
CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/packages/MYDDAS
|
CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/MYDDAS
|
||||||
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||||
C_INTERF_FLAGS= @C_INTERF_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -I$(srcdir)/include
|
C_INTERF_FLAGS= @C_INTERF_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -I$(srcdir)/include
|
||||||
C_PARSER_FLAGS= @C_PARSER_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
C_PARSER_FLAGS= @C_PARSER_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||||
@ -98,7 +99,7 @@ YAPLIB=@YAPLIB@
|
|||||||
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
||||||
CWD=$(PWD)
|
CWD=$(PWD)
|
||||||
#
|
#
|
||||||
VERSION=6.0.2
|
VERSION=6.0.3
|
||||||
MYDDAS_VERSION=MYDDAS-0.9.1
|
MYDDAS_VERSION=MYDDAS-0.9.1
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -499,7 +500,7 @@ libYap.a: $(LIB_OBJECTS)
|
|||||||
$(RANLIB) libYap.a
|
$(RANLIB) libYap.a
|
||||||
|
|
||||||
@DYNYAPLIB@: $(LIB_OBJECTS)
|
@DYNYAPLIB@: $(LIB_OBJECTS)
|
||||||
@DYNLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLGS)
|
@DYNLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
install: install_bin install_data
|
install: install_bin install_data
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ void Yap_init_local(void) {
|
|||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
/* local data related to or-parallelism */
|
/* local data related to or-parallelism */
|
||||||
LOCAL = REMOTE + worker_id;
|
LOCAL = REMOTE + worker_id;
|
||||||
Set_LOCAL_top_cp(B_BASE);
|
Set_LOCAL_top_cp((choiceptr) Yap_LocalBase);
|
||||||
LOCAL_top_or_fr = GLOBAL_root_or_fr;
|
LOCAL_top_or_fr = GLOBAL_root_or_fr;
|
||||||
LOCAL_load = 0;
|
LOCAL_load = 0;
|
||||||
LOCAL_share_request = MAX_WORKERS;
|
LOCAL_share_request = MAX_WORKERS;
|
||||||
@ -193,7 +193,7 @@ void Yap_init_local(void) {
|
|||||||
LOCAL_top_sg_fr = NULL;
|
LOCAL_top_sg_fr = NULL;
|
||||||
LOCAL_top_dep_fr = GLOBAL_root_dep_fr;
|
LOCAL_top_dep_fr = GLOBAL_root_dep_fr;
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
Set_LOCAL_top_cp_on_stack(B_BASE); /* ??? */
|
Set_LOCAL_top_cp_on_stack((choiceptr) Yap_LocalBase); /* ??? */
|
||||||
LOCAL_top_susp_or_fr = GLOBAL_root_or_fr;
|
LOCAL_top_susp_or_fr = GLOBAL_root_or_fr;
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
@ -210,7 +210,7 @@ void make_root_frames(void) {
|
|||||||
INIT_LOCK(OrFr_lock(or_fr));
|
INIT_LOCK(OrFr_lock(or_fr));
|
||||||
OrFr_alternative(or_fr) = NULL;
|
OrFr_alternative(or_fr) = NULL;
|
||||||
BITMAP_copy(OrFr_members(or_fr), GLOBAL_bm_present_workers);
|
BITMAP_copy(OrFr_members(or_fr), GLOBAL_bm_present_workers);
|
||||||
SetOrFr_node(or_fr, B_BASE);
|
SetOrFr_node(or_fr, (choiceptr) Yap_LocalBase);
|
||||||
OrFr_nearest_livenode(or_fr) = NULL;
|
OrFr_nearest_livenode(or_fr) = NULL;
|
||||||
OrFr_depth(or_fr) = 0;
|
OrFr_depth(or_fr) = 0;
|
||||||
Set_OrFr_pend_prune_cp(or_fr, NULL);
|
Set_OrFr_pend_prune_cp(or_fr, NULL);
|
||||||
@ -231,8 +231,9 @@ void make_root_frames(void) {
|
|||||||
|
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
/* root dependency frame */
|
/* root dependency frame */
|
||||||
if (!GLOBAL_root_dep_fr)
|
if (!GLOBAL_root_dep_fr) {
|
||||||
new_dependency_frame(GLOBAL_root_dep_fr, FALSE, NULL, NULL, NULL, NULL, NULL);
|
new_dependency_frame(GLOBAL_root_dep_fr, FALSE, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,10 +29,6 @@
|
|||||||
|
|
||||||
extern int Yap_page_size;
|
extern int Yap_page_size;
|
||||||
|
|
||||||
#define H_BASE ((CELL *) Yap_GlobalBase)
|
|
||||||
#define B_BASE ((choiceptr) Yap_LocalBase)
|
|
||||||
#define TR_BASE ((tr_fr_ptr) Yap_TrailBase)
|
|
||||||
|
|
||||||
#if SIZEOF_INT_P == 4
|
#if SIZEOF_INT_P == 4
|
||||||
#define ALIGN 3
|
#define ALIGN 3
|
||||||
#define ALIGNMASK 0xfffffffc
|
#define ALIGNMASK 0xfffffffc
|
||||||
|
@ -65,8 +65,9 @@ static Int p_worker(void);
|
|||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
|
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
static Int p_freeze(void);
|
static Int p_freeze_choice_point(void);
|
||||||
static Int p_wake(void);
|
static Int p_wake_choice_point(void);
|
||||||
|
static Int p_abolish_all_frozen_choice_points(void);
|
||||||
static Int p_table(void);
|
static Int p_table(void);
|
||||||
static Int p_tabling_mode(void);
|
static Int p_tabling_mode(void);
|
||||||
static Int p_abolish_table(void);
|
static Int p_abolish_table(void);
|
||||||
@ -139,8 +140,9 @@ void Yap_init_optyap_preds(void) {
|
|||||||
Yap_InitCPred("or_statistics", 0, p_or_statistics, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred("or_statistics", 0, p_or_statistics, SafePredFlag|SyncPredFlag);
|
||||||
#endif /* YAPOR */
|
#endif /* YAPOR */
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
Yap_InitCPred("freeze_choice_point", 1, p_freeze, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred("freeze_choice_point", 1, p_freeze_choice_point, SafePredFlag|SyncPredFlag);
|
||||||
Yap_InitCPred("wake_choice_point", 1, p_wake, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred("wake_choice_point", 1, p_wake_choice_point, SafePredFlag|SyncPredFlag);
|
||||||
|
Yap_InitCPred("abolish_all_frozen_choice_points", 0, p_abolish_all_frozen_choice_points, SafePredFlag|SyncPredFlag);
|
||||||
Yap_InitCPred("$c_table", 2, p_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
Yap_InitCPred("$c_table", 2, p_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||||
Yap_InitCPred("$c_tabling_mode", 3, p_tabling_mode, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
Yap_InitCPred("$c_tabling_mode", 3, p_tabling_mode, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||||
Yap_InitCPred("$c_abolish_table", 2, p_abolish_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
Yap_InitCPred("$c_abolish_table", 2, p_abolish_table, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||||
@ -552,7 +554,8 @@ Int p_or_statistics(void) {
|
|||||||
|
|
||||||
|
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
static Int p_freeze(void) {
|
static
|
||||||
|
Int p_freeze_choice_point(void) {
|
||||||
Term term_arg, term_cp;
|
Term term_arg, term_cp;
|
||||||
|
|
||||||
term_arg = Deref(ARG1);
|
term_arg = Deref(ARG1);
|
||||||
@ -565,7 +568,8 @@ static Int p_freeze(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Int p_wake(void) {
|
static
|
||||||
|
Int p_wake_choice_point(void) {
|
||||||
Term term_arg;
|
Term term_arg;
|
||||||
|
|
||||||
term_arg = Deref(ARG1);
|
term_arg = Deref(ARG1);
|
||||||
@ -577,6 +581,13 @@ static Int p_wake(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
Int p_abolish_all_frozen_choice_points(void) {
|
||||||
|
abolish_all_frozen_cps();
|
||||||
|
return (TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
Int p_table(void) {
|
Int p_table(void) {
|
||||||
Term mod, t;
|
Term mod, t;
|
||||||
|
@ -79,7 +79,7 @@ void make_root_choice_point(void) {
|
|||||||
|
|
||||||
void free_root_choice_point(void) {
|
void free_root_choice_point(void) {
|
||||||
B = LOCAL_top_cp->cp_b;
|
B = LOCAL_top_cp->cp_b;
|
||||||
LOCAL_top_cp = B_BASE;
|
LOCAL_top_cp = (choiceptr) Yap_LocalBase;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ void free_root_choice_point(void) {
|
|||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
LOCAL_top_cp_on_stack =
|
LOCAL_top_cp_on_stack =
|
||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
LOCAL_top_cp = GLOBAL_root_cp = OrFr_node(GLOBAL_root_or_fr) = B_BASE;
|
LOCAL_top_cp = GLOBAL_root_cp = OrFr_node(GLOBAL_root_or_fr) = (choiceptr) Yap_LocalBase;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,13 +224,13 @@ int q_share_work(int worker_p) {
|
|||||||
RESET_VARIABLE(aux_cell);
|
RESET_VARIABLE(aux_cell);
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
} else if (IsPairTerm(aux_cell)) {
|
} else if (IsPairTerm(aux_cell)) {
|
||||||
/* avoid frozen segments */
|
|
||||||
aux_cell = (CELL) RepPair(aux_cell);
|
aux_cell = (CELL) RepPair(aux_cell);
|
||||||
if ((ADDR) aux_cell >= TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, aux_cell, Yap_TrailTop)) {
|
||||||
|
/* avoid frozen segments */
|
||||||
TR = (tr_fr_ptr) aux_cell;
|
TR = (tr_fr_ptr) aux_cell;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
if (TR > (tr_fr_ptr) TrailTop)
|
if (TR > (tr_fr_ptr) Yap_TrailTop)
|
||||||
TABLING_ERROR_MESSAGE("TR > TrailTop (q_share_work)");
|
TABLING_ERROR_MESSAGE("TR > Yap_TrailTop (q_share_work)");
|
||||||
if (TR < aux_tr)
|
if (TR < aux_tr)
|
||||||
TABLING_ERROR_MESSAGE("TR < aux_tr (q_share_work)");
|
TABLING_ERROR_MESSAGE("TR < aux_tr (q_share_work)");
|
||||||
#endif /* TABLING_ERRORS */
|
#endif /* TABLING_ERRORS */
|
||||||
@ -338,9 +338,9 @@ sync_with_p:
|
|||||||
}
|
}
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
} else if (IsPairTerm(aux_cell)) {
|
} else if (IsPairTerm(aux_cell)) {
|
||||||
/* avoid frozen segments */
|
|
||||||
aux_cell = (CELL) RepPair(aux_cell);
|
aux_cell = (CELL) RepPair(aux_cell);
|
||||||
if ((ADDR) aux_cell >= TrailBase)
|
if (IN_BETWEEN(Yap_TrailBase, aux_cell, Yap_TrailTop)) {
|
||||||
|
/* avoid frozen segments */
|
||||||
aux_tr = (tr_fr_ptr) aux_cell;
|
aux_tr = (tr_fr_ptr) aux_cell;
|
||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
||||||
|
@ -103,9 +103,9 @@ void make_root_choice_point(void) {
|
|||||||
LOCAL_load = 0;
|
LOCAL_load = 0;
|
||||||
LOCAL_prune_request = NULL;
|
LOCAL_prune_request = NULL;
|
||||||
BRANCH(worker_id, 0) = 0;
|
BRANCH(worker_id, 0) = 0;
|
||||||
H_FZ = H_BASE;
|
H_FZ = (CELL *) Yap_GlobalBase;
|
||||||
B_FZ = B_BASE;
|
B_FZ = (choiceptr) Yap_LocalBase;
|
||||||
TR_FZ = TR_BASE;
|
TR_FZ = (tr_fr_ptr) Yap_TrailBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -113,10 +113,10 @@ void free_root_choice_point(void) {
|
|||||||
reset_trail(LOCAL_top_cp->cp_tr, TR);
|
reset_trail(LOCAL_top_cp->cp_tr, TR);
|
||||||
TR = LOCAL_top_cp->cp_tr;
|
TR = LOCAL_top_cp->cp_tr;
|
||||||
B = LOCAL_top_cp->cp_b;
|
B = LOCAL_top_cp->cp_b;
|
||||||
LOCAL_top_cp = B_BASE;
|
LOCAL_top_cp = (choiceptr) Yap_LocalBase;
|
||||||
H_FZ = H_BASE;
|
H_FZ = (CELL *) Yap_GlobalBase;
|
||||||
B_FZ = B_BASE;
|
B_FZ = (choiceptr) Yap_LocalBase;
|
||||||
TR_FZ = TR_BASE;
|
TR_FZ = (tr_fr_ptr) Yap_TrailBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,11 +96,11 @@ void make_root_choice_point(void) {
|
|||||||
void free_root_choice_point(void) {
|
void free_root_choice_point(void) {
|
||||||
B = Get_LOCAL_top_cp()->cp_b;
|
B = Get_LOCAL_top_cp()->cp_b;
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
Set_LOCAL_top_cp_on_stack(B_BASE);
|
Set_LOCAL_top_cp_on_stack((choiceptr) Yap_LocalBase);
|
||||||
#endif /* TABLING */
|
#endif /* TABLING */
|
||||||
Set_GLOBAL_root_cp( B_BASE );
|
Set_GLOBAL_root_cp((choiceptr) Yap_LocalBase);
|
||||||
Set_LOCAL_top_cp( B_BASE );
|
Set_LOCAL_top_cp((choiceptr) Yap_LocalBase);
|
||||||
SetOrFr_node(GLOBAL_root_or_fr, B_BASE);
|
SetOrFr_node(GLOBAL_root_or_fr, (choiceptr) Yap_LocalBase);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ STD_PROTO(static inline void free_subgoal_trie_hash_chain, (sg_hash_ptr));
|
|||||||
STD_PROTO(static inline void free_answer_trie_hash_chain, (ans_hash_ptr));
|
STD_PROTO(static inline void free_answer_trie_hash_chain, (ans_hash_ptr));
|
||||||
STD_PROTO(static inline choiceptr freeze_current_cp, (void));
|
STD_PROTO(static inline choiceptr freeze_current_cp, (void));
|
||||||
STD_PROTO(static inline void resume_frozen_cp, (choiceptr));
|
STD_PROTO(static inline void resume_frozen_cp, (choiceptr));
|
||||||
|
STD_PROTO(static inline void abolish_all_frozen_cps, (void));
|
||||||
|
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
STD_PROTO(static inline void pruning_over_tabling_data_structures, (void));
|
STD_PROTO(static inline void pruning_over_tabling_data_structures, (void));
|
||||||
@ -491,7 +492,7 @@ void unbind_variables(tr_fr_ptr unbind_tr, tr_fr_ptr end_tr) {
|
|||||||
RESET_VARIABLE(ref);
|
RESET_VARIABLE(ref);
|
||||||
} else if (IsPairTerm(ref)) {
|
} else if (IsPairTerm(ref)) {
|
||||||
ref = (CELL) RepPair(ref);
|
ref = (CELL) RepPair(ref);
|
||||||
if ((ADDR)ref >= Yap_TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, ref, Yap_TrailTop)) {
|
||||||
/* avoid frozen segments */
|
/* avoid frozen segments */
|
||||||
unbind_tr = (tr_fr_ptr) ref;
|
unbind_tr = (tr_fr_ptr) ref;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
@ -530,7 +531,7 @@ void rebind_variables(tr_fr_ptr rebind_tr, tr_fr_ptr end_tr) {
|
|||||||
*((CELL *)ref) = TrailVal(rebind_tr);
|
*((CELL *)ref) = TrailVal(rebind_tr);
|
||||||
} else if (IsPairTerm(ref)) {
|
} else if (IsPairTerm(ref)) {
|
||||||
ref = (CELL) RepPair(ref);
|
ref = (CELL) RepPair(ref);
|
||||||
if ((ADDR)ref >= Yap_TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, ref, Yap_TrailTop)) {
|
||||||
/* avoid frozen segments */
|
/* avoid frozen segments */
|
||||||
rebind_tr = (tr_fr_ptr) ref;
|
rebind_tr = (tr_fr_ptr) ref;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
@ -574,7 +575,8 @@ void restore_bindings(tr_fr_ptr unbind_tr, tr_fr_ptr rebind_tr) {
|
|||||||
RESET_VARIABLE(ref);
|
RESET_VARIABLE(ref);
|
||||||
} else if (IsPairTerm(ref)) {
|
} else if (IsPairTerm(ref)) {
|
||||||
ref = (CELL) RepPair(ref);
|
ref = (CELL) RepPair(ref);
|
||||||
if ((ADDR)ref >= Yap_TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, ref, Yap_TrailTop)) {
|
||||||
|
/* avoid frozen segments */
|
||||||
unbind_tr = (tr_fr_ptr) ref;
|
unbind_tr = (tr_fr_ptr) ref;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
if (unbind_tr > (tr_fr_ptr) Yap_TrailTop)
|
if (unbind_tr > (tr_fr_ptr) Yap_TrailTop)
|
||||||
@ -600,7 +602,8 @@ void restore_bindings(tr_fr_ptr unbind_tr, tr_fr_ptr rebind_tr) {
|
|||||||
ref = (CELL) TrailTerm(--end_tr);
|
ref = (CELL) TrailTerm(--end_tr);
|
||||||
if (IsPairTerm(ref)) {
|
if (IsPairTerm(ref)) {
|
||||||
ref = (CELL) RepPair(ref);
|
ref = (CELL) RepPair(ref);
|
||||||
if ((ADDR)ref >= Yap_TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, ref, Yap_TrailTop)) {
|
||||||
|
/* avoid frozen segments */
|
||||||
end_tr = (tr_fr_ptr) ref;
|
end_tr = (tr_fr_ptr) ref;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
if (end_tr > (tr_fr_ptr) Yap_TrailTop)
|
if (end_tr > (tr_fr_ptr) Yap_TrailTop)
|
||||||
@ -617,7 +620,8 @@ void restore_bindings(tr_fr_ptr unbind_tr, tr_fr_ptr rebind_tr) {
|
|||||||
*((CELL *)ref) = TrailVal(rebind_tr);
|
*((CELL *)ref) = TrailVal(rebind_tr);
|
||||||
} else if (IsPairTerm(ref)) {
|
} else if (IsPairTerm(ref)) {
|
||||||
ref = (CELL) RepPair(ref);
|
ref = (CELL) RepPair(ref);
|
||||||
if ((ADDR)ref >= Yap_TrailBase) {
|
if (IN_BETWEEN(Yap_TrailBase, ref, Yap_TrailTop)) {
|
||||||
|
/* avoid frozen segments */
|
||||||
rebind_tr = (tr_fr_ptr) ref;
|
rebind_tr = (tr_fr_ptr) ref;
|
||||||
#ifdef TABLING_ERRORS
|
#ifdef TABLING_ERRORS
|
||||||
if (rebind_tr > (tr_fr_ptr) Yap_TrailTop)
|
if (rebind_tr > (tr_fr_ptr) Yap_TrailTop)
|
||||||
@ -815,6 +819,15 @@ void resume_frozen_cp(choiceptr frozen_cp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void abolish_all_frozen_cps(void) {
|
||||||
|
B_FZ = (choiceptr) Yap_LocalBase;
|
||||||
|
H_FZ = (CELL *) Yap_GlobalBase;
|
||||||
|
TR_FZ = (tr_fr_ptr) Yap_TrailBase;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
static inline
|
static inline
|
||||||
void pruning_over_tabling_data_structures(void) {
|
void pruning_over_tabling_data_structures(void) {
|
||||||
|
@ -160,6 +160,7 @@
|
|||||||
#undef HAVE_CTIME
|
#undef HAVE_CTIME
|
||||||
#undef HAVE_DLOPEN
|
#undef HAVE_DLOPEN
|
||||||
#undef HAVE_DUP2
|
#undef HAVE_DUP2
|
||||||
|
#undef HAVE_ERF
|
||||||
#undef HAVE_FECLEAREXCEPT
|
#undef HAVE_FECLEAREXCEPT
|
||||||
#undef HAVE_FESETTRAPENABLE
|
#undef HAVE_FESETTRAPENABLE
|
||||||
#undef HAVE_FETESTEXCEPT
|
#undef HAVE_FETESTEXCEPT
|
||||||
|
44
configure
vendored
44
configure
vendored
@ -734,7 +734,6 @@ SHELL'
|
|||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
enable_cut_c
|
|
||||||
enable_tabling
|
enable_tabling
|
||||||
enable_or_parallelism
|
enable_or_parallelism
|
||||||
enable_rational_trees
|
enable_rational_trees
|
||||||
@ -1401,7 +1400,6 @@ Optional Features:
|
|||||||
--disable-option-checking ignore unrecognized --enable/--with options
|
--disable-option-checking ignore unrecognized --enable/--with options
|
||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
--enable-cut-c support for executing c code when a cut occurs
|
|
||||||
--enable-tabling support tabling
|
--enable-tabling support tabling
|
||||||
--enable-or-parallelism support or-parallelism as: env-copy,sba,a-cow
|
--enable-or-parallelism support or-parallelism as: env-copy,sba,a-cow
|
||||||
--enable-rational-trees support infinite rational trees
|
--enable-rational-trees support infinite rational trees
|
||||||
@ -3552,13 +3550,6 @@ done
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-cut-c was given.
|
|
||||||
if test "${enable_cut_c+set}" = set; then :
|
|
||||||
enableval=$enable_cut_c; cutc="$enableval"
|
|
||||||
else
|
|
||||||
cutc=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check whether --enable-tabling was given.
|
# Check whether --enable-tabling was given.
|
||||||
if test "${enable_tabling+set}" = set; then :
|
if test "${enable_tabling+set}" = set; then :
|
||||||
enableval=$enable_tabling; tabling="$enableval"
|
enableval=$enable_tabling; tabling="$enableval"
|
||||||
@ -5482,25 +5473,6 @@ $as_echo "$yap_cv_odbc" >&6; }
|
|||||||
echo "-------------------------------"
|
echo "-------------------------------"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$cutc" = no
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "********************************************************"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "!!!!!! WARNING !!!!!!"
|
|
||||||
echo "The MYDDAS interface makes no sense without cut-c"
|
|
||||||
echo "Please contact tiagosoares@ncc.up.pt for help"
|
|
||||||
echo
|
|
||||||
echo "Enabling cut-c"
|
|
||||||
echo
|
|
||||||
echo "********************************************************"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
cutc="yes"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$myddasstats" = "yes"
|
if test "$myddasstats" = "yes"
|
||||||
@ -6899,7 +6871,7 @@ then
|
|||||||
YAPLIB="$DYNYAPLIB"
|
YAPLIB="$DYNYAPLIB"
|
||||||
DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib"
|
DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib"
|
||||||
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
# CROSS_SIMULATOR="DYLD_LIBRARY_PATH=."
|
# CROSS_SIMULATOR="DYLD_LIBRARY_PATH=."
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -6914,7 +6886,7 @@ then
|
|||||||
JAVA_TARGET=sparc
|
JAVA_TARGET=sparc
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||||
LDFLAGS="$LDFLAGS -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
LDFLAGS="$LDFLAGS -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
||||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||||
@ -6923,7 +6895,7 @@ then
|
|||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
PRE_DYNLOADER_PATH=""
|
PRE_DYNLOADER_PATH=""
|
||||||
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
DYNYAPLIB=libYap.notused
|
DYNYAPLIB=libYap.notused
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -8499,12 +8471,14 @@ _ACEOF
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for ac_func in feclearexcept
|
for ac_func in erf feclearexcept
|
||||||
do :
|
do :
|
||||||
ac_fn_c_check_func "$LINENO" "feclearexcept" "ac_cv_func_feclearexcept"
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
if test "x$ac_cv_func_feclearexcept" = x""yes; then :
|
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||||
|
eval as_val=\$$as_ac_var
|
||||||
|
if test "x$as_val" = x""yes; then :
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_FECLEAREXCEPT 1
|
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
30
configure.in
30
configure.in
@ -17,9 +17,6 @@ AC_SUBST(GCC)
|
|||||||
AC_SUBST(C_INTERF_FLAGS)
|
AC_SUBST(C_INTERF_FLAGS)
|
||||||
AC_SUBST(C_PARSER_FLAGS)
|
AC_SUBST(C_PARSER_FLAGS)
|
||||||
|
|
||||||
AC_ARG_ENABLE(cut-c,
|
|
||||||
[ --enable-cut-c support for executing c code when a cut occurs ],
|
|
||||||
cutc="$enableval", cutc=no)
|
|
||||||
AC_ARG_ENABLE(tabling,
|
AC_ARG_ENABLE(tabling,
|
||||||
[ --enable-tabling support tabling ],
|
[ --enable-tabling support tabling ],
|
||||||
tabling="$enableval", tabling=no)
|
tabling="$enableval", tabling=no)
|
||||||
@ -615,25 +612,6 @@ then
|
|||||||
echo "-------------------------------"
|
echo "-------------------------------"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$cutc" = no
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "********************************************************"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "!!!!!! WARNING !!!!!!"
|
|
||||||
echo "The MYDDAS interface makes no sense without cut-c"
|
|
||||||
echo "Please contact tiagosoares@ncc.up.pt for help"
|
|
||||||
echo
|
|
||||||
echo "Enabling cut-c"
|
|
||||||
echo
|
|
||||||
echo "********************************************************"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
cutc="yes"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$myddasstats" = "yes"
|
if test "$myddasstats" = "yes"
|
||||||
@ -1038,7 +1016,7 @@ then
|
|||||||
YAPLIB="$DYNYAPLIB"
|
YAPLIB="$DYNYAPLIB"
|
||||||
DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib"
|
DYNLIB_LD="$CC -dynamiclib -Wl,-install_name,$prefix/lib/libYap.dylib"
|
||||||
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
PRE_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||||
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
# CROSS_SIMULATOR="DYLD_LIBRARY_PATH=."
|
# CROSS_SIMULATOR="DYLD_LIBRARY_PATH=."
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -1053,7 +1031,7 @@ then
|
|||||||
JAVA_TARGET=sparc
|
JAVA_TARGET=sparc
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
PRE_DYNLOADER_PATH="LD_LIBRARY_PATH=\$(abs_top_builddir)"
|
||||||
LDFLAGS="$LDFLAGS -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
LDFLAGS="$LDFLAGS -Wl,-R,$JAVA_HOME/jre/lib/$JAVA_TARGET"
|
||||||
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
DYNYAPLIB=libYap"$SHLIB_SUFFIX"
|
||||||
@ -1062,7 +1040,7 @@ then
|
|||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
PRE_DYNLOADER_PATH=""
|
PRE_DYNLOADER_PATH=""
|
||||||
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPBOOTDIR=\$(DESTDIR)\$(SHAREDIR)/pl YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
EXTEND_DYNLOADER_PATH="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
DYNYAPLIB=libYap.notused
|
DYNYAPLIB=libYap.notused
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1501,7 +1479,7 @@ dnl Checks for library functions.
|
|||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_CHECK_FUNCS(access)
|
AC_CHECK_FUNCS(access)
|
||||||
AC_CHECK_FUNCS(acosh asinh atanh chdir ctime dlopen dup2)
|
AC_CHECK_FUNCS(acosh asinh atanh chdir ctime dlopen dup2)
|
||||||
AC_CHECK_FUNCS(feclearexcept)
|
AC_CHECK_FUNCS(erf feclearexcept)
|
||||||
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv)
|
AC_CHECK_FUNCS(fesettrapenable fgetpos finite fpclass ftime getcwd getenv)
|
||||||
AC_CHECK_FUNCS(gethostbyname gethostid gethostname)
|
AC_CHECK_FUNCS(gethostbyname gethostid gethostname)
|
||||||
AC_CHECK_FUNCS(gethrtime getpagesize)
|
AC_CHECK_FUNCS(gethrtime getpagesize)
|
||||||
|
@ -8,7 +8,7 @@ a\input texinfo @c -*- mode: texinfo; coding: latin-1; -*-
|
|||||||
@c @setchapternewpage odd
|
@c @setchapternewpage odd
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set VERSION 6.0.2
|
@set VERSION 6.0.3
|
||||||
@set EDITION 4.2.6
|
@set EDITION 4.2.6
|
||||||
@set UPDATED Feb 2010
|
@set UPDATED Feb 2010
|
||||||
|
|
||||||
@ -3849,6 +3849,12 @@ Hyperbolic arc tangent.
|
|||||||
@item lgamma(@var{X})
|
@item lgamma(@var{X})
|
||||||
gamma function.
|
gamma function.
|
||||||
|
|
||||||
|
@item erf(@var{X})
|
||||||
|
gaussian error function.
|
||||||
|
|
||||||
|
@item erfc(@var{X})
|
||||||
|
complementary gaussian error function.
|
||||||
|
|
||||||
@item random(@var{X}) [ISO]
|
@item random(@var{X}) [ISO]
|
||||||
An integer random number between 0 and @var{X}.
|
An integer random number between 0 and @var{X}.
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -15,9 +15,7 @@
|
|||||||
* *
|
* *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
:- module(attributes, []).
|
:- module(attributes, [op(1150, fx, attribute)]).
|
||||||
|
|
||||||
:- op(1150, fx, attribute).
|
|
||||||
|
|
||||||
:- multifile
|
:- multifile
|
||||||
user:goal_expansion/3.
|
user:goal_expansion/3.
|
||||||
|
@ -29,17 +29,17 @@
|
|||||||
% Read the Source.
|
% Read the Source.
|
||||||
|
|
||||||
:- module( cleanup, [
|
:- module( cleanup, [
|
||||||
call_cleanup/2,
|
call_cleanup/2,
|
||||||
call_cleanup/1,
|
call_cleanup/1,
|
||||||
on_cleanup/1,
|
on_cleanup/1,
|
||||||
cleanup_all/0
|
cleanup_all/0,
|
||||||
]).
|
op(1150, fx,fragile)
|
||||||
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- multifile user:goal_expansion/3.
|
:- multifile user:goal_expansion/3.
|
||||||
|
|
||||||
:- user_defined_directive(fragile(G), cleanup:cleanup_expansion(G)).
|
:- user_defined_directive(fragile(G), cleanup:cleanup_expansion(G)).
|
||||||
:- op(1150, fx,fragile).
|
|
||||||
|
|
||||||
:- meta_predicate
|
:- meta_predicate
|
||||||
call_cleanup(:,:),
|
call_cleanup(:,:),
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
ROOTDIR = $(prefix)
|
exec_prefix = @exec_prefix@
|
||||||
|
OOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
#
|
#
|
||||||
@ -17,7 +18,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -21,8 +22,8 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib
|
LIBDIR=@libdir@
|
||||||
YAPLIBDIR=$(EROOTDIR)/lib/Yap
|
YAPLIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -26,9 +26,6 @@ static char *rcsid = "$Header: /Users/vitor/Yap/yap-cvsbackup/library/mpi/mpi.c,
|
|||||||
#include "Yatom.h"
|
#include "Yatom.h"
|
||||||
#include "yapio.h"
|
#include "yapio.h"
|
||||||
|
|
||||||
/* for AtomEof */
|
|
||||||
#include "Heap.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -17,7 +18,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -16,17 +16,19 @@
|
|||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
:- module(terms, [
|
:- module(terms, [
|
||||||
term_hash/2,
|
term_hash/2,
|
||||||
term_hash/4,
|
term_hash/4,
|
||||||
instantiated_term_hash/4,
|
instantiated_term_hash/4,
|
||||||
variant/2,
|
variant/2,
|
||||||
unifiable/3,
|
unifiable/3,
|
||||||
subsumes/2,
|
subsumes/2,
|
||||||
subsumes_chk/2,
|
subsumes_chk/2,
|
||||||
cyclic_term/1,
|
cyclic_term/1,
|
||||||
acyclic_term/1,
|
acyclic_term/1,
|
||||||
variable_in_term/2
|
variable_in_term/2,
|
||||||
]).
|
variables_within_term/3,
|
||||||
|
new_variables_in_term/3
|
||||||
|
]).
|
||||||
|
|
||||||
term_hash(T,H) :-
|
term_hash(T,H) :-
|
||||||
term_hash(T, -1, 33554432, H).
|
term_hash(T, -1, 33554432, H).
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -13,7 +13,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: Yap
|
Name: Yap
|
||||||
Summary: Prolog Compiler
|
Summary: Prolog Compiler
|
||||||
Version: 6.0.2
|
Version: 6.0.3
|
||||||
Packager: Vitor Santos Costa <vitor@cos.ufrj.br>
|
Packager: Vitor Santos Costa <vitor@cos.ufrj.br>
|
||||||
Release: 1
|
Release: 1
|
||||||
Source: http://www.dcc.fc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz
|
Source: http://www.dcc.fc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz
|
||||||
|
@ -268,4 +268,4 @@ Function .onInstFailed
|
|||||||
installer, please contact yap-users@sf.net"
|
installer, please contact yap-users@sf.net"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
outfile "yap-6.0.2-installer.exe"
|
outfile "yap-6.0.3-installer.exe"
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -9,14 +9,13 @@
|
|||||||
clpbn_run_solver/3,
|
clpbn_run_solver/3,
|
||||||
clpbn_init_solver/5,
|
clpbn_init_solver/5,
|
||||||
clpbn_run_solver/4,
|
clpbn_run_solver/4,
|
||||||
clpbn_init_graph/1]).
|
clpbn_init_graph/1,
|
||||||
|
op( 500, xfy, with)]).
|
||||||
|
|
||||||
:- use_module(library(atts)).
|
:- use_module(library(atts)).
|
||||||
:- use_module(library(lists)).
|
:- use_module(library(lists)).
|
||||||
:- use_module(library(terms)).
|
:- use_module(library(terms)).
|
||||||
|
|
||||||
:- op( 500, xfy, with).
|
|
||||||
|
|
||||||
%
|
%
|
||||||
% avoid the overhead of using goal_expansion/2.
|
% avoid the overhead of using goal_expansion/2.
|
||||||
%
|
%
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
GCC=@GCC@
|
GCC=@GCC@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -14,7 +15,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -9,7 +9,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# (EROOT for architecture-dependent files)
|
# (EROOT for architecture-dependent files)
|
||||||
#
|
#
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -13,7 +14,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f6bb7821268b5c6df1ce83a9d60af1f90a9dd673
|
Subproject commit 91ad6583a1387ad6c645c46f258fd671d92fe9fb
|
@ -1 +1 @@
|
|||||||
Subproject commit e3ee70d5971a5af8c9a2a3a5fe8a1892c3777f2b
|
Subproject commit dc903cf885614c5caef0411dcf35c650d4f290b4
|
@ -12,7 +12,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
8
packages/cplint/doc/Makefile
Normal file
8
packages/cplint/doc/Makefile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
manual.pdf: manual.tex manual.bbl
|
||||||
|
pdflatex manual
|
||||||
|
pdflatex manual
|
||||||
|
|
||||||
|
manual.html: manual.tex manual.bbl
|
||||||
|
htlatex manual
|
||||||
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 9f80255cce18ee268792631aa1180e19a496346f
|
Subproject commit cb4b299493f80d424dcd19f1928ebb2e0203bdb2
|
@ -11,15 +11,16 @@ SHELL=@SHELL@
|
|||||||
ifeq (@PROLOG_SYSTEM@,yap)
|
ifeq (@PROLOG_SYSTEM@,yap)
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
|
|
||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
|
|
||||||
BINDIR = $(EROOTDIR)/bin
|
BINDIR = $(EROOTDIR)/bin
|
||||||
LIBDIR=$(EROOTDIR)/lib
|
LIBDIR=@libdir@
|
||||||
SHAREDIR=$(EROOTDIR)/share/Yap
|
SHAREDIR=$(EROOTDIR)/share/Yap
|
||||||
YAPLIBDIR=$(EROOTDIR)/lib/Yap
|
YAPLIBDIR=@libdir@/Yap
|
||||||
|
|
||||||
PL=@EXTEND_DYNLOADER_PATH@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
|
PL=@EXTEND_DYNLOADER_PATH@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
|
||||||
LN_S=@LN_S@
|
LN_S=@LN_S@
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
ifeq (@PROLOG_SYSTEM@,yap)
|
ifeq (@PROLOG_SYSTEM@,yap)
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -16,8 +17,8 @@ abs_top_builddir = @abs_top_builddir@
|
|||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
|
|
||||||
BINDIR = $(EROOTDIR)/bin
|
BINDIR = $(EROOTDIR)/bin
|
||||||
LIBDIR=$(EROOTDIR)/lib
|
LIBDIR=@libdir@
|
||||||
YAPLIBDIR=$(EROOTDIR)/lib/Yap
|
YAPLIBDIR=@libdir@/Yap
|
||||||
SHAREDIR=$(ROOTDIR)/share/Yap
|
SHAREDIR=$(ROOTDIR)/share/Yap
|
||||||
|
|
||||||
SHELL=@SHELL@
|
SHELL=@SHELL@
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
GCC=@GCC@
|
GCC=@GCC@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
ROOTDIR = $(prefix)
|
ROOTDIR = $(prefix)
|
||||||
EROOTDIR = @exec_prefix@
|
EROOTDIR = @exec_prefix@
|
||||||
abs_top_builddir = @abs_top_builddir@
|
abs_top_builddir = @abs_top_builddir@
|
||||||
@ -14,7 +15,7 @@ BINDIR = $(EROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for libraries
|
# where YAP should look for libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(EROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#
|
#
|
||||||
# default base directory for YAP installation
|
# default base directory for YAP installation
|
||||||
#
|
#
|
||||||
|
#
|
||||||
ROOTDIR = @prefix@
|
ROOTDIR = @prefix@
|
||||||
#
|
#
|
||||||
# where the binary should be
|
# where the binary should be
|
||||||
@ -9,7 +10,7 @@ BINDIR = $(ROOTDIR)/bin
|
|||||||
#
|
#
|
||||||
# where YAP should look for binary libraries
|
# where YAP should look for binary libraries
|
||||||
#
|
#
|
||||||
LIBDIR=$(ROOTDIR)/lib/Yap
|
LIBDIR=@libdir@/Yap
|
||||||
#
|
#
|
||||||
# where YAP should look for architecture-independent Prolog libraries
|
# where YAP should look for architecture-independent Prolog libraries
|
||||||
#
|
#
|
||||||
|
66
pl/arith.yap
66
pl/arith.yap
@ -85,7 +85,8 @@ do_not_compile_expressions :- set_value('$c_arith',[]).
|
|||||||
'$do_c_built_in'(X is Y, M, P) :-
|
'$do_c_built_in'(X is Y, M, P) :-
|
||||||
primitive(X), !,
|
primitive(X), !,
|
||||||
'$do_c_built_in'(X =:= Y, M, P).
|
'$do_c_built_in'(X =:= Y, M, P).
|
||||||
'$do_c_built_in'(X is Y, M, (P,A=X)) :- nonvar(X), !,
|
'$do_c_built_in'(X is Y, M, (P,A=X)) :-
|
||||||
|
nonvar(X), !,
|
||||||
'$do_c_built_in'(A is Y, M, P).
|
'$do_c_built_in'(A is Y, M, P).
|
||||||
'$do_c_built_in'(X is Y, _, P) :-
|
'$do_c_built_in'(X is Y, _, P) :-
|
||||||
nonvar(Y), % Don't rewrite variables
|
nonvar(Y), % Don't rewrite variables
|
||||||
@ -163,11 +164,11 @@ do_not_compile_expressions :- set_value('$c_arith',[]).
|
|||||||
'$expand_expr'(A, true, A) :-
|
'$expand_expr'(A, true, A) :-
|
||||||
atomic(A), !.
|
atomic(A), !.
|
||||||
'$expand_expr'(T, E, V) :-
|
'$expand_expr'(T, E, V) :-
|
||||||
'$unaryop'(T, O, A), !,
|
T =.. [O, A], !,
|
||||||
'$expand_expr'(A, Q, X),
|
'$expand_expr'(A, Q, X),
|
||||||
'$expand_expr'(O, X, V, Q, E).
|
'$expand_expr'(O, X, V, Q, E).
|
||||||
'$expand_expr'(T, E, V) :-
|
'$expand_expr'(T, E, V) :-
|
||||||
'$binaryop'(T, O, A, B), !,
|
T =.. [O, A, B], !,
|
||||||
'$expand_expr'(A, Q, X),
|
'$expand_expr'(A, Q, X),
|
||||||
'$expand_expr'(B, R, Y),
|
'$expand_expr'(B, R, Y),
|
||||||
'$expand_expr'(O, X, Y, V, Q, S),
|
'$expand_expr'(O, X, Y, V, Q, S),
|
||||||
@ -272,65 +273,6 @@ do_not_compile_expressions :- set_value('$c_arith',[]).
|
|||||||
'$preprocess_args_for_non_commutative'(X, Y, Z, W, E) :-
|
'$preprocess_args_for_non_commutative'(X, Y, Z, W, E) :-
|
||||||
'$do_and'(Z = X, Y = W, E).
|
'$do_and'(Z = X, Y = W, E).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% These are the unary arithmetic operators
|
|
||||||
'$unaryop'(+X ,+ ,X).
|
|
||||||
'$unaryop'(-X ,- ,X).
|
|
||||||
'$unaryop'(\(X) ,\ ,X).
|
|
||||||
'$unaryop'(exp(X) ,exp ,X).
|
|
||||||
'$unaryop'(log(X) ,log ,X).
|
|
||||||
'$unaryop'(log10(X) ,log10 ,X).
|
|
||||||
'$unaryop'(sqrt(X) ,sqrt ,X).
|
|
||||||
'$unaryop'(sin(X) ,sin ,X).
|
|
||||||
'$unaryop'(cos(X) ,cos ,X).
|
|
||||||
'$unaryop'(tan(X) ,tan ,X).
|
|
||||||
'$unaryop'(asin(X) ,asin ,X).
|
|
||||||
'$unaryop'(acos(X) ,acos ,X).
|
|
||||||
'$unaryop'(atan(X) ,atan ,X).
|
|
||||||
'$unaryop'(atan2(X) ,atan2 ,X).
|
|
||||||
'$unaryop'(sinh(X) ,sinh ,X).
|
|
||||||
'$unaryop'(cosh(X) ,cosh ,X).
|
|
||||||
'$unaryop'(tanh(X) ,tanh ,X).
|
|
||||||
'$unaryop'(asinh(X) ,asinh ,X).
|
|
||||||
'$unaryop'(acosh(X) ,acosh ,X).
|
|
||||||
'$unaryop'(atanh(X) ,atanh ,X).
|
|
||||||
'$unaryop'(floor(X) ,floor ,X).
|
|
||||||
'$unaryop'(abs(X) ,abs ,X).
|
|
||||||
'$unaryop'(float(X) ,float ,X).
|
|
||||||
'$unaryop'(+(X) ,+ ,X).
|
|
||||||
'$unaryop'(integer(X) ,integer,X).
|
|
||||||
'$unaryop'(truncate(X) ,truncate,X).
|
|
||||||
'$unaryop'(round(X) ,round ,X).
|
|
||||||
'$unaryop'(ceiling(X) ,ceiling,X).
|
|
||||||
'$unaryop'(msb(X) ,msb ,X).
|
|
||||||
'$unaryop'(sign(X) ,sign ,X).
|
|
||||||
'$unaryop'(float_fractional_part(X) ,float_fractional_part ,X).
|
|
||||||
'$unaryop'(float_integer_part(X) ,float_integer_part ,X).
|
|
||||||
'$unaryop'(lgamma(X) ,lgamma ,X).
|
|
||||||
|
|
||||||
% These are the binary arithmetic operators
|
|
||||||
'$binaryop'(X+Y ,+ ,X,Y).
|
|
||||||
'$binaryop'(X-Y ,- ,X,Y).
|
|
||||||
'$binaryop'(X*Y ,* ,X,Y).
|
|
||||||
'$binaryop'(X/Y ,/ ,X,Y).
|
|
||||||
'$binaryop'(X mod Y ,mod ,X,Y).
|
|
||||||
'$binaryop'(X rem Y ,rem ,X,Y).
|
|
||||||
'$binaryop'(X//Y ,// ,X,Y).
|
|
||||||
'$binaryop'(X/\Y ,/\ ,X,Y).
|
|
||||||
'$binaryop'(X\/Y ,\/ ,X,Y).
|
|
||||||
'$binaryop'(X#Y ,'#' ,X,Y).
|
|
||||||
'$binaryop'(X<<Y ,<< ,X,Y).
|
|
||||||
'$binaryop'(X>>Y ,>> ,X,Y).
|
|
||||||
'$binaryop'(X^Y ,^ ,X,Y).
|
|
||||||
'$binaryop'(X**Y ,** ,X,Y).
|
|
||||||
'$binaryop'(exp(X,Y) ,exp ,X,Y).
|
|
||||||
'$binaryop'(max(X,Y) ,max ,X,Y).
|
|
||||||
'$binaryop'(min(X,Y) ,min ,X,Y).
|
|
||||||
'$binaryop'(gcd(X,Y) ,gcd ,X,Y).
|
|
||||||
'$binaryop'(atan2(X,Y) ,atan2 ,X,Y).
|
|
||||||
|
|
||||||
|
|
||||||
/* Arithmetics */
|
/* Arithmetics */
|
||||||
|
|
||||||
% M and N nonnegative integers, N is the successor of M
|
% M and N nonnegative integers, N is the successor of M
|
||||||
|
@ -56,7 +56,7 @@ true :- true.
|
|||||||
(
|
(
|
||||||
retractall(user:library_directory(_)),
|
retractall(user:library_directory(_)),
|
||||||
'$system_library_directories'(D),
|
'$system_library_directories'(D),
|
||||||
assert(user:library_directory(D)),
|
assertz(user:library_directory(D)),
|
||||||
fail
|
fail
|
||||||
;
|
;
|
||||||
true
|
true
|
||||||
@ -401,6 +401,8 @@ true :- true.
|
|||||||
( '$notrace'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ),
|
( '$notrace'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ),
|
||||||
'$enter_system_mode'.
|
'$enter_system_mode'.
|
||||||
|
|
||||||
|
'$continue_with_command'(Where,V,'$stream_position'(C,_P,A1,A2,A3),'$source_location'(_F,L):G,Source) :- !,
|
||||||
|
'$continue_with_command'(Where,V,'$stream_position'(C,L,A1,A2,A3),G,Source).
|
||||||
'$continue_with_command'(reconsult,V,Pos,G,Source) :-
|
'$continue_with_command'(reconsult,V,Pos,G,Source) :-
|
||||||
'$go_compile_clause'(G,V,Pos,5,Source),
|
'$go_compile_clause'(G,V,Pos,5,Source),
|
||||||
fail.
|
fail.
|
||||||
|
@ -43,7 +43,7 @@ load_files(Files,Opts) :-
|
|||||||
'$check_files'(Files,Call) :-
|
'$check_files'(Files,Call) :-
|
||||||
var(Files), !,
|
var(Files), !,
|
||||||
'$do_error'(instantiation_error,Call).
|
'$do_error'(instantiation_error,Call).
|
||||||
'$check_files'(M:Files,Call) :-
|
'$check_files'(M:Files,Call) :- !,
|
||||||
(var(M)
|
(var(M)
|
||||||
->
|
->
|
||||||
'$do_error'(instantiation_error,Call)
|
'$do_error'(instantiation_error,Call)
|
||||||
@ -878,11 +878,10 @@ absolute_file_name(File,Opts,TrueFileName) :-
|
|||||||
|
|
||||||
'$system_library_directories'(Dir) :-
|
'$system_library_directories'(Dir) :-
|
||||||
getenv('YAPSHAREDIR', Dir).
|
getenv('YAPSHAREDIR', Dir).
|
||||||
'$system_library_directories'(Dir) :-
|
|
||||||
get_value(system_library_directory,Dir).
|
|
||||||
|
|
||||||
'$system_library_directories'(Dir) :-
|
'$system_library_directories'(Dir) :-
|
||||||
getenv('YAPCOMMONSDIR', Dir).
|
getenv('YAPCOMMONSDIR', Dir).
|
||||||
|
'$system_library_directories'(Dir) :-
|
||||||
|
get_value(system_library_directory,Dir).
|
||||||
'$system_library_directories'(Dir) :-
|
'$system_library_directories'(Dir) :-
|
||||||
get_value(prolog_commons_directory,Dir).
|
get_value(prolog_commons_directory,Dir).
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ lists:member(X,[_|L]) :-
|
|||||||
|
|
||||||
:- ['protect.yap'].
|
:- ['protect.yap'].
|
||||||
|
|
||||||
version(yap,[5,1]).
|
version(yap,[6,0]).
|
||||||
|
|
||||||
system_mode(verbose,on) :- set_value('$verbose',on).
|
system_mode(verbose,on) :- set_value('$verbose',on).
|
||||||
system_mode(verbose,off) :- set_value('$verbose',off).
|
system_mode(verbose,off) :- set_value('$verbose',off).
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
'$hide'('$stream') :- !, fail. /* not $STREAM */
|
'$hide'('$stream') :- !, fail. /* not $STREAM */
|
||||||
'$hide'('$stream_position') :- !, fail. /* not stream position */
|
'$hide'('$stream_position') :- !, fail. /* not stream position */
|
||||||
'$hide'('$hacks') :- !, fail.
|
'$hide'('$hacks') :- !, fail.
|
||||||
|
'$hide'('$source_location') :- !, fail.
|
||||||
'$hide'('$messages') :- !, fail.
|
'$hide'('$messages') :- !, fail.
|
||||||
'$hide'(Name) :- hide(Name), fail.
|
'$hide'(Name) :- hide(Name), fail.
|
||||||
|
|
||||||
|
1
shlib
1
shlib
@ -1 +0,0 @@
|
|||||||
Subproject commit 9ca7abd128989d971a265c856bea3e1770812664
|
|
Reference in New Issue
Block a user