Merge branch 'master' of https://github.com/vscosta/yap-6.3
This commit is contained in:
commit
e351402ed9
1
C/save.c
1
C/save.c
@ -1820,7 +1820,6 @@ Restore(char *s, char *lib_dir USES_REGS)
|
|||||||
initIO();
|
initIO();
|
||||||
/* reset time */
|
/* reset time */
|
||||||
Yap_ReInitWallTime();
|
Yap_ReInitWallTime();
|
||||||
Yap_InitSysPath();
|
|
||||||
#if USE_DL_MALLOC || USE_SYSTEM_MALLOC
|
#if USE_DL_MALLOC || USE_SYSTEM_MALLOC
|
||||||
if (!AuxSp) {
|
if (!AuxSp) {
|
||||||
Yap_InitPreAllocCodeSpace( 0 );
|
Yap_InitPreAllocCodeSpace( 0 );
|
||||||
|
92
C/sysbits.c
92
C/sysbits.c
@ -116,7 +116,7 @@ static int chdir(char *);
|
|||||||
|
|
||||||
void exit(int);
|
void exit(int);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef __WINDOWS__
|
||||||
void
|
void
|
||||||
Yap_WinError(char *yap_error)
|
Yap_WinError(char *yap_error)
|
||||||
{
|
{
|
||||||
@ -211,65 +211,58 @@ Yap_dir_separator (int ch)
|
|||||||
char *libdir = NULL;
|
char *libdir = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
static Int
|
||||||
Yap_InitSysPath(void) {
|
initSysPath(Term tlib, Term tcommons) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
int len;
|
int len;
|
||||||
int dir_done = FALSE;
|
int dir_done = FALSE;
|
||||||
int commons_done = FALSE;
|
int commons_done = FALSE;
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
Int rcl, rcc;
|
||||||
|
|
||||||
|
#if _MSC_VER || defined(__MINGW32__) || defined(__MSYS__)
|
||||||
{
|
{
|
||||||
char *dir;
|
char *dir;
|
||||||
if ((dir = Yap_RegistryGetString("library")) &&
|
if ((dir = Yap_RegistryGetString("library")) &&
|
||||||
is_directory(dir)) {
|
is_directory(dir)) {
|
||||||
Yap_PutValue(AtomSystemLibraryDir,
|
if (! Yap_unify( tlib,
|
||||||
MkAtomTerm(Yap_LookupAtom(dir)));
|
MkAtomTerm(Yap_LookupAtom(dir))) )
|
||||||
dir_done = TRUE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ((dir = Yap_RegistryGetString("prolog_commons")) &&
|
if ((dir = Yap_RegistryGetString("prolog_commons")) &&
|
||||||
is_directory(dir)) {
|
is_directory(dir)) {
|
||||||
Yap_PutValue(AtomPrologCommonsDir,
|
if (! Yap_unify( tcommons,
|
||||||
MkAtomTerm(Yap_LookupAtom(dir)));
|
MkAtomTerm(Yap_LookupAtom(dir))) )
|
||||||
commons_done = TRUE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dir_done && commons_done)
|
if (dir_done && commons_done)
|
||||||
return;
|
return rcl && rcc;
|
||||||
#endif
|
#endif
|
||||||
strncpy(LOCAL_FileNameBuf, YAP_SHAREDIR, YAP_FILENAME_MAX);
|
strncpy(LOCAL_FileNameBuf, YAP_SHAREDIR, YAP_FILENAME_MAX);
|
||||||
if (is_directory(LOCAL_FileNameBuf)) {
|
|
||||||
strncat(LOCAL_FileNameBuf,"/", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf,"/", YAP_FILENAME_MAX);
|
||||||
len = strlen(LOCAL_FileNameBuf);
|
len = strlen(LOCAL_FileNameBuf);
|
||||||
|
if (!dir_done) {
|
||||||
strncat(LOCAL_FileNameBuf, "Yap", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf, "Yap", YAP_FILENAME_MAX);
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
if (is_directory(LOCAL_FileNameBuf))
|
||||||
if (!dir_done && is_directory(LOCAL_FileNameBuf))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Yap_PutValue(AtomSystemLibraryDir,
|
if (! Yap_unify( tlib,
|
||||||
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf)));
|
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf))) )
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
return FALSE;
|
||||||
dir_done = TRUE;
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
}
|
||||||
if (!commons_done)
|
if (!commons_done) {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
LOCAL_FileNameBuf[len] = '\0';
|
LOCAL_FileNameBuf[len] = '\0';
|
||||||
strncat(LOCAL_FileNameBuf, "PrologCommons", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf, "PrologCommons", YAP_FILENAME_MAX);
|
||||||
if (is_directory(LOCAL_FileNameBuf))
|
if (is_directory(LOCAL_FileNameBuf)) {
|
||||||
Yap_PutValue(AtomPrologCommonsDir,
|
if (! Yap_unify( tcommons,
|
||||||
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf)));
|
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf))) )
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
return FALSE;
|
||||||
commons_done = TRUE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dir_done && commons_done)
|
if (dir_done && commons_done)
|
||||||
return;
|
return rcl && rcc;
|
||||||
|
|
||||||
#if _MSC_VER || defined(__MINGW32__)
|
#if __WINDOWS__
|
||||||
{
|
{
|
||||||
size_t buflen;
|
size_t buflen;
|
||||||
char *pt;
|
char *pt;
|
||||||
@ -277,9 +270,9 @@ Yap_InitSysPath(void) {
|
|||||||
/* couldn't find it where it was supposed to be,
|
/* couldn't find it where it was supposed to be,
|
||||||
let's try using the executable */
|
let's try using the executable */
|
||||||
if (!GetModuleFileName( NULL, LOCAL_FileNameBuf, YAP_FILENAME_MAX)) {
|
if (!GetModuleFileName( NULL, LOCAL_FileNameBuf, YAP_FILENAME_MAX)) {
|
||||||
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "could not find executable name");
|
Yap_WinError( "could not find executable name" );
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
buflen = strlen(LOCAL_FileNameBuf);
|
buflen = strlen(LOCAL_FileNameBuf);
|
||||||
pt = LOCAL_FileNameBuf+buflen;
|
pt = LOCAL_FileNameBuf+buflen;
|
||||||
@ -288,7 +281,7 @@ Yap_InitSysPath(void) {
|
|||||||
if (pt == LOCAL_FileNameBuf) {
|
if (pt == LOCAL_FileNameBuf) {
|
||||||
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "could not find executable name");
|
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "could not find executable name");
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (*--pt != '\\') {
|
while (*--pt != '\\') {
|
||||||
@ -296,6 +289,7 @@ Yap_InitSysPath(void) {
|
|||||||
if (pt == LOCAL_FileNameBuf) {
|
if (pt == LOCAL_FileNameBuf) {
|
||||||
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "could not find executable name");
|
Yap_Error(OPERATING_SYSTEM_ERROR, TermNil, "could not find executable name");
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* now, this is a possible location for the ROOT_DIR, let's look for a share directory here */
|
/* now, this is a possible location for the ROOT_DIR, let's look for a share directory here */
|
||||||
@ -310,20 +304,27 @@ Yap_InitSysPath(void) {
|
|||||||
strncat(LOCAL_FileNameBuf,"\\", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf,"\\", YAP_FILENAME_MAX);
|
||||||
len = strlen(LOCAL_FileNameBuf);
|
len = strlen(LOCAL_FileNameBuf);
|
||||||
strncat(LOCAL_FileNameBuf, "Yap", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf, "Yap", YAP_FILENAME_MAX);
|
||||||
if (!dir_done && is_directory(LOCAL_FileNameBuf))
|
if (!dir_done && is_directory(LOCAL_FileNameBuf)) {
|
||||||
{
|
if (! Yap_unify( tlib,
|
||||||
Yap_PutValue(AtomSystemLibraryDir,
|
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf))) )
|
||||||
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf)));
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!commons_done)
|
|
||||||
{
|
|
||||||
LOCAL_FileNameBuf[len] = '\0';
|
LOCAL_FileNameBuf[len] = '\0';
|
||||||
strncat(LOCAL_FileNameBuf, "PrologCommons", YAP_FILENAME_MAX);
|
strncat(LOCAL_FileNameBuf, "PrologCommons", YAP_FILENAME_MAX);
|
||||||
if (is_directory(LOCAL_FileNameBuf))
|
if (!commons_done && is_directory(LOCAL_FileNameBuf)) {
|
||||||
Yap_PutValue(AtomPrologCommonsDir,
|
if (! Yap_unify( tcommons,
|
||||||
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf)));
|
MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf))) )
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
return dir_done && commons_done;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static Int
|
||||||
|
p_libraries_path( USES_REGS1 )
|
||||||
|
{
|
||||||
|
return initSysPath( ARG1, ARG2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
@ -3030,6 +3031,7 @@ Yap_InitSysPreds(void)
|
|||||||
Yap_InitCPred ("release_random_state", 1, p_release_random_state, SafePredFlag);
|
Yap_InitCPred ("release_random_state", 1, p_release_random_state, SafePredFlag);
|
||||||
#endif
|
#endif
|
||||||
Yap_InitCPred ("log_event", 1, p_log_event, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred ("log_event", 1, p_log_event, SafePredFlag|SyncPredFlag);
|
||||||
|
Yap_InitCPred ("library_directories", 2, p_libraries_path, SafePredFlag);
|
||||||
Yap_InitCPred ("sh", 0, p_sh, SafePredFlag|SyncPredFlag);
|
Yap_InitCPred ("sh", 0, p_sh, SafePredFlag|SyncPredFlag);
|
||||||
Yap_InitCPred ("$shell", 1, p_shell, SafePredFlag|SyncPredFlag|UserCPredFlag);
|
Yap_InitCPred ("$shell", 1, p_shell, SafePredFlag|SyncPredFlag|UserCPredFlag);
|
||||||
Yap_InitCPred ("system", 1, p_system, SafePredFlag|SyncPredFlag|UserCPredFlag);
|
Yap_InitCPred ("system", 1, p_system, SafePredFlag|SyncPredFlag|UserCPredFlag);
|
||||||
|
@ -370,7 +370,6 @@ UInt Yap_cputime(void);
|
|||||||
Int Yap_walltime(void);
|
Int Yap_walltime(void);
|
||||||
int Yap_dir_separator(int);
|
int Yap_dir_separator(int);
|
||||||
int Yap_volume_header(char *);
|
int Yap_volume_header(char *);
|
||||||
void Yap_InitSysPath(void);
|
|
||||||
int Yap_signal_index(const char *);
|
int Yap_signal_index(const char *);
|
||||||
#ifdef MAC
|
#ifdef MAC
|
||||||
void Yap_SetTextFile(char *);
|
void Yap_SetTextFile(char *);
|
||||||
|
@ -11,9 +11,12 @@
|
|||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
|
|
||||||
|
#ifndef __MSYS__
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_XOS_H
|
#if HAVE_XOS_H
|
||||||
#include <xos.h> /* Windows POSIX enhancements */
|
#include <xos.h> /* Windows POSIX enhancements */
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WINDOWS__
|
#ifndef __WINDOWS__
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MSYS__)
|
||||||
#define __WINDOWS__ 1
|
#define __WINDOWS__ 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -511,13 +511,13 @@ JIT_Compiler.o: IT/JIT_Compiler.cpp
|
|||||||
$(CC) -c $(CFLAGS) $< -o $@
|
$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
pl-ntcon.o: console/LGPL/pl-ntcon.c config.h
|
pl-ntcon.o: console/LGPL/pl-ntcon.c config.h
|
||||||
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include $< -o $@
|
$(CC) -c $(CFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I$(srcdir)/include $< -o $@
|
||||||
|
|
||||||
pl-ntconsole.o: console/LGPL/pl-ntconsole.c config.h
|
pl-ntconsole.o: console/LGPL/pl-ntconsole.c config.h
|
||||||
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir) -I$(srcdir)/include -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
$(CC) -c $(CFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I$(srcdir) -I$(srcdir)/include -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
||||||
|
|
||||||
pl-ntmain.o: console/LGPL/pl-ntmain.c config.h
|
pl-ntmain.o: console/LGPL/pl-ntmain.c config.h
|
||||||
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
$(CC) -c $(CFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
||||||
|
|
||||||
yapres.o: console/LGPL/yap.rc console/LGPL/manifest.xml config.h
|
yapres.o: console/LGPL/yap.rc console/LGPL/manifest.xml config.h
|
||||||
$(RC) $(RCFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I. -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os -I$(srcdir)/console/LGPL @EXTRA_INCLUDES_FOR_WIN32@ -i $< -o $@
|
$(RC) $(RCFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I. -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os -I$(srcdir)/console/LGPL @EXTRA_INCLUDES_FOR_WIN32@ -i $< -o $@
|
||||||
@ -667,6 +667,7 @@ install_common: install_startup
|
|||||||
mkdir -p $(DESTDIR)$(SHAREDIR)
|
mkdir -p $(DESTDIR)$(SHAREDIR)
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/PrologCommons
|
mkdir -p $(DESTDIR)$(SHAREDIR)/PrologCommons
|
||||||
|
$(INSTALL) $(srcdir)/PrologCommons/PROLOGCOMMONS.md $(DESTDIR)$(SHAREDIR)/PrologCommons
|
||||||
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl
|
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl
|
||||||
mkdir -p $(DESTDIR)$(DOCSDIR)
|
mkdir -p $(DESTDIR)$(DOCSDIR)
|
||||||
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
||||||
|
8
PrologCommons/PROLOGCOMMONS.md
Normal file
8
PrologCommons/PROLOGCOMMONS.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
This directory should hold files from the Prolog Commons
|
||||||
|
project. Please see
|
||||||
|
|
||||||
|
http://prolog-commons.org
|
||||||
|
|
||||||
|
for detailed information on the Prolog Commons initiative.
|
||||||
|
|
@ -337,9 +337,6 @@
|
|||||||
/* Define to 1 if you have the <ieeefp.h> header file. */
|
/* Define to 1 if you have the <ieeefp.h> header file. */
|
||||||
#undef HAVE_IEEEFP_H
|
#undef HAVE_IEEEFP_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <IntSafe.h> header file. */
|
|
||||||
#undef HAVE_INTSAFE_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
@ -959,6 +956,9 @@
|
|||||||
/* what is the configure host name */
|
/* what is the configure host name */
|
||||||
#undef HOST_ALIAS
|
#undef HOST_ALIAS
|
||||||
|
|
||||||
|
/* type of int64_t */
|
||||||
|
#undef INT64_T_DEFINED
|
||||||
|
|
||||||
/* malloc_t */
|
/* malloc_t */
|
||||||
#undef MALLOC_T
|
#undef MALLOC_T
|
||||||
|
|
||||||
|
198
configure
vendored
198
configure
vendored
@ -784,6 +784,7 @@ STARTUP_ANDROID
|
|||||||
ARCH
|
ARCH
|
||||||
M4GENHDRS
|
M4GENHDRS
|
||||||
M4
|
M4
|
||||||
|
INT64_T_DEFINED
|
||||||
PRE_INSTALL_ENV
|
PRE_INSTALL_ENV
|
||||||
INSTALL_ENV
|
INSTALL_ENV
|
||||||
PKG_PRISM
|
PKG_PRISM
|
||||||
@ -1941,52 +1942,6 @@ $as_echo "$ac_res" >&6; }
|
|||||||
|
|
||||||
} # ac_fn_c_check_header_compile
|
} # ac_fn_c_check_header_compile
|
||||||
|
|
||||||
# ac_fn_c_try_link LINENO
|
|
||||||
# -----------------------
|
|
||||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
|
||||||
ac_fn_c_try_link ()
|
|
||||||
{
|
|
||||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { { ac_try="$ac_link"
|
|
||||||
case "(($ac_try" in
|
|
||||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
|
||||||
*) ac_try_echo=$ac_try;;
|
|
||||||
esac
|
|
||||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
|
||||||
$as_echo "$ac_try_echo"; } >&5
|
|
||||||
(eval "$ac_link") 2>conftest.err
|
|
||||||
ac_status=$?
|
|
||||||
if test -s conftest.err; then
|
|
||||||
grep -v '^ *+' conftest.err >conftest.er1
|
|
||||||
cat conftest.er1 >&5
|
|
||||||
mv -f conftest.er1 conftest.err
|
|
||||||
fi
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
||||||
test $ac_status = 0; } && {
|
|
||||||
test -z "$ac_c_werror_flag" ||
|
|
||||||
test ! -s conftest.err
|
|
||||||
} && test -s conftest$ac_exeext && {
|
|
||||||
test "$cross_compiling" = yes ||
|
|
||||||
test -x conftest$ac_exeext
|
|
||||||
}; then :
|
|
||||||
ac_retval=0
|
|
||||||
else
|
|
||||||
$as_echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
ac_retval=1
|
|
||||||
fi
|
|
||||||
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
|
||||||
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
|
||||||
# interfere with the next link command; also delete a directory that is
|
|
||||||
# left behind by Apple's compiler. We do this before executing the actions.
|
|
||||||
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
|
||||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
|
||||||
as_fn_set_status $ac_retval
|
|
||||||
|
|
||||||
} # ac_fn_c_try_link
|
|
||||||
|
|
||||||
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
|
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||||
@ -2078,6 +2033,52 @@ fi
|
|||||||
|
|
||||||
} # ac_fn_c_check_header_mongrel
|
} # ac_fn_c_check_header_mongrel
|
||||||
|
|
||||||
|
# ac_fn_c_try_link LINENO
|
||||||
|
# -----------------------
|
||||||
|
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||||
|
ac_fn_c_try_link ()
|
||||||
|
{
|
||||||
|
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { { ac_try="$ac_link"
|
||||||
|
case "(($ac_try" in
|
||||||
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||||
|
*) ac_try_echo=$ac_try;;
|
||||||
|
esac
|
||||||
|
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||||
|
$as_echo "$ac_try_echo"; } >&5
|
||||||
|
(eval "$ac_link") 2>conftest.err
|
||||||
|
ac_status=$?
|
||||||
|
if test -s conftest.err; then
|
||||||
|
grep -v '^ *+' conftest.err >conftest.er1
|
||||||
|
cat conftest.er1 >&5
|
||||||
|
mv -f conftest.er1 conftest.err
|
||||||
|
fi
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; } && {
|
||||||
|
test -z "$ac_c_werror_flag" ||
|
||||||
|
test ! -s conftest.err
|
||||||
|
} && test -s conftest$ac_exeext && {
|
||||||
|
test "$cross_compiling" = yes ||
|
||||||
|
test -x conftest$ac_exeext
|
||||||
|
}; then :
|
||||||
|
ac_retval=0
|
||||||
|
else
|
||||||
|
$as_echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_retval=1
|
||||||
|
fi
|
||||||
|
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
||||||
|
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
||||||
|
# interfere with the next link command; also delete a directory that is
|
||||||
|
# left behind by Apple's compiler. We do this before executing the actions.
|
||||||
|
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
||||||
|
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||||
|
as_fn_set_status $ac_retval
|
||||||
|
|
||||||
|
} # ac_fn_c_try_link
|
||||||
|
|
||||||
# ac_fn_c_check_func LINENO FUNC VAR
|
# ac_fn_c_check_func LINENO FUNC VAR
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
# Tests whether FUNC exists, setting the cache variable VAR accordingly
|
# Tests whether FUNC exists, setting the cache variable VAR accordingly
|
||||||
@ -5606,6 +5607,19 @@ $as_echo "no" >&6; }
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
for ac_header in winsock.h winsock2.h windows.h
|
||||||
|
do :
|
||||||
|
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
|
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||||
|
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
# Extract the first word of "sh", so it can be a program name with args.
|
# Extract the first word of "sh", so it can be a program name with args.
|
||||||
set dummy sh; ac_word=$2
|
set dummy sh; ac_word=$2
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
@ -6936,31 +6950,6 @@ fi
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ac_header in IntSafe.h
|
|
||||||
do :
|
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "IntSafe.h" "ac_cv_header_IntSafe_h" "$ac_includes_default"
|
|
||||||
if test "x$ac_cv_header_IntSafe_h" = xyes; then :
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_INTSAFE_H 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
for ac_header in windows.h
|
|
||||||
do :
|
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
|
|
||||||
if test "x$ac_cv_header_windows_h" = xyes; then :
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_WINDOWS_H 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if test "$threads" = yes
|
if test "$threads" = yes
|
||||||
then
|
then
|
||||||
for ac_header in pthread.h
|
for ac_header in pthread.h
|
||||||
@ -7658,7 +7647,7 @@ fi
|
|||||||
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*cyg*|*mingw*)
|
*cyg*|*mingw*|*msys*)
|
||||||
# gcc on cygwin seems to have trouble with longjmp
|
# gcc on cygwin seems to have trouble with longjmp
|
||||||
# and -fomit-frame-point -DBP_FREE
|
# and -fomit-frame-point -DBP_FREE
|
||||||
YAPLIB="yap.dll"
|
YAPLIB="yap.dll"
|
||||||
@ -8277,13 +8266,12 @@ fi
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for ac_header in wctype.h winsock.h winsock2.h
|
for ac_header in wctype.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
if test "x$ac_cv_header_wctype_h" = xyes; then :
|
||||||
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
#define HAVE_WCTYPE_H 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -8958,6 +8946,48 @@ cat >>confdefs.h <<_ACEOF
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int64_t is defined" >&5
|
||||||
|
$as_echo_n "checking whether int64_t is defined... " >&6; }
|
||||||
|
if ${yap_cv_int64_t_defined+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
|
||||||
|
if test "$cross_compiling" = yes; then :
|
||||||
|
yap_cv_int64_t_defined=no
|
||||||
|
else
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <stdint.h>
|
||||||
|
int main() {
|
||||||
|
int64_t i;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
|
yap_cv_int64_t_defined=yes
|
||||||
|
else
|
||||||
|
yap_cv_int64_t_defined=no
|
||||||
|
fi
|
||||||
|
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||||
|
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $yap_cv_int64_t_defined" >&5
|
||||||
|
$as_echo "$yap_cv_int64_t_defined" >&6; }
|
||||||
|
if test $yap_cv_int64_t_defined = yes
|
||||||
|
then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define INT64_T_DEFINED 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t" >&5
|
||||||
|
$as_echo_n "checking for int64_t... " >&6; }
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of malloc" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of malloc" >&5
|
||||||
$as_echo_n "checking for type of malloc... " >&6; }
|
$as_echo_n "checking for type of malloc... " >&6; }
|
||||||
@ -10287,11 +10317,11 @@ if test "x$PLARCH" = "x"; then
|
|||||||
*linux*)
|
*linux*)
|
||||||
PLARCH=`echo $host | sed 's/-.*/-linux/'`
|
PLARCH=`echo $host | sed 's/-.*/-linux/'`
|
||||||
;;
|
;;
|
||||||
i?86-*mingw32*)
|
i?86-*mingw32*|i?86-msys*)
|
||||||
# Make PLARCH match the definition in src/config/win32.h
|
# Make PLARCH match the definition in src/config/win32.h
|
||||||
PLARCH=i386-win32
|
PLARCH=i386-win32
|
||||||
;;
|
;;
|
||||||
x86_64-*mingw32*)
|
x86_64-*mingw32*|x86_64-msys*)
|
||||||
# Make PLARCH match the definition in src/config/win64.h
|
# Make PLARCH match the definition in src/config/win64.h
|
||||||
PLARCH=x64-win64
|
PLARCH=x64-win64
|
||||||
;;
|
;;
|
||||||
@ -13063,7 +13093,7 @@ elif test -d "$cudd_dir/lib"; then
|
|||||||
LIBS="$LIBS -L $cudd_dir/lib"
|
LIBS="$LIBS -L $cudd_dir/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$target_os" = "mingw32" -o "$target_os" = "mingw64"
|
if test "$target_os" = "mingw32" -o "$target_os" = "mingw64" -o "$target_os" = "msys"
|
||||||
then
|
then
|
||||||
#mingw: we know where things are
|
#mingw: we know where things are
|
||||||
CUDD_LIBS="$cudd_dir/lib/all_cudd.dll"
|
CUDD_LIBS="$cudd_dir/lib/all_cudd.dll"
|
||||||
@ -14079,7 +14109,7 @@ else
|
|||||||
JAVA_TEST=Test.java
|
JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 14082 "configure" */
|
/* #line 14112 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -14255,7 +14285,7 @@ EOF
|
|||||||
if uudecode$EXEEXT Test.uue; then
|
if uudecode$EXEEXT Test.uue; then
|
||||||
ac_cv_prog_uudecode_base64=yes
|
ac_cv_prog_uudecode_base64=yes
|
||||||
else
|
else
|
||||||
echo "configure: 14258: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
echo "configure: 14288: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||||
echo "configure: failed file was:" >&5
|
echo "configure: failed file was:" >&5
|
||||||
cat Test.uue >&5
|
cat Test.uue >&5
|
||||||
ac_cv_prog_uudecode_base64=no
|
ac_cv_prog_uudecode_base64=no
|
||||||
@ -14386,7 +14416,7 @@ else
|
|||||||
JAVA_TEST=Test.java
|
JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 14389 "configure" */
|
/* #line 14419 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -14421,7 +14451,7 @@ JAVA_TEST=Test.java
|
|||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
TEST=Test
|
TEST=Test
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* [#]line 14424 "configure" */
|
/* [#]line 14454 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void main (String args[]) {
|
public static void main (String args[]) {
|
||||||
System.exit (0);
|
System.exit (0);
|
||||||
|
12
configure.in
12
configure.in
@ -517,7 +517,8 @@ AC_PROG_INSTALL
|
|||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_CHECK_TOOL(AR,[ar],:)
|
AC_CHECK_TOOL(AR,[ar],:)
|
||||||
AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
|
AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
|
||||||
AC_CHECK_HEADERS(winsock.h winsock2.h)
|
dnl do this before windows.h
|
||||||
|
AC_CHECK_HEADERS(winsock.h winsock2.h windows.h)
|
||||||
AC_PATH_PROG(SHELL,sh)
|
AC_PATH_PROG(SHELL,sh)
|
||||||
AC_CHECK_TOOL([INDENT], [indent], [:])
|
AC_CHECK_TOOL([INDENT], [indent], [:])
|
||||||
|
|
||||||
@ -661,9 +662,6 @@ if test "$yap_cv_judy" != "no"; then
|
|||||||
AC_CHECK_LIB(Judy, Judy1Set,,[AC_MSG_RESULT([libJudy not found, UDI will only work with one Index at a time])])
|
AC_CHECK_LIB(Judy, Judy1Set,,[AC_MSG_RESULT([libJudy not found, UDI will only work with one Index at a time])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADERS(IntSafe.h)
|
|
||||||
AC_CHECK_HEADERS(windows.h)
|
|
||||||
|
|
||||||
if test "$threads" = yes
|
if test "$threads" = yes
|
||||||
then
|
then
|
||||||
AC_CHECK_HEADERS(pthread.h)
|
AC_CHECK_HEADERS(pthread.h)
|
||||||
@ -1091,7 +1089,7 @@ dnl Linux has both elf and a.out, in this case we found elf
|
|||||||
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
INSTALL_ENV="YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*cyg*|*mingw*)
|
*cyg*|*mingw*|*msys*)
|
||||||
# gcc on cygwin seems to have trouble with longjmp
|
# gcc on cygwin seems to have trouble with longjmp
|
||||||
# and -fomit-frame-point -DBP_FREE
|
# and -fomit-frame-point -DBP_FREE
|
||||||
YAPLIB="yap.dll"
|
YAPLIB="yap.dll"
|
||||||
@ -1918,11 +1916,11 @@ if test "x$PLARCH" = "x"; then
|
|||||||
*linux*)
|
*linux*)
|
||||||
PLARCH=`echo $host | sed 's/-.*/-linux/'`
|
PLARCH=`echo $host | sed 's/-.*/-linux/'`
|
||||||
;;
|
;;
|
||||||
i?86-*mingw32*)
|
i?86-*mingw32*|i?86-msys*)
|
||||||
# Make PLARCH match the definition in src/config/win32.h
|
# Make PLARCH match the definition in src/config/win32.h
|
||||||
PLARCH=i386-win32
|
PLARCH=i386-win32
|
||||||
;;
|
;;
|
||||||
x86_64-*mingw32*)
|
x86_64-*mingw32*|x86_64-msys*)
|
||||||
# Make PLARCH match the definition in src/config/win64.h
|
# Make PLARCH match the definition in src/config/win64.h
|
||||||
PLARCH=x64-win64
|
PLARCH=x64-win64
|
||||||
;;
|
;;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define MAX_FILE_NAME 1024
|
#define MAX_FILE_NAME 1024
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "console/LGPL/resource.h"
|
#include "console/LGPL/resource.h"
|
||||||
#ifdef THREADSx
|
#ifdef THREADS
|
||||||
#define O_PLMT 1
|
#define O_PLMT 1
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
@ -1087,7 +1087,7 @@ set_window_title(rlc_console c)
|
|||||||
int v = (int)PL_query(PL_QUERY_VERSION);
|
int v = (int)PL_query(PL_QUERY_VERSION);
|
||||||
int major = v / 10000;
|
int major = v / 10000;
|
||||||
int minor = (v / 100) % 100;
|
int minor = (v / 100) % 100;
|
||||||
int patch = v % 100;
|
int patch = v / 100;
|
||||||
#ifdef O_PLMT
|
#ifdef O_PLMT
|
||||||
TCHAR *mt = _T("Multi-threaded, ");
|
TCHAR *mt = _T("Multi-threaded, ");
|
||||||
#else
|
#else
|
||||||
|
@ -367,7 +367,7 @@ SUBGROUPING = YES
|
|||||||
# SEPARATE_MEMBER_PAGES.
|
# SEPARATE_MEMBER_PAGES.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
INLINE_GROUPED_CLASSES = NO
|
INLINE_GROUPED_CLASSES = YES
|
||||||
|
|
||||||
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
|
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
|
||||||
# with only public data fields or simple typedef fields will be shown inline in
|
# with only public data fields or simple typedef fields will be shown inline in
|
||||||
@ -551,7 +551,7 @@ SORT_MEMBER_DOCS = YES
|
|||||||
# this will also influence the order of the classes in the class list.
|
# this will also influence the order of the classes in the class list.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
SORT_BRIEF_DOCS = NO
|
SORT_BRIEF_DOCS = YES
|
||||||
|
|
||||||
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
||||||
# (brief and detailed) documentation of class members so that constructors and
|
# (brief and detailed) documentation of class members so that constructors and
|
||||||
@ -563,7 +563,7 @@ SORT_BRIEF_DOCS = NO
|
|||||||
# detailed member documentation.
|
# detailed member documentation.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
SORT_MEMBERS_CTORS_1ST = NO
|
SORT_MEMBERS_CTORS_1ST = yes
|
||||||
|
|
||||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
|
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
|
||||||
# of group names into alphabetical order. If set to NO the group names will
|
# of group names into alphabetical order. If set to NO the group names will
|
||||||
@ -655,7 +655,7 @@ SHOW_FILES = YES
|
|||||||
# Folder Tree View (if specified).
|
# Folder Tree View (if specified).
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
SHOW_NAMESPACES = NO
|
SHOW_NAMESPACES = YES
|
||||||
|
|
||||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||||
# doxygen should invoke to get the current version for each file (typically from
|
# doxygen should invoke to get the current version for each file (typically from
|
||||||
@ -771,7 +771,6 @@ WARN_LOGFILE =
|
|||||||
|
|
||||||
INPUT = foreigns.yap docs/yap.md pl swi C H include os packages library CXX OPTYap
|
INPUT = foreigns.yap docs/yap.md pl swi C H include os packages library CXX OPTYap
|
||||||
|
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||||
@ -1602,7 +1601,7 @@ MAKEINDEX_CMD_NAME = makeindex
|
|||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||||
|
|
||||||
COMPACT_LATEX = NO
|
COMPACT_LATEX = YES
|
||||||
|
|
||||||
# The PAPER_TYPE tag can be used to set the paper type that is used by the
|
# The PAPER_TYPE tag can be used to set the paper type that is used by the
|
||||||
# printer.
|
# printer.
|
||||||
@ -1723,7 +1722,9 @@ GENERATE_RTF = NO
|
|||||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||||
# it.
|
# it.
|
||||||
# The default directory is: rtf.
|
# The default directory is: rtf.
|
||||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
# This tag requires that the tag GENERATE_RTb
|
||||||
|
|
||||||
|
F is set to YES.
|
||||||
|
|
||||||
RTF_OUTPUT = rtf
|
RTF_OUTPUT = rtf
|
||||||
|
|
145
docs/yap.md
145
docs/yap.md
@ -370,70 +370,91 @@ CC="gcc -mabi=64" ./configure --...
|
|||||||
Be careful. At least for some versions of `GCC`, compiling with
|
Be careful. At least for some versions of `GCC`, compiling with
|
||||||
`-g` seems to result in broken code.
|
`-g` seems to result in broken code.
|
||||||
|
|
||||||
+ WIN32: GCC is distributed in the MINGW32 and CYGWIN packages.
|
@section Compiling_under_mingw Compiling Under MINGW's GCC
|
||||||
|
|
||||||
The Mingw32 environment is available from the URL:
|
|
||||||
|
|
||||||
<http://www.mingw.org>
|
|
||||||
|
|
||||||
You will need to install the `msys` and `mingw`
|
|
||||||
packages. You should be able to do configure, make and make install.
|
|
||||||
|
|
||||||
If you use mingw32 you may want to search the contributed packages for
|
|
||||||
the `gmp` multi-precision arithmetic library. If you do setup YAP
|
|
||||||
with `gmp` note that libgmp.dll must be in the path,
|
|
||||||
otherwise YAP will not be able to execute.
|
|
||||||
|
|
||||||
The CygWin environment is available from the URL:
|
|
||||||
|
|
||||||
<http://www.cygwin.com>
|
|
||||||
|
|
||||||
and mirrors. We suggest using recent versions of the cygwin shell. The
|
|
||||||
compilation steps under the cygwin shell are as follows:
|
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
mkdir cyg
|
|
||||||
$YAPSRC/configure --enable-coroutining \\
|
|
||||||
--enable-depth-limit \\
|
|
||||||
--enable-max-performance
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
By default, YAP will use the `-mno-cygwin` option to
|
|
||||||
disable the use of the cygwin dll and to enable the mingw32 subsystem
|
|
||||||
instead. YAP thus will not need the cygwin dll. It instead accesses
|
|
||||||
the system's CRTDLL.DLL `C` run time library supplied with
|
|
||||||
Win32 platforms through the mingw32 interface. Note that some older
|
|
||||||
WIN95 systems may not have CRTDLL.DLL, in this case it should
|
|
||||||
be sufficient to import the file from a newer WIN95 or WIN98 machine.
|
|
||||||
|
|
||||||
You should check the default installation path which is set to
|
|
||||||
/YAP in the standard Makefile. This string will usually
|
|
||||||
be expanded into c:\\YAP by Windows.
|
|
||||||
|
|
||||||
The cygwin environment does not provide <tt>gmp</tt> on the MINGW
|
|
||||||
subsystem. You can fetch a dll for the <tt>gmp</tt> library from
|
|
||||||
<http://www.sf.net/projects/mingwrep>.
|
|
||||||
|
|
||||||
It is also possible to configure YAP to be a part of the cygwin
|
|
||||||
environment. In this case you should use:
|
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
mkdir cyg
|
|
||||||
$YAPSRC/configure --enable-max-performance \\
|
|
||||||
--enable-cygwin=yes
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
YAP will then compile using the cygwin library and will be installed
|
|
||||||
in cygwin's /usr/local. You can use YAP from a cygwin console,
|
|
||||||
or as a standalone application as long as it can find
|
|
||||||
cygwin1.dll in its path. Note that you may use to use
|
|
||||||
`--enable-depth-limit` for Aleph compatibility, and that you may
|
|
||||||
want to be sure that GMP is installed.
|
|
||||||
|
|
||||||
|
|
||||||
|
AT the time of this writing (Nov 2014), YAP uses the mkwin script to
|
||||||
|
compile in WIN32. The script requires either a WIN32 environment, or a
|
||||||
|
cross-compiler/emulator package.
|
||||||
|
|
||||||
|
YAP has been known to compile under VISUAL C++, and should compile and
|
||||||
|
work under cygwin, but the favorite approach is to use a native
|
||||||
|
msys/mingw environment. This approach has two key advantages:
|
||||||
|
|
||||||
|
+ it does not need an interface layer and a DLL, like cygwin.
|
||||||
|
|
||||||
|
+ it enables cross-compilation.
|
||||||
|
|
||||||
|
YAP uses rge `mkwin` script to generate a new YAP installer. The script is
|
||||||
|
controlled by a set of of variables that should be defined early on in
|
||||||
|
the text. It executes by first calling `configure`, next running `make`, and
|
||||||
|
last (if all went well) executing `nsys`.
|
||||||
|
|
||||||
|
In more detail, the following mingw based environments have been
|
||||||
|
tested to develop YAP:
|
||||||
|
|
||||||
|
* MSYS 1 and mingw32/64: most WIN32 development did occur in this
|
||||||
|
native environment. Best results were achieved with
|
||||||
|
MSYS-1.0.* and TDM-GCC:
|
||||||
|
|
||||||
|
mingw: http://www.mingw.org/
|
||||||
|
original msys: http://www.mingw.org/wiki/MSYS
|
||||||
|
mingw64: http://mingw-w64.sourceforge.net/
|
||||||
|
TDM-GCC: http://tdm-gcc.tdragon.net/
|
||||||
|
|
||||||
|
* This distribution was compiled with the MSYS2 integrated
|
||||||
|
development, that supports 32 and 64 bit compilation. Setting up
|
||||||
|
MSYS2 should be done with care, but it is worth it as the
|
||||||
|
distribution works nicely in MINGW32 and MINGW64 mode. A third
|
||||||
|
compilation mode, MSYS mode, has problems with compiling sockets.
|
||||||
|
|
||||||
|
msys2: http://sourceforge.net/projects/msys2/
|
||||||
|
|
||||||
|
* cygwin and cygwin64 now can generate native applications
|
||||||
|
|
||||||
|
cygwin: https://www.cygwin.com/
|
||||||
|
|
||||||
|
* Linux has a nice cross-compilation environment, with some of the best
|
||||||
|
work done for Fedora.
|
||||||
|
|
||||||
|
fedora mingw cross-compiler: http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework
|
||||||
|
|
||||||
|
One problem is that this environment requires emulation of WIN32
|
||||||
|
executables to generate the initial saved state and to compile
|
||||||
|
`chr`. `wine` sometimes does the task, but it sometimes fails.
|
||||||
|
|
||||||
|
* OSX has the `mxe` package, a port of mingw that is in active
|
||||||
|
development.
|
||||||
|
|
||||||
|
mxe: http://mxe.cc/
|
||||||
|
|
||||||
|
Note that OSX has technical limitations that preclude porting
|
||||||
|
wine64. wine32 is distributed with package managers such as ports
|
||||||
|
and brew.
|
||||||
|
|
||||||
|
=== Setting up WIN32 compilation
|
||||||
|
|
||||||
|
Compiling WIN32 packages depends on a number of parameters: chosen compiler,
|
||||||
|
packages to install, directory setup. You may have to change these ones that
|
||||||
|
control the `mkwin` script:
|
||||||
|
|
||||||
|
* `VER`: major/minor number
|
||||||
|
* `PATCHID`: third digit
|
||||||
|
* `SRC`: directory containing yap sources, in the local environment notation.
|
||||||
|
* `SRC_WIN`: same, but in WIN32 standard notation.
|
||||||
|
* `THREADS`: yes or no? controllable from the command line.
|
||||||
|
* `ABI`: "32" or "64", controllable from the command line.
|
||||||
|
* `NSIS`: installer generator, usually "/c/Program Files (x86)/NSIS/makensis".
|
||||||
|
* `DOCS_DIR`: where you have the doxygen output.
|
||||||
|
* `GCC_DIR`: root of gcc seup.
|
||||||
|
* `HOST`: argument to `--host` configure command.
|
||||||
|
* `BUILD`: build directory
|
||||||
|
* `GMP`: multi-precision package; yes, no, or the installation directory; usually in the distribution.
|
||||||
|
* `CUDD`: BDD package, usually in the distribution.
|
||||||
|
* `JAVA`: Java sdk directory, usually in the distribution.
|
||||||
|
* `PYTHON`: Python package, usually in the distribution.
|
||||||
|
* `R`: R environment package, usually in the distribution.
|
||||||
|
* `GECODE`: constraint solver package, usually not in the WIN32 distribution.
|
||||||
|
|
||||||
@subsection Compiling_Under_Visual_C Compiling Under Visual C++
|
@subsection Compiling_Under_Visual_C Compiling Under Visual C++
|
||||||
|
|
||||||
|
199
misc/mkwin
199
misc/mkwin
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
# !/bin/sh
|
||||||
#
|
#
|
||||||
# script for compiling and installing YAP under msys. Uses a mingw64
|
# script for compiling and installing YAP under msys. Uses a mingw64
|
||||||
# compiler, msys shell and nsis to do the installing
|
# compiler, msys shell and nsis to do the installing
|
||||||
@ -14,30 +14,44 @@
|
|||||||
#
|
#
|
||||||
# http://sourceforge.net/projects/mingwbuilds/
|
# http://sourceforge.net/projects/mingwbuilds/
|
||||||
# PS: don't install in the default location.
|
# PS: don't install in the default location.
|
||||||
# mingw should avoid space in its directory,
|
# mingw should avoid space in its directory path,
|
||||||
# it freaks winres out.
|
# it freaks winres out.
|
||||||
# http://nsis.sourceforge.net/Main_Page
|
# http://nsis.sourceforge.net/Main_Page
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
YHOME=/y/vsc
|
for YHOME in /y/vsc /z /home/vsc /home/vitor /Users/vsc /u/vitor;
|
||||||
VERSION=6.3.4
|
do
|
||||||
#cross-compiler for OSX, see http://mxe.cc/
|
if test -d $YHOME/Yap
|
||||||
#notice that OSX does not allow WIN64 emulation (wine64)
|
then
|
||||||
MXE=$HOME/Yap/mxe/usr
|
break
|
||||||
# by default, compile without threads
|
fi
|
||||||
THREADS=no
|
done
|
||||||
# use 64 bits
|
|
||||||
ABI=64
|
|
||||||
|
|
||||||
SRC=/c/cygwin/Yap/yap-6.3
|
# assumes o mingw32/mingw64 compiler
|
||||||
|
# native sh like env: msys usually, such as
|
||||||
|
# http://msys2.sourceforge.net/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Major and Minor
|
||||||
|
VER="6.3"
|
||||||
|
# Patch
|
||||||
|
PATCHID="4"
|
||||||
|
# SRC in the way it loks to the script
|
||||||
|
SRC=/c/cygwin/yap-"$VER"
|
||||||
|
# the way it looks to win32
|
||||||
|
SRC_WIN="c:\\cygwin\\yap-${VER}"
|
||||||
#SRC=/l/work/noth/git
|
#SRC=/l/work/noth/git
|
||||||
#SRC_WIN=L:\\work\\noth\\git
|
#SRC_WIN=L:\\work\\noth\\git
|
||||||
#SRC="$HOME"/git/yap-6.3
|
#SRC="$HOME"/git/yap-6.3
|
||||||
TARGET=/c/Yap64
|
# do we support THREADS
|
||||||
|
THREADS=no
|
||||||
|
# makes install bundle
|
||||||
NSIS="/c/Program Files (x86)/NSIS/makensis"
|
NSIS="/c/Program Files (x86)/NSIS/makensis"
|
||||||
# by default, ""
|
# emulator, by default, ""
|
||||||
PREFIX_CMD=wine
|
PREFIX_CMD=wine
|
||||||
|
|
||||||
|
VERSION="$VER"."$PATCHID"
|
||||||
|
ABI=64
|
||||||
I=$#
|
I=$#
|
||||||
while test $I -gt 0
|
while test $I -gt 0
|
||||||
do
|
do
|
||||||
@ -47,6 +61,14 @@ do
|
|||||||
elif test $1 = no_threads
|
elif test $1 = no_threads
|
||||||
then
|
then
|
||||||
THREADS=no
|
THREADS=no
|
||||||
|
elif test $1 = all
|
||||||
|
then
|
||||||
|
rm -rf /c/Yap/*
|
||||||
|
rm -rf /c/Yap64/*
|
||||||
|
"$SRC"/misc/mkwin 32
|
||||||
|
"$SRC"/misc/mkwin 32 threads
|
||||||
|
"$SRC"/misc/mkwin 64
|
||||||
|
"$SRC"/misc/mkwin 64 threads
|
||||||
elif test $1 = 32
|
elif test $1 = 32
|
||||||
then
|
then
|
||||||
ABI=32
|
ABI=32
|
||||||
@ -57,120 +79,108 @@ do
|
|||||||
echo "received \"$1\", should be one of threads, no_threads, 32, 64"
|
echo "received \"$1\", should be one of threads, no_threads, 32, 64"
|
||||||
fi
|
fi
|
||||||
I=$(( $I - 1 ))
|
I=$(( $I - 1 ))
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# srcdir comes from here, please avoid relative paths
|
# srcdir comes from here, please avoid relative paths
|
||||||
CONFIGURE="$SRC"/configure
|
CONFIGURE="$SRC"/configure
|
||||||
DEBUG=" --enable-debug-yap --enable-low-level-tracer"
|
#DEBUG=" --enable-debug-yap --enable-low-level-tracer"
|
||||||
|
DEBUG=
|
||||||
|
|
||||||
# debugging setup
|
# debugging setup
|
||||||
do_compile=true
|
do_compile=yes
|
||||||
do_install=true
|
do_install=yes
|
||||||
|
|
||||||
# HOME WIN64 configuration
|
# HOME WIN64 configuration
|
||||||
|
|
||||||
# DOCS_DIR=/l/work/noth/yapdocs
|
# DOCS_DIR=/l/work/noth/yapdocs
|
||||||
DOCS_DIR="$YHOME"/Yap/bins/threads
|
DOCS_DIR="$YHOME"/Yap/doxout
|
||||||
|
|
||||||
if test "$THREADS" = yes; then
|
|
||||||
FULL_VERSION="$VERSION"-threads
|
|
||||||
else
|
|
||||||
FULL_VERSION="$VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $ABI = 64; then
|
if test $ABI = 64; then
|
||||||
BUILD=/c/cygwin/Yap/mingw"$ABI"
|
TARGET=YAP64
|
||||||
#GCC_DIR=/l/Work/noth/mingw-w64/x86_64-4.9.0-posix-seh-rt_v3-rev1/mingw64
|
|
||||||
case $( uname ) in
|
case $( uname ) in
|
||||||
*Darwin*)
|
*Darwin*)
|
||||||
GCC_DIR="$MXE"
|
GCC_DIR="$MXE"
|
||||||
HOST="x86_64-w64-mingw32"
|
HOST="x86_64-w64-mingw32"
|
||||||
LIB_PATH="$MXE"/"$HOST"/lib
|
BUILD=/c/cygwin/Yap/mingw"$ABI"
|
||||||
;;
|
;;
|
||||||
*MINGW64*)
|
*MINGW64*)
|
||||||
GCC_DIR=/c/TDM-GCC-64
|
# GCC_DIR=/l/Work/noth/mingw-w64/x86_64-4.9.0-posix-seh-rt_v3-rev1/mingw64
|
||||||
|
# GCC_DIR=/c/TDM-GCC-64
|
||||||
|
GCC_DIR=/c/msys64/MinGW64
|
||||||
HOST="x86_64-w64-mingw32"
|
HOST="x86_64-w64-mingw32"
|
||||||
LIB_PATH="$GCC_DIR"/"$HOST"/lib
|
;;
|
||||||
|
MSYS*)
|
||||||
|
# GCC_DIR=/c/TDM-GCC-64
|
||||||
|
GCC_DIR=/c/msys64
|
||||||
|
HOST="x86_64-pc-msys"
|
||||||
|
BLD="--build=$HOST"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# ok.
|
# ok.
|
||||||
# BDD compiler package. Get version that compiles on Windows from Vitor!
|
# BDD compiler package. Get version that compiles on Windows from Vitor!
|
||||||
# GMP=/l/Work/noth/msys/1.0/local
|
# GMP=/l/Work/noth/msys/1.0/local
|
||||||
GMP=/c/msys64/usr/win64
|
GMP=yes #/c/msys64/usr/win64
|
||||||
CUDD=/c/cygwin/Yap/cudd-2.5.0-mingw64
|
CUDD=/c/cygwin/Yap/cudd-2.5.0-mingw64
|
||||||
GECODE=no # "/c/Program Files/Gecode"
|
GECODE=no # "/c/Program Files/Gecode"
|
||||||
JAVA="$( echo /c/Program\ Files/Java/jdk* )"
|
JAVA="$( echo /c/Program\ Files/Java/jdk* )"
|
||||||
PYTHON="/c/Python33-64"
|
# "/c/Python33-64"
|
||||||
R="$( echo /c/Program\ Files/R/R-*/bin/x64 )"
|
PYTHON=yes
|
||||||
|
R="$( echo /c/Program\ Files/R/R-*/bin/x64* )"
|
||||||
fi
|
|
||||||
|
|
||||||
# HOME WIN32 configuration
|
# HOME WIN32 configuration
|
||||||
if test $ABI = 32; then
|
elif test $ABI = 32; then
|
||||||
ABI=32
|
TARGET=YAP
|
||||||
case $( uname ) in
|
case $( uname ) in
|
||||||
*Darwin*)
|
*Darwin*)
|
||||||
#use mxe as a cross compiler
|
#use mxe as a cross compiler
|
||||||
GCC_DIR="$MXE"/bin
|
|
||||||
PATH="$GCC_DIR":"$PATH"
|
|
||||||
HOST="i686-pc-mingw32"
|
|
||||||
LIB_PATH="$MXE"/"$HOST"/lib
|
|
||||||
GECODE=no # install only allows one of 32 or 64 bits
|
|
||||||
GMP=yes
|
|
||||||
JAVA=no
|
|
||||||
PYTHON=no
|
|
||||||
REAL=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $( uname ) in
|
|
||||||
*Darwin*)
|
|
||||||
GCC_DIR="$MXE"
|
GCC_DIR="$MXE"
|
||||||
HOST="x86_64-w64-mingw32"
|
HOST="i686-pc-mingw32"
|
||||||
LIB_PATH="$MXE"/"$HOST"/lib
|
GMP=/c/msys64/usr/win32
|
||||||
;;
|
;;
|
||||||
*MINGW64*)
|
*MINGW32*)
|
||||||
GCC_DIR=/c/TDM-GCC-64
|
GCC_DIR=/c/msys64/mingw32
|
||||||
HOST="x86_64-w64-mingw32"
|
HOST="i686-w64-mingw32"
|
||||||
LIB_PATH="$GCC_DIR"/"$HOST"/lib
|
GMP=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# ok.
|
# ok.
|
||||||
# BDD compiler package. Get version that compiles on Windows from Vitor!
|
# BDD compiler package. Get version that compiles on Windows from Vitor!
|
||||||
# GMP=/l/Work/noth/msys/1.0/local
|
# GMP=/l/Work/noth/msys/1.0/local
|
||||||
GMP=/c/msys64/usr/win32
|
|
||||||
CUDD=/c/cygwin/Yap/cudd-2.5.0-mingw32
|
CUDD=/c/cygwin/Yap/cudd-2.5.0-mingw32
|
||||||
GECODE=no # "/c/Program Files/Gecode"
|
GECODE=no # "/c/Program Files/Gecode"
|
||||||
JAVA="$( echo /c/Program\ Files\ */Java/jdk* )"
|
JAVA="$( echo /c/Program\ Files\ *x86*/Java/jdk* )"
|
||||||
PYTHON="/c/Python27"
|
#"/c/Python27/DLLs"
|
||||||
|
PYTHON=yes
|
||||||
R="$( echo /c/Program\ Files/R/R-*/bin/i* )"
|
R="$( echo /c/Program\ Files/R/R-*/bin/i* )"
|
||||||
HOST+=" --enable-abi=32"
|
# HOST=" --enable-abi=32"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$THREADS" = xyes; then
|
||||||
|
EXTRA_THREADS="-threads"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for BUILD in /c/cygwin/Yap "$HOME"/Yap/bins .
|
||||||
|
do
|
||||||
|
if test -d $BUILD; then break; fi
|
||||||
|
done
|
||||||
|
BUILD+="/mingw""$ABI""$EXTRA_THREADS"
|
||||||
|
|
||||||
|
|
||||||
export PATH="$GCC_DIR"/bin:"$PATH"
|
export PATH="$GCC_DIR"/bin:"$PATH"
|
||||||
# echo "gcc= " $GCC_DIR
|
# echo "gcc= " $GCC_DIR
|
||||||
# echo "host= " $HOST
|
|
||||||
if test x"$JAVA" != xno
|
if test x"$JAVA" != xno
|
||||||
then
|
then
|
||||||
export PATH="$PATH":"$JAVA"/bin
|
export PATH="$PATH":"$JAVA"/bin
|
||||||
fi
|
fi
|
||||||
if test x"$PYTHON" != xno
|
if test x"$PYTHON" != xno
|
||||||
then
|
then
|
||||||
export PATH="$PATH":"$PYTHON"/"python.exe"
|
export PATH="$PATH":"$PYTHON"
|
||||||
fi
|
fi
|
||||||
if test x"$R" != xno
|
if test x"$R" != xno
|
||||||
then
|
then
|
||||||
export PATH="$PATH":"$R"
|
export PATH="$PATH":"$R"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ${THREADS} = yes
|
|
||||||
then
|
|
||||||
cp "$LIB_PATH"/libwinpthread-1.dll .
|
|
||||||
cp libwinpthread-1.dll pthreadGC2.dll
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test $CUDD != no
|
if test $CUDD != no
|
||||||
then
|
then
|
||||||
BDDLIB="yes"
|
BDDLIB="yes"
|
||||||
@ -185,7 +195,7 @@ then
|
|||||||
export PATH="$PATH":"$GECODE"/bin
|
export PATH="$PATH":"$GECODE"/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$JAVA" = yes
|
if test x"$JAVA" != xno
|
||||||
then
|
then
|
||||||
export PATH="$PATH":"$JAVA"/bin
|
export PATH="$PATH":"$JAVA"/bin
|
||||||
fi
|
fi
|
||||||
@ -205,49 +215,52 @@ then
|
|||||||
export PATH="$PATH":"$R"
|
export PATH="$PATH":"$R"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test do_compile = true
|
export INSTALL_SH=$SRC/yap-"$VERSION"/install.sh
|
||||||
then
|
|
||||||
make distclean
|
|
||||||
fi
|
|
||||||
|
|
||||||
export INSTALL_SH=$SRC/yap-6.3/install.sh
|
|
||||||
# avoid using relative paths
|
# avoid using relative paths
|
||||||
if test "$do_compile" = true; then
|
if test "$do_compile" = yes; then
|
||||||
BUILD=/c/cygwin/Yap/mingw"$ABI"
|
|
||||||
mkdir -p "$BUILD"
|
mkdir -p "$BUILD"
|
||||||
|
cd "$BUILD"
|
||||||
|
# make distclean
|
||||||
# /bin/rm -rf "$BUILD"/*
|
# /bin/rm -rf "$BUILD"/*
|
||||||
"$CONFIGURE" --host="$HOST" \
|
"$CONFIGURE" --host="$HOST" "$BLD" \
|
||||||
--prefix="$TARGET" $DEBUG\
|
--prefix=/c/"$TARGET" $DEBUG\
|
||||||
--with-R="$R" \
|
--with-R="$R" \
|
||||||
--with-java="$JAVA" \
|
--with-java="$JAVA" \
|
||||||
--with-gmp="$GMP" \
|
--with-gmp="$GMP" \
|
||||||
--with-python="$PYTHON" \
|
--with-python="$PYTHON"/python.exe \
|
||||||
--with-cudd="$CUDD" --enable-bddlib="$BDDLIB" --with-cplint="$CPLINT" \
|
--with-cudd="$CUDD" --enable-bddlib="$BDDLIB" --with-cplint="$CPLINT" \
|
||||||
--with-gecode="$GECODE" \
|
--with-gecode="$GECODE" \
|
||||||
--enable-threads="$THREADS" --enable-pthread-locking
|
--enable-threads="$THREADS" --enable-pthread-locking
|
||||||
|
|
||||||
make #-j 4 install
|
make #-j 4 install
|
||||||
fi
|
fi
|
||||||
if test "$do_install" = true; then
|
if test "$do_install" = yes; then
|
||||||
|
make install
|
||||||
|
cp -a $DOCS_DIR/html /c/$TARGET/share/doc/Yap
|
||||||
|
cp $DOCS_DIR/latex/*pdf /c/$TARGET/share/doc/Yap
|
||||||
|
|
||||||
|
DLL_PATH="$GCC_DIR"/bin
|
||||||
|
|
||||||
|
cp "$DLL_PATH"/libwinpthread-1.dll /c/"$TARGET"/bin
|
||||||
|
cp "$DLL_PATH"/libgmp*.dll /c/"$TARGET"/bin
|
||||||
|
cp /c/"$TARGET"/bin/libwinpthread-1.dll /c/"$TARGET"/bin/pthreadGC2.dll
|
||||||
|
|
||||||
if test $ABI = 64; then
|
if test $ABI = 64; then
|
||||||
cp $DOCS_DIR/*html $TARGET/share/doc/Yap
|
|
||||||
cp $DOCS_DIR/*pdf $TARGET/share/doc/Yap
|
|
||||||
"$NSIS" -DREGKEY=SOFTWARE\\YAP\\Prolog64 \
|
"$NSIS" -DREGKEY=SOFTWARE\\YAP\\Prolog64 \
|
||||||
-DROOTDIR=$TARGET \
|
-DROOTDIR=/c/$TARGET -DTARGET="$TARGET""$EXTRA_THREADS" \
|
||||||
-DABI="$ABI" \
|
-DABI="$ABI" \
|
||||||
-DVERSION="$FULL_VERSION" \
|
-DVERSION="$VERSION""$EXTRA_THREADS" \
|
||||||
-DOPTIONS="$SRC_WIN\\misc\\options.ini" \
|
-DOPTIONS="$SRC_WIN\\misc\\options.ini" \
|
||||||
-DOUT_DIR=".." -D"WIN64=1" \
|
-DOUT_DIR=".." -D"WIN64=1" \
|
||||||
-NOCD $SRC/yap-6.3/misc/Yap.nsi
|
-NOCD $SRC/misc/Yap.nsi
|
||||||
else
|
else
|
||||||
cp $DOCS_DIR/*html $TARGET/share/doc/Yap
|
|
||||||
cp $DOCS_DIR/*pdf $TARGET/share/doc/Yap
|
|
||||||
"$NSIS" -DREGKEY=SOFTWARE\\YAP\\Prolog \
|
"$NSIS" -DREGKEY=SOFTWARE\\YAP\\Prolog \
|
||||||
-DROOTDIR=$TARGET \
|
-DROOTDIR=/c/$TARGET -DTARGET="$TARGET""$EXTRA_THREADS" \
|
||||||
-DABI="$ABI" \
|
-DABI="$ABI" \
|
||||||
-DVERSION="$FULL_VERSION" \
|
-DVERSION="$VERSION""$EXTRA_THREADS" \
|
||||||
-DOPTIONS="$SRC_WIN\\misc\\options.ini" \
|
-DOPTIONS="$SRC_WIN\\misc\\options.ini" \
|
||||||
-DOUT_DIR=".." \
|
-DOUT_DIR=".." \
|
||||||
-NOCD $SRC/yap-6.3/misc/Yap.nsi
|
-NOCD $SRC/misc/Yap.nsi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
83
misc/mkwin.md
Normal file
83
misc/mkwin.md
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
|
||||||
|
AT the time of this writing (Nov 2014), YAP uses the mkwin script to
|
||||||
|
compile in WIN32. The script requires either a WIN32 environment, or a
|
||||||
|
cross-compiler/emulator package.
|
||||||
|
|
||||||
|
YAP has been known to compile under VISUAL C++, and should compile and
|
||||||
|
work under cygwin, but the favorite approach is to use a native
|
||||||
|
msys/mingw environment. This approach has two key advantages:
|
||||||
|
|
||||||
|
+ it does not need an interface layer and a DLL, like cygwin.
|
||||||
|
|
||||||
|
+ it enables cross-compilation.
|
||||||
|
|
||||||
|
YAP uses rge `mkwin` script to generate a new YAP installer. The script is
|
||||||
|
controlled by a set of of variables that should be defined early on in
|
||||||
|
the text. It executes by first calling `configure`, next running `make`, and
|
||||||
|
last (if all went well) executing `nsys`.
|
||||||
|
|
||||||
|
In more detail, the following mingw based environments have been
|
||||||
|
tested to develop YAP:
|
||||||
|
|
||||||
|
* MSYS 1 and mingw32/64: most WIN32 development did occur in this
|
||||||
|
native environment. Best results were achieved with
|
||||||
|
MSYS-1.0.* and TDM-GCC:
|
||||||
|
|
||||||
|
mingw: http://www.mingw.org/
|
||||||
|
original msys: http://www.mingw.org/wiki/MSYS
|
||||||
|
mingw64: http://mingw-w64.sourceforge.net/
|
||||||
|
TDM-GCC: http://tdm-gcc.tdragon.net/
|
||||||
|
|
||||||
|
* This distribution was compiled with the MSYS2 integrated
|
||||||
|
development, that supports 32 and 64 bit compilation. Setting up
|
||||||
|
MSYS2 should be done with care, but it is worth it as the
|
||||||
|
distribution works nicely in MINGW32 and MINGW64 mode. A third
|
||||||
|
compilation mode, MSYS mode, has problems with compiling sockets.
|
||||||
|
|
||||||
|
msys2: http://sourceforge.net/projects/msys2/
|
||||||
|
|
||||||
|
* cygwin and cygwin64 now can generate native applications
|
||||||
|
|
||||||
|
cygwin: https://www.cygwin.com/
|
||||||
|
|
||||||
|
* Linux has a nice cross-compilation environment, with some of the best
|
||||||
|
work done for Fedora.
|
||||||
|
|
||||||
|
fedora mingw cross-compiler: http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework
|
||||||
|
|
||||||
|
One problem is that this environment requires emulation of WIN32
|
||||||
|
executables to generate the initial saved state and to compile
|
||||||
|
`chr`. `wine` sometimes does the task, but it sometimes fails.
|
||||||
|
|
||||||
|
* OSX has the `mxe` package, a port of mingw that is in active
|
||||||
|
development.
|
||||||
|
|
||||||
|
mxe: http://mxe.cc/
|
||||||
|
|
||||||
|
Note that OSX has technical limitations that preclude porting
|
||||||
|
wine64. wine32 is distributed with package managers such as ports
|
||||||
|
and brew.
|
||||||
|
|
||||||
|
=== Setting up WIN32 compilation
|
||||||
|
|
||||||
|
Compiling WIN32 packages depends on a number of parameters: chosen compiler,
|
||||||
|
packages to install, directory setup. You may have to change these ones that
|
||||||
|
control the `mkwin` script:
|
||||||
|
|
||||||
|
* `VER`: major/minor number
|
||||||
|
* `PATCHID`: third digit
|
||||||
|
* `SRC`: directory containing yap sources, in the local environment notation.
|
||||||
|
* `SRC_WIN`: same, but in WIN32 standard notation.
|
||||||
|
* `THREADS`: yes or no? controllable from the command line.
|
||||||
|
* `ABI`: "32" or "64", controllable from the command line.
|
||||||
|
* `NSIS`: installer generator, usually "/c/Program Files (x86)/NSIS/makensis".
|
||||||
|
* `DOCS_DIR`: where you have the doxygen output.
|
||||||
|
* `GCC_DIR`: root of gcc seup.
|
||||||
|
* `HOST`: argument to `--host` configure command.
|
||||||
|
* `BUILD`: build directory
|
||||||
|
* `GMP`: multi-precision package; yes, no, or the installation directory; usually in the distribution.
|
||||||
|
* `CUDD`: BDD package, usually in the distribution.
|
||||||
|
* `JAVA`: Java sdk directory, usually in the distribution.
|
||||||
|
* `PYTHON`: Python package, usually in the distribution.
|
||||||
|
* `R`: R environment package, usually in the distribution.
|
||||||
|
* `GECODE`: constraint solver package, usually not in the WIN32 distribution.
|
33
misc/yap.nsi
33
misc/yap.nsi
@ -14,13 +14,13 @@ SetCompressor /FINAL bzip2
|
|||||||
|
|
||||||
; Preload files that are needed by the installer itself
|
; Preload files that are needed by the installer itself
|
||||||
ReserveFile "${NSISDIR}\Plugins\x86-unicode\UserInfo.dll"
|
ReserveFile "${NSISDIR}\Plugins\x86-unicode\UserInfo.dll"
|
||||||
ReserveFile "${NSISDIR}\Plugins\\x86-unicode\InstallOptions.dll"
|
ReserveFile "${NSISDIR}\Plugins\x86-unicode\InstallOptions.dll"
|
||||||
ReserveFile "${OPTIONS}"
|
ReserveFile "${OPTIONS}"
|
||||||
|
|
||||||
!ifdef WIN64
|
!ifdef WIN64
|
||||||
InstallDir "$PROGRAMFILES64\${ROOTDIR}"
|
InstallDir "$PROGRAMFILES64\${TARGET}"
|
||||||
!else
|
!else
|
||||||
InstallDir "$PROGRAMFILES\${ROOTDIR}"
|
InstallDir "$PROGRAMFILES\${TARGET}"
|
||||||
!endif
|
!endif
|
||||||
InstallDirRegKey HKLM ${REGKEY} "home"
|
InstallDirRegKey HKLM ${REGKEY} "home"
|
||||||
|
|
||||||
@ -71,21 +71,18 @@ Section "Base system (required)"
|
|||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File /r ${ROOTDIR}\share\Yap\*
|
File /r ${ROOTDIR}\share\Yap\*
|
||||||
|
|
||||||
|
SetOutPath $INSTDIR\share\PrologCommons
|
||||||
|
; SYSTEM STUFF
|
||||||
|
File /r ${ROOTDIR}\share\PrologCommons
|
||||||
|
|
||||||
SetOutPath $INSTDIR\share\doc\Yap
|
SetOutPath $INSTDIR\share\doc\Yap
|
||||||
File ${ROOTDIR}\share\doc\Yap\yap.html
|
File /r ${ROOTDIR}\share\doc\Yap\html\*
|
||||||
File ${ROOTDIR}\share\doc\Yap\yap.pdf
|
; File ${ROOTDIR}\share\doc\Yap\refman.pdf
|
||||||
; File ${ROOTDIR}\share\doc\Yap\yap.info
|
; File ${ROOTDIR}\share\doc\Yap\yap.info
|
||||||
File ${ROOTDIR}\share\doc\Yap\Artistic
|
File ${ROOTDIR}\share\doc\Yap\Artistic
|
||||||
File ${ROOTDIR}\share\doc\Yap\README.TXT
|
File ${ROOTDIR}\share\doc\Yap\README.TXT
|
||||||
File ${ROOTDIR}\share\doc\Yap\COPYING
|
File ${ROOTDIR}\share\doc\Yap\COPYING
|
||||||
|
|
||||||
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
|
||||||
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
|
||||||
WriteRegStr HKLM ${REGKEY} "dlls" "$INSTDIR\lib\Yap"
|
|
||||||
WriteRegStr HKLM ${REGKEY} "startup" "$INSTDIR\lib\Yap\startup.yss"
|
|
||||||
WriteRegStr HKLM ${REGKEY} "library" "$INSTDIR\share\Yap"
|
|
||||||
WriteRegStr HKLM ${REGKEY} "commons" "$INSTDIR\share\PrologCommons"
|
|
||||||
|
|
||||||
; Write uninstaller
|
; Write uninstaller
|
||||||
!ifdef WIN64
|
!ifdef WIN64
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64" "DisplayName" "YAP64 (remove only)"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64" "DisplayName" "YAP64 (remove only)"
|
||||||
@ -120,13 +117,13 @@ Section "Start Menu shortcuts"
|
|||||||
"$INSTDIR\share\doc\Yap\README.TXT" 0 \
|
"$INSTDIR\share\doc\Yap\README.TXT" 0 \
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
"SW_SHOWNORMAL" "" "View readme"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
||||||
"$INSTDIR\share\doc\Yap\yap.html" "" \
|
"$INSTDIR\share\doc\Yap\html\index.html" "" \
|
||||||
"$INSTDIR\share\doc\Yap\yap.html" 0 \
|
"$INSTDIR\share\doc\Yap\html\index.html" 0 \
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
|
||||||
"$INSTDIR\share\doc\Yap\yap.pdf" "" \
|
|
||||||
"$INSTDIR\share\doc\Yap\yap.pdf" 0 \
|
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
"SW_SHOWNORMAL" "" "View readme"
|
||||||
|
; CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
||||||
|
; "$INSTDIR\share\doc\Yap\refman.pdf" "" \
|
||||||
|
; "$INSTDIR\share\doc\Yap\refman.pdf" 0 \
|
||||||
|
; "SW_SHOWNORMAL" "" "View readme"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
||||||
"$INSTDIR\uninstall.exe" \
|
"$INSTDIR\uninstall.exe" \
|
||||||
"" \
|
"" \
|
||||||
|
@ -886,6 +886,13 @@ put_code(int c, IOSTREAM *s)
|
|||||||
unsigned char *q = (unsigned char *)&chr;
|
unsigned char *q = (unsigned char *)&chr;
|
||||||
unsigned char *e = &q[sizeof(pl_wchar_t)];
|
unsigned char *e = &q[sizeof(pl_wchar_t)];
|
||||||
|
|
||||||
|
#if __WINDOWS__
|
||||||
|
if (s == Soutput || s == Serror ) {
|
||||||
|
if (!(*s->functions->write)(s->handle, (char *)q, sizeof(wchar_t)))
|
||||||
|
return -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
while(q<e)
|
while(q<e)
|
||||||
{ if ( put_byte(*q++, s) < 0 )
|
{ if ( put_byte(*q++, s) < 0 )
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__MINGW32__)
|
#if defined(_WIN32) || defined(__MINGW32__) || defined(__MSYS__)
|
||||||
|
|
||||||
#define UNICODE 1
|
#define UNICODE 1
|
||||||
#define _UNICODE 1
|
#define _UNICODE 1
|
||||||
|
@ -252,7 +252,7 @@ You can also use the CUDD interface package in YAP. You will need to
|
|||||||
|
|
||||||
2. If a Mac user, there is a ports package.
|
2. If a Mac user, there is a ports package.
|
||||||
|
|
||||||
3 Otherwise, you can obtain the version at . This version compiles under WIN32.
|
3. Otherwise, you can obtain the version at . This version compiles under WIN32.
|
||||||
|
|
||||||
Last, when you configure YAP you need to add the options --with-cidd --enable-bddlib. Binary distributed versions already have the interface.
|
Last, when you configure YAP you need to add the options --with-cidd --enable-bddlib. Binary distributed versions already have the interface.
|
||||||
|
|
||||||
@ -291,8 +291,10 @@ Instead of probabilities every fact has a t( ) prefix. The t stands for tunable
|
|||||||
~~~~
|
~~~~
|
||||||
t(0.5)::heads(_).
|
t(0.5)::heads(_).
|
||||||
~~~~
|
~~~~
|
||||||
|
*/
|
||||||
|
|
||||||
### ProbLog Predicates
|
/** @defgroup ProbLogPredicates ProbLog Predicates
|
||||||
|
@ingroup ProbLog1
|
||||||
|
|
||||||
This chapter describes the predicates defined by ProbLog for evaluating the probability of queries.
|
This chapter describes the predicates defined by ProbLog for evaluating the probability of queries.
|
||||||
|
|
||||||
@ -347,8 +349,12 @@ This predicate returns the lower and upper bound of the probability of achieving
|
|||||||
This predicate returns the lower bound of the probability of achieving the goal G obtained by cutting the sld tree at the given probability for each branch.
|
This predicate returns the lower bound of the probability of achieving the goal G obtained by cutting the sld tree at the given probability for each branch.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
### ProbLog Parameter Learning Predicates
|
@defgroup ProbLogParameterLearning ProbLog Parameter Learning Predicates
|
||||||
|
@ingroup ProbLog1
|
||||||
|
@{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -371,7 +377,7 @@ Test examples are ignored during learning but are used afterwards to check the p
|
|||||||
* @pred do_learning(+N).
|
* @pred do_learning(+N).
|
||||||
*
|
*
|
||||||
Starts the learning algorithm with N iterations.
|
Starts the learning algorithm with N iterations.
|
||||||
paragraph{}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -381,7 +387,15 @@ The output is created in the output subfolder of the current folder where YAP wa
|
|||||||
|
|
||||||
Starts the learning algorithm. The learning will stop after N iterations or if the difference of the Mean Squared Error (MSE) between two iterations gets smaller than Epsilon - depending on what happens first.
|
Starts the learning algorithm. The learning will stop after N iterations or if the difference of the Mean Squared Error (MSE) between two iterations gets smaller than Epsilon - depending on what happens first.
|
||||||
|
|
||||||
### Miscelaneous
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
|
|
||||||
|
/** @defgroup ProbLogMiscellaneous ProbLog Miscellaneous Predicates
|
||||||
|
@ingroup ProbLog1
|
||||||
|
@{
|
||||||
|
|
||||||
|
|
||||||
Both the learning and the inference module have various parameters, or flags, that can be adjusted by the user.
|
Both the learning and the inference module have various parameters, or flags, that can be adjusted by the user.
|
||||||
The following predicates are defined by ProbLog to access and set these flags.
|
The following predicates are defined by ProbLog to access and set these flags.
|
||||||
@ -395,11 +409,9 @@ This predicate lists all the flags name, value, domain and description.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/** @pred problog_flag(+Name, -Value)
|
||||||
* @pred problog_flag(+Name, -Value)
|
|
||||||
*
|
|
||||||
This predicate gives the value of the flag with the specified name. The supported flags are:
|
|
||||||
|
|
||||||
|
This predicate gives the value of the flag with the specified name. The supported flags are:
|
||||||
|
|
||||||
+ use_db_trie
|
+ use_db_trie
|
||||||
|
|
||||||
@ -461,7 +473,7 @@ The possible values for this flag are true or false.
|
|||||||
Flag that sets the representation of the ancestor list.
|
Flag that sets the representation of the ancestor list.
|
||||||
The possible values for this flag are list or integer
|
The possible values for this flag are list or integer
|
||||||
|
|
||||||
+ max\cccccccccccc_depth
|
+ max_depth
|
||||||
|
|
||||||
Sets the maximum proof depth.
|
Sets the maximum proof depth.
|
||||||
The possible values for this flag are any integer.
|
The possible values for this flag are any integer.
|
||||||
@ -478,8 +490,7 @@ The possible values for this flag are any integer greater than zero.
|
|||||||
|
|
||||||
+ min_mc_samples
|
+ min_mc_samples
|
||||||
|
|
||||||
Flag related to Monte Carlo Sampling that sets the minimum number of samples before convergence.
|
Flag related to Monte Carlo Sampling that sets the minimum number of samples before convergence. The possible values for this flag are any integer greater than or equal to zero.
|
||||||
The possible values for this flag are any integer greater than or equal to zero.
|
|
||||||
|
|
||||||
+ max_mc_samples
|
+ max_mc_samples
|
||||||
|
|
||||||
@ -591,6 +602,8 @@ The possible values for this flag are true or false.
|
|||||||
Flag telling the location of the output files directory.
|
Flag telling the location of the output files directory.
|
||||||
The possible values for this flag are any valid directory name.
|
The possible values for this flag are any valid directory name.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
/** @pred set_problog_flag(+Name, +Value)
|
/** @pred set_problog_flag(+Name, +Value)
|
||||||
|
|
||||||
the predicate sets the value of the given flag. The supported flags are the ones listed in above
|
the predicate sets the value of the given flag. The supported flags are the ones listed in above
|
||||||
@ -601,7 +614,7 @@ the predicate sets the value of the given flag. The supported flags are the ones
|
|||||||
the predicate sets the value of the given flag. The supported flags are the ones listed in above
|
the predicate sets the value of the given flag. The supported flags are the ones listed in above
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @pred learning_flag(+Name, -Value)}
|
/** @pred learning_flag(+Name, -Value)
|
||||||
|
|
||||||
This predicate gives the value of the learning flag with the specified name. The supported flags are:
|
This predicate gives the value of the learning flag with the specified name. The supported flags are:
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ elif test -d "$cudd_dir/lib"; then
|
|||||||
LIBS="$LIBS -L $cudd_dir/lib"
|
LIBS="$LIBS -L $cudd_dir/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$target_os" = "mingw32" -o "$target_os" = "mingw64"
|
if test "$target_os" = "mingw32" -o "$target_os" = "mingw64" -o "$target_os" = "msys"
|
||||||
then
|
then
|
||||||
#mingw: we know where things are
|
#mingw: we know where things are
|
||||||
CUDD_LIBS="$cudd_dir/lib/all_cudd.dll"
|
CUDD_LIBS="$cudd_dir/lib/all_cudd.dll"
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 630f75cd5e97459f2c4ad51d6887a328574df923
|
Subproject commit ad55aa0e2ab8362c144184270889f07a4b4fc75a
|
@ -201,3 +201,4 @@ test%:
|
|||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
|
|
||||||
|
@ -52,3 +52,6 @@ clean:
|
|||||||
|
|
||||||
install: default
|
install: default
|
||||||
$(INSTALL_PROGRAM) LPADBDD $(DESTDIR)
|
$(INSTALL_PROGRAM) LPADBDD $(DESTDIR)
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f Makefile
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 373c30a0e81c72a1fa3cb28b971f075aae28b443
|
Subproject commit f98511b9c0f6113a04512abad346b2ee0c399478
|
@ -146,10 +146,11 @@ statistics from the MYDDAS system;
|
|||||||
This option is only available in MySQL. It enables the option to interact with the MySQL server in
|
This option is only available in MySQL. It enables the option to interact with the MySQL server in
|
||||||
two different ways. As if we were on the MySQL Client Shell, and as if
|
two different ways. As if we were on the MySQL Client Shell, and as if
|
||||||
we were using Datalog.
|
we were using Datalog.
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
/** @defgroup MYDDAS_Architecture MYDDAS Architecture
|
/** @defgroup MYDDAS_Architecture MYDDAS Architecture
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
@ -202,15 +203,18 @@ FROM 'phonebook' A
|
|||||||
WHERE A.Name = 'John Doe';
|
WHERE A.Name = 'John Doe';
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup View_Level_Interface View Level Interface
|
/** @defgroup View_Level_Interface View Level Interface
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
@pred db view(+,+,+).
|
@pred db view(+,+,+).
|
||||||
|
|
||||||
|
|
||||||
@ -302,16 +306,17 @@ FROM Edge A WHERE A.attr1 = 10;
|
|||||||
To know how to use db `view/3`, please refer to Draxler's Prolog to
|
To know how to use db `view/3`, please refer to Draxler's Prolog to
|
||||||
SQL Compiler Manual.
|
SQL Compiler Manual.
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
/** @defgroup Accessing_Tables_in_Data_Sources_Using_SQL Accessing Tables in Data Sources Using SQL
|
/** @defgroup Accessing_Tables_in_Data_Sources_Using_SQL Accessing Tables in Data Sources Using SQL
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
@pred db_sql(+,+,?).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_sql(+,+,?).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -336,12 +341,17 @@ Example:
|
|||||||
LA = ['D','John Doe',123456789] ?
|
LA = ['D','John Doe',123456789] ?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@section Insertion_of_Rows Insertion of Rows
|
*/
|
||||||
|
|
||||||
@pred db_assert(+,+).
|
%% @}
|
||||||
|
|
||||||
|
/** @defgroup Insertion_of_Rows Insertion of Rows
|
||||||
|
@ingroup MYDDAS
|
||||||
|
@{
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @pred db_assert(+,+).
|
||||||
@pred db_assert(+).
|
@pred db_assert(+).
|
||||||
|
|
||||||
|
|
||||||
@ -385,10 +395,9 @@ yes
|
|||||||
Would insert the row: `A,null value,31` into the relation
|
Would insert the row: `A,null value,31` into the relation
|
||||||
`Hello World`, assuming that the second row allows null values.
|
`Hello World`, assuming that the second row allows null values.
|
||||||
|
|
||||||
@pred db insert(+,+,+).
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @pred db insert(+,+,+).
|
||||||
@pred db insert(+,+).
|
@pred db insert(+,+).
|
||||||
|
|
||||||
|
|
||||||
@ -412,15 +421,17 @@ yes
|
|||||||
yes
|
yes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
/** @defgroup Types_of_Attributes Types of AttributesL
|
/** @defgroup Types_of_Attributes Types of AttributesL
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
@pred db_get_attributes_types(+,+,?).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_get_attributes_types(+,+,?).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -448,20 +459,18 @@ yes
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
where <tt>Hello World</tt> is the name of the relation and <tt>myddas</tt> is the
|
where <tt>Hello World</tt> is the name of the relation and <tt>myddas</tt> is the
|
||||||
connection identifier.
|
connection identifier.
|
||||||
|
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup Number_of_Fields Number of Fields
|
/** @defgroup Number_of_Fields Number of Fields
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
@pred db_number_of_fields(+,?).
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @pred db_number_of_fields(+,?).
|
||||||
@pred db_number_of_fields(+,+,?).
|
@pred db_number_of_fields(+,+,?).
|
||||||
|
|
||||||
|
|
||||||
@ -486,18 +495,18 @@ where `Hello World` is the name of the
|
|||||||
relation and `myddas` is the connection identifier.
|
relation and `myddas` is the connection identifier.
|
||||||
|
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup Describing_a_Relation Describing a Relation
|
/** @defgroup Describing_a_Relation Describing a Relation
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
@pred db_datalog_describe(+,+).
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @pred db_datalog_describe(+,+).
|
||||||
@pred db_datalog_describe(+).
|
@pred db_datalog_describe(+).
|
||||||
|
|
||||||
|
|
||||||
@ -518,7 +527,9 @@ command, the same way as `DESCRIBE` in the MySQL prompt would.
|
|||||||
yes
|
yes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@pred db_describe(+,+).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_describe(+,+).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -538,15 +549,17 @@ no
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
%% @}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup Enumerating_Relations Enumeration Relations Describing_a_Relation Describing a Relation
|
/** @defgroup Enumerating_Relations Enumeration Relations Describing_a_Relation Describing a Relation
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
@pred db_datalog_show_tables(+).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_datalog_show_tables(+).
|
||||||
@pred db_datalog_show_tables
|
@pred db_datalog_show_tables
|
||||||
|
|
||||||
|
|
||||||
@ -565,7 +578,9 @@ it does not returns any value, but instead prints to the screen the result of th
|
|||||||
yes
|
yes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@pred db_show_tables(+, ?).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_show_tables(+, ?).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -584,19 +599,19 @@ Table = table('Hello World') ? ;
|
|||||||
no
|
no
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%%@}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup The_MYDDAS_MySQL_Top_Level The MYDDAS MySQL Top Level
|
/** @defgroup The_MYDDAS_MySQL_Top_Level The MYDDAS MySQL Top Level
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
@pred db_top_level(+,+,+,+,+).
|
@pred db_top_level(+,+,+,+,+).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pred db_top_level(+,+,+,+).
|
@pred db_top_level(+,+,+,+).
|
||||||
|
|
||||||
|
|
||||||
@ -644,18 +659,19 @@ Bye
|
|||||||
yes
|
yes
|
||||||
?-
|
?-
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@}
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%%@}
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup Other_MYDDAS_Properties Other MYDDAS Properties
|
/** @defgroup Other_MYDDAS_Properties Other MYDDAS Properties
|
||||||
@ingroup MYDDAS
|
@ingroup MYDDAS
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
@pred db_verbose(+).
|
@pred db_verbose(+).
|
||||||
@pred db_top_level(+,+,+,+).
|
|
||||||
|
|
||||||
|
|
||||||
When we ask a question to YAP, using a predicate asserted by
|
When we ask a question to YAP, using a predicate asserted by
|
||||||
@ -670,8 +686,16 @@ yes
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
If we want to
|
If we want to
|
||||||
disable this feature, we must call the `db_verbose/1` predicate with the value 0.
|
disable this feature, we must call the `db_verbose/1` predicate with the value 0.
|
||||||
|
\
|
||||||
|
*/
|
||||||
|
|
||||||
@pred db_module(?).
|
/**
|
||||||
|
@pred db_top_level(+,+,+,+).
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @pred db_module(?).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -707,11 +731,9 @@ yes
|
|||||||
?-
|
?-
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@pred db_my_result_set(?).
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @pred db_my_result_set(?).
|
||||||
|
|
||||||
The MySQL C API permits two modes for transferring the data generated by
|
The MySQL C API permits two modes for transferring the data generated by
|
||||||
a query to the client, in our case YAP. The first mode, and the default
|
a query to the client, in our case YAP. The first mode, and the default
|
||||||
@ -736,7 +758,9 @@ After this command, all
|
|||||||
of the database predicates will use use result by default. We can change
|
of the database predicates will use use result by default. We can change
|
||||||
this by doing again `db_my_result_set(store_result)`.
|
this by doing again `db_my_result_set(store_result)`.
|
||||||
|
|
||||||
@pred db_my_sql_mode(+Conn,?SQL_Mode).
|
*/
|
||||||
|
|
||||||
|
/** @pred db_my_sql_mode(+Conn,?SQL_Mode).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -758,6 +782,8 @@ You can see the available SQL Modes at the MySQL homepage at
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%% @}
|
||||||
|
|
||||||
#ifdef MYDDAS_TOP_LEVEL
|
#ifdef MYDDAS_TOP_LEVEL
|
||||||
:- use_module(myddas_top_level,[
|
:- use_module(myddas_top_level,[
|
||||||
db_top_level/4,
|
db_top_level/4,
|
||||||
|
@ -36,7 +36,7 @@ elif test -e "$srcdir"/packages/python/Makefile.in ; then
|
|||||||
if test -d "$PYTHONHOME/libs"; then
|
if test -d "$PYTHONHOME/libs"; then
|
||||||
#mingw
|
#mingw
|
||||||
PYTHON_DIR="$PYTHONHOME"
|
PYTHON_DIR="$PYTHONHOME"
|
||||||
PYTHON_DLL=`echo "$PYTHON_DIR"/python*.dll`
|
PYTHON_DLL=`echo "$PYTHON_DIR"/DLLs/python*.dll`
|
||||||
PYTHON_LIBS="\"$PYTHON_DLL\""
|
PYTHON_LIBS="\"$PYTHON_DLL\""
|
||||||
PYTHON_INCLUDES="-I \"$PYTHON_DIR\"/include"
|
PYTHON_INCLUDES="-I \"$PYTHON_DIR\"/include"
|
||||||
elif test -d "$PYTHONHOME/lib"; then
|
elif test -d "$PYTHONHOME/lib"; then
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e535195eee93bf37b99f35f8942e8e403a99e7d1
|
Subproject commit e09cbb2a2980176e12c7ae6dbdcf87f8aa4ed67d
|
16
pl/absf.yap
16
pl/absf.yap
@ -538,21 +538,33 @@ remove_from_path(New) :- '$check_path'(New,Path),
|
|||||||
`library( _File_ )` are searched by the predicates consult/1,
|
`library( _File_ )` are searched by the predicates consult/1,
|
||||||
reconsult/1, use_module/1, ensure_loaded/1, and load_files/2.
|
reconsult/1, use_module/1, ensure_loaded/1, and load_files/2.
|
||||||
|
|
||||||
|
This directory is initialized through the system predicate
|
||||||
|
library_directories/2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:- multifile user:library_directory/1.
|
:- multifile user:library_directory/1.
|
||||||
|
|
||||||
:- dynamic user:library_directory/1.
|
:- dynamic user:library_directory/1.
|
||||||
|
|
||||||
/**
|
user:library_directory( Path ):-
|
||||||
@pred user:commons_directory(?Directory:atom) is nondet, dynamic
|
library_directories( Path, _ ).
|
||||||
|
|
||||||
|
/**
|
||||||
|
@pred user:commons_directory(? _Directory_:atom) is nondet, dynamic
|
||||||
|
|
||||||
|
State the location of the Commons Prolog Initiative.
|
||||||
|
|
||||||
|
This directory is initialized through the system predicate
|
||||||
|
library_directories/2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:- multifile user:commons_directory/1.
|
:- multifile user:commons_directory/1.
|
||||||
|
|
||||||
:- dynamic user:commons_directory/1.
|
:- dynamic user:commons_directory/1.
|
||||||
|
|
||||||
|
user:commons_directory( Path ):-
|
||||||
|
library_directories( _, Path ).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@pred user:prolog_file_type(?Suffix:atom, ?Handler:atom) is nondet, dynamic
|
@pred user:prolog_file_type(?Suffix:atom, ?Handler:atom) is nondet, dynamic
|
||||||
|
|
||||||
|
71
pl/boot.yap
71
pl/boot.yap
@ -24,25 +24,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/** @pred :_P_ , :_Q_ is iso
|
|
||||||
|
|
||||||
|
|
||||||
Conjunction of goals (and).
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
p(X) :- q(X), r(X).
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
should be read as "p( _X_) if q( _X_) and r( _X_)".
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @pred :_P_ ; :_Q_ is iso
|
/** @pred :_P_ ; :_Q_ is iso
|
||||||
|
|
||||||
|
|
||||||
Disjunction of goals (or).
|
Disjunction of goals (or).
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -56,7 +39,7 @@ should be read as "p( _X_) if q( _X_) or r( _X_)".
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** @pred \+ :_P_ is iso
|
/** @pred \+ :_P_ is iso
|
||||||
|
Negation by failure.
|
||||||
|
|
||||||
Goal _P_ is not provable. The execution of this predicate fails if
|
Goal _P_ is not provable. The execution of this predicate fails if
|
||||||
and only if the goal _P_ finitely succeeds. It is not a true logical
|
and only if the goal _P_ finitely succeeds. It is not a true logical
|
||||||
@ -65,12 +48,19 @@ negation, which is impossible in standard Prolog, but
|
|||||||
|
|
||||||
This predicate might be defined as:
|
This predicate might be defined as:
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
\+(P) :- P, !, fail.
|
\+(P) :- P, !, fail.
|
||||||
\+(_).
|
\+(_).
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
if _P_ did not include "cuts".
|
if _P_ did not include "cuts".
|
||||||
|
|
||||||
|
If _P_ includes cuts, the cuts are defined to be scoped by _P_: they canno cut over the calling prredicate.
|
||||||
|
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
go(P).
|
||||||
|
:- \+ P, !, fail.
|
||||||
|
\+(_).
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -89,7 +79,7 @@ versions of YAP. Uses of not/1 should be replaced by
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @pred :_P_ -> :_Q_ is iso
|
/** @pred :_Condition__ -> :_Action_ is iso
|
||||||
|
|
||||||
|
|
||||||
Read as "if-then-else" or "commit". This operator is similar to the
|
Read as "if-then-else" or "commit". This operator is similar to the
|
||||||
@ -137,13 +127,18 @@ arguments.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @pred :_Condition_ *-> :_Action_
|
/** @pred :_Condition_ *-> :_Action_ is iso
|
||||||
|
|
||||||
This construct implements the so-called <em>soft-cut</em>. The control is
|
This construct implements the so-called <em>soft-cut</em>. The control is
|
||||||
defined as follows: If _Condition_ succeeds at least once, the
|
defined as follows:
|
||||||
semantics is the same as ( _Condition_, _Action_). If
|
+ If _Condition_ succeeds at least once, the
|
||||||
|
semantics is the same as ( _Condition_, _Action_).
|
||||||
|
|
||||||
|
+ If
|
||||||
_Condition_ does not succeed, the semantics is that of (\\+
|
_Condition_ does not succeed, the semantics is that of (\\+
|
||||||
_Condition_, _Else_). In other words, If _Condition_
|
_Condition_, _Else_).
|
||||||
|
|
||||||
|
In other words, if _Condition_
|
||||||
succeeds at least once, simply behave as the conjunction of
|
succeeds at least once, simply behave as the conjunction of
|
||||||
_Condition_ and _Action_, otherwise execute _Else_.
|
_Condition_ and _Action_, otherwise execute _Else_.
|
||||||
|
|
||||||
@ -219,11 +214,7 @@ private(_).
|
|||||||
%
|
%
|
||||||
% boootstrap predicates.
|
% boootstrap predicates.
|
||||||
%
|
%
|
||||||
:- system_module( '$_boot', [(*->)/2,
|
:- system_module( '$_boot', [
|
||||||
(',')/2,
|
|
||||||
(->)/2,
|
|
||||||
(;)/2,
|
|
||||||
(\+)/1,
|
|
||||||
bootstrap/1,
|
bootstrap/1,
|
||||||
call/1,
|
call/1,
|
||||||
catch/3,
|
catch/3,
|
||||||
@ -234,8 +225,7 @@ private(_).
|
|||||||
(not)/1,
|
(not)/1,
|
||||||
repeat/0,
|
repeat/0,
|
||||||
throw/1,
|
throw/1,
|
||||||
true/0,
|
true/0], ['$$compile'/4,
|
||||||
('|')/2], ['$$compile'/4,
|
|
||||||
'$call'/4,
|
'$call'/4,
|
||||||
'$catch'/3,
|
'$catch'/3,
|
||||||
'$check_callable'/2,
|
'$check_callable'/2,
|
||||||
@ -299,8 +289,9 @@ private(_).
|
|||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
/** @pred true is iso
|
|
||||||
|
|
||||||
|
/** @pred true is iso
|
||||||
|
Succeed.
|
||||||
|
|
||||||
Succeeds once.
|
Succeeds once.
|
||||||
|
|
||||||
@ -1137,6 +1128,19 @@ incore(G) :- '$execute'(G).
|
|||||||
'$stop_creeping'.
|
'$stop_creeping'.
|
||||||
|
|
||||||
|
|
||||||
|
/** @pred :_P_ , :_Q_ is iso, meta
|
||||||
|
Conjunction of goals (and).
|
||||||
|
|
||||||
|
The conjunction is a fundamental construct of Prolog. Example:
|
||||||
|
|
||||||
|
~~~~~~~
|
||||||
|
p(X) :- q(X), r(X).
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
should be read as `p( _X_) if q( _X_) and r( _X_).
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
','(X,Y) :-
|
','(X,Y) :-
|
||||||
yap_hacks:env_choice_point(CP),
|
yap_hacks:env_choice_point(CP),
|
||||||
'$current_module'(M),
|
'$current_module'(M),
|
||||||
@ -1576,4 +1580,3 @@ log_event( String, Args ) :-
|
|||||||
/**
|
/**
|
||||||
@}
|
@}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1506,6 +1506,17 @@ import_module(Mod, ImportModule) :-
|
|||||||
import_module(Mod, EM) :-
|
import_module(Mod, EM) :-
|
||||||
'$do_error'(type_error(atom,Mod),import_module(Mod, EM)).
|
'$do_error'(type_error(atom,Mod),import_module(Mod, EM)).
|
||||||
|
|
||||||
|
|
||||||
|
/** add_import_module( + _Module_, + _ImportModule_ , +_Pos_) is det
|
||||||
|
Add all exports in _ImportModule_ as available to _Module_.
|
||||||
|
|
||||||
|
|
||||||
|
All exported predicates from _ExportModule_ are made available to the
|
||||||
|
source module _ImportModule_. If _Position_ is bound to `start` the
|
||||||
|
module _ImportModule_ is tried first, if _Position_ is bound to `end`,
|
||||||
|
the module is consulted last.
|
||||||
|
|
||||||
|
*/
|
||||||
add_import_module(Mod, ImportModule, Pos) :-
|
add_import_module(Mod, ImportModule, Pos) :-
|
||||||
var(Mod),
|
var(Mod),
|
||||||
'$do_error'(instantiation_error,add_import_module(Mod, ImportModule, Pos)).
|
'$do_error'(instantiation_error,add_import_module(Mod, ImportModule, Pos)).
|
||||||
@ -1526,6 +1537,14 @@ add_import_module(Mod, ImportModule, Pos) :-
|
|||||||
add_import_module(Mod, ImportModule, Pos) :-
|
add_import_module(Mod, ImportModule, Pos) :-
|
||||||
'$do_error'(domain_error(start_end,Pos),add_import_module(Mod, ImportModule, Pos)).
|
'$do_error'(domain_error(start_end,Pos),add_import_module(Mod, ImportModule, Pos)).
|
||||||
|
|
||||||
|
/** delete_import_module( + _ExportModule_, + _ImportModule_ ) is det
|
||||||
|
Exports in _ImportModule_ are no longer available to _Module_.
|
||||||
|
|
||||||
|
|
||||||
|
All exported predicates from _ExportModule_ are discarded from the
|
||||||
|
ones used vy the source module _ImportModule_.
|
||||||
|
|
||||||
|
*/
|
||||||
delete_import_module(Mod, ImportModule) :-
|
delete_import_module(Mod, ImportModule) :-
|
||||||
var(Mod),
|
var(Mod),
|
||||||
'$do_error'(instantiation_error,delete_import_module(Mod, ImportModule)).
|
'$do_error'(instantiation_error,delete_import_module(Mod, ImportModule)).
|
||||||
@ -1548,6 +1567,21 @@ delete_import_module(Mod, ImportModule) :-
|
|||||||
'$set_source_module'(Source0, SourceF) :-
|
'$set_source_module'(Source0, SourceF) :-
|
||||||
current_module(Source0, SourceF).
|
current_module(Source0, SourceF).
|
||||||
|
|
||||||
|
/** module_property( + _Module_, ? _Property_ ) is nondet
|
||||||
|
Enumerate non-deterministically the main properties of _Module_ .
|
||||||
|
|
||||||
|
Reports the following properties of _Module_:
|
||||||
|
|
||||||
|
+ `class`( ?_Class_ ): whether it is a `system`, `library`, or `user` module.
|
||||||
|
|
||||||
|
+ `line_count`(?_Ls_): number of lines in source file.
|
||||||
|
|
||||||
|
+ `file`(?_F_): source file for _Module_.
|
||||||
|
|
||||||
|
+ `exports`(-Es): list of all predicate symbols and
|
||||||
|
operator symbols exported or re-exported by this module.
|
||||||
|
|
||||||
|
*/
|
||||||
module_property(Mod, class(L)) :-
|
module_property(Mod, class(L)) :-
|
||||||
'$module_class'(Mod, L).
|
'$module_class'(Mod, L).
|
||||||
module_property(Mod, line_count(L)) :-
|
module_property(Mod, line_count(L)) :-
|
||||||
|
Reference in New Issue
Block a user