enable path expansion by default
This commit is contained in:
parent
d5ce9a1376
commit
0ed3ee4fc4
@ -1010,9 +1010,6 @@ p_unary_is( USES_REGS1 )
|
|||||||
}
|
}
|
||||||
out= eval1(p->FOfEE, top PASS_REGS);
|
out= eval1(p->FOfEE, top PASS_REGS);
|
||||||
if ((err=Yap_FoundArithError())) {
|
if ((err=Yap_FoundArithError())) {
|
||||||
Functor f = Yap_MkFunctor( name, 1 );
|
|
||||||
Term t = Yap_MkApplTerm( f, 1, &top );
|
|
||||||
Yap_EvalError(err, t ,"error in %s/1", RepAtom(name)->StrOfAE);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return Yap_unify_constant(ARG1,out);
|
return Yap_unify_constant(ARG1,out);
|
||||||
|
2930
C/sysbits.c
2930
C/sysbits.c
File diff suppressed because it is too large
Load Diff
@ -935,6 +935,9 @@ you don't. */
|
|||||||
#cmakedefine HAVE_OPENDIR ${HAVE_OPENDIR}
|
#cmakedefine HAVE_OPENDIR ${HAVE_OPENDIR}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/ripemd.h> header file. */
|
||||||
|
#cmakedefine HAVE_OPENSSL_RIPEMD_H ${HAVE_OPENSSL_RIPEMD_H}
|
||||||
|
|
||||||
/* Define to 1 if you have the `pipe2' function. */
|
/* Define to 1 if you have the `pipe2' function. */
|
||||||
#ifndef HAVE_PIPE2
|
#ifndef HAVE_PIPE2
|
||||||
#cmakedefine HAVE_PIPE2 ${HAVE_PIPE2}
|
#cmakedefine HAVE_PIPE2 ${HAVE_PIPE2}
|
||||||
|
21
config.h.in
21
config.h.in
@ -159,6 +159,21 @@
|
|||||||
/* Define to 1 if you have the <ctype.h> header file. */
|
/* Define to 1 if you have the <ctype.h> header file. */
|
||||||
#undef HAVE_CTYPE_H
|
#undef HAVE_CTYPE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <cuddInt.h> header file. */
|
||||||
|
#undef HAVE_CUDDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <cudd/cuddInt.h> header file. */
|
||||||
|
#undef HAVE_CUDD_CUDDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <cudd/cudd.h> header file. */
|
||||||
|
#undef HAVE_CUDD_CUDD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <cudd.h> header file. */
|
||||||
|
#undef HAVE_CUDD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <cudd/util.h> header file. */
|
||||||
|
#undef HAVE_CUDD_UTIL_H
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if
|
/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if
|
||||||
you don't. */
|
you don't. */
|
||||||
#undef HAVE_DECL_RL_CATCH_SIGNALS_
|
#undef HAVE_DECL_RL_CATCH_SIGNALS_
|
||||||
@ -535,6 +550,9 @@
|
|||||||
/* Define to 1 if you have the `opendir' function. */
|
/* Define to 1 if you have the `opendir' function. */
|
||||||
#undef HAVE_OPENDIR
|
#undef HAVE_OPENDIR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <openssl/ripemd.h> header file. */
|
||||||
|
#undef HAVE_OPENSSL_RIPEMD_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `pipe2' function. */
|
/* Define to 1 if you have the `pipe2' function. */
|
||||||
#undef HAVE_PIPE2
|
#undef HAVE_PIPE2
|
||||||
|
|
||||||
@ -881,6 +899,9 @@
|
|||||||
/* Define to 1 if you have the `usleep' function. */
|
/* Define to 1 if you have the `usleep' function. */
|
||||||
#undef HAVE_USLEEP
|
#undef HAVE_USLEEP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <util.h> header file. */
|
||||||
|
#undef HAVE_UTIL_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `utime' function. */
|
/* Define to 1 if you have the `utime' function. */
|
||||||
#undef HAVE_UTIME
|
#undef HAVE_UTIME
|
||||||
|
|
||||||
|
15
configure
vendored
15
configure
vendored
@ -8377,7 +8377,7 @@ fi
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for ac_header in netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h shlobj.h
|
for ac_header in netdb.h netinet/in.h netinet/tcp.h openssl/ripemd.h pwd.h regex.h shlobj.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
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"
|
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||||
@ -13451,6 +13451,8 @@ mkdir -p packages/bdd
|
|||||||
if test "$PKG_BDDLIB" != ""; then
|
if test "$PKG_BDDLIB" != ""; then
|
||||||
ac_config_files="$ac_config_files packages/bdd/Makefile"
|
ac_config_files="$ac_config_files packages/bdd/Makefile"
|
||||||
|
|
||||||
|
ac_config_files="$ac_config_files packages/bdd/cudd_config.h"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files packages/ProbLog/simplecudd/Makefile"
|
ac_config_files="$ac_config_files packages/ProbLog/simplecudd/Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files packages/ProbLog/simplecudd_lfi/Makefile"
|
ac_config_files="$ac_config_files packages/ProbLog/simplecudd_lfi/Makefile"
|
||||||
@ -14132,7 +14134,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 14135 "configure" */
|
/* #line 14137 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -14308,7 +14310,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: 14311: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
echo "configure: 14313: 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
|
||||||
@ -14439,7 +14441,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 14442 "configure" */
|
/* #line 14444 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -14474,7 +14476,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 14477 "configure" */
|
/* [#]line 14479 "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);
|
||||||
@ -16039,6 +16041,7 @@ do
|
|||||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||||
"YapTermConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS YapTermConfig.h" ;;
|
"YapTermConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS YapTermConfig.h" ;;
|
||||||
"packages/bdd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/bdd/Makefile" ;;
|
"packages/bdd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/bdd/Makefile" ;;
|
||||||
|
"packages/bdd/cudd_config.h") CONFIG_FILES="$CONFIG_FILES packages/bdd/cudd_config.h" ;;
|
||||||
"packages/ProbLog/simplecudd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd/Makefile" ;;
|
"packages/ProbLog/simplecudd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd/Makefile" ;;
|
||||||
"packages/ProbLog/simplecudd_lfi/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd_lfi/Makefile" ;;
|
"packages/ProbLog/simplecudd_lfi/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd_lfi/Makefile" ;;
|
||||||
"packages/cplint/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cplint/Makefile" ;;
|
"packages/cplint/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cplint/Makefile" ;;
|
||||||
@ -17623,6 +17626,7 @@ mkdir -p packages/prism/src/c/up
|
|||||||
mkdir -p packages/prism/src/prolog
|
mkdir -p packages/prism/src/prolog
|
||||||
mkdir -p packages/ProbLog
|
mkdir -p packages/ProbLog
|
||||||
mkdir -p packages/ProbLog/simplecudd
|
mkdir -p packages/ProbLog/simplecudd
|
||||||
|
mkdir -p packages/ProbLog/simplecudd_lfi
|
||||||
mkdir -p packages/R
|
mkdir -p packages/R
|
||||||
mkdir -p packages/RDF
|
mkdir -p packages/RDF
|
||||||
mkdir -p packages/real
|
mkdir -p packages/real
|
||||||
@ -18478,6 +18482,7 @@ do
|
|||||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||||
"YapTermConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS YapTermConfig.h" ;;
|
"YapTermConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS YapTermConfig.h" ;;
|
||||||
"packages/bdd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/bdd/Makefile" ;;
|
"packages/bdd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/bdd/Makefile" ;;
|
||||||
|
"packages/bdd/cudd_config.h") CONFIG_FILES="$CONFIG_FILES packages/bdd/cudd_config.h" ;;
|
||||||
"packages/ProbLog/simplecudd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd/Makefile" ;;
|
"packages/ProbLog/simplecudd/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd/Makefile" ;;
|
||||||
"packages/ProbLog/simplecudd_lfi/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd_lfi/Makefile" ;;
|
"packages/ProbLog/simplecudd_lfi/Makefile") CONFIG_FILES="$CONFIG_FILES packages/ProbLog/simplecudd_lfi/Makefile" ;;
|
||||||
"packages/cplint/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cplint/Makefile" ;;
|
"packages/cplint/Makefile") CONFIG_FILES="$CONFIG_FILES packages/cplint/Makefile" ;;
|
||||||
|
@ -1325,7 +1325,7 @@ AC_CHECK_HEADERS(errno.h execinfo.h fcntl.h fenv.h)
|
|||||||
AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h inttypes.h io.h)
|
AC_CHECK_HEADERS(float.h fpu_control.h ieeefp.h inttypes.h io.h)
|
||||||
AC_CHECK_HEADERS(libgen.h limits.h)
|
AC_CHECK_HEADERS(libgen.h limits.h)
|
||||||
AC_CHECK_HEADERS(malloc.h math.h memory.h)
|
AC_CHECK_HEADERS(malloc.h math.h memory.h)
|
||||||
AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h pwd.h regex.h shlobj.h)
|
AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/tcp.h openssl/ripemd.h pwd.h regex.h shlobj.h)
|
||||||
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h stdbool.h)
|
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h stdbool.h)
|
||||||
AC_CHECK_HEADERS(stdint.h string.h strings.h stropts.h)
|
AC_CHECK_HEADERS(stdint.h string.h strings.h stropts.h)
|
||||||
AC_CHECK_HEADERS(sys/conf.h sys/dir.h sys/file.h)
|
AC_CHECK_HEADERS(sys/conf.h sys/dir.h sys/file.h)
|
||||||
@ -2202,8 +2202,6 @@ AC_CONFIG_FILES([packages/Dialect.defs])
|
|||||||
AC_CONFIG_FILES([packages/meld/Makefile])
|
AC_CONFIG_FILES([packages/meld/Makefile])
|
||||||
AC_CONFIG_FILES([packages/xml/Makefile])
|
AC_CONFIG_FILES([packages/xml/Makefile])
|
||||||
AC_CONFIG_FILES([packages/ProbLog/Makefile ])
|
AC_CONFIG_FILES([packages/ProbLog/Makefile ])
|
||||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile ])
|
|
||||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd_lfi/Makefile ])
|
|
||||||
AC_CONFIG_FILES([swi/library/Makefile])
|
AC_CONFIG_FILES([swi/library/Makefile])
|
||||||
AC_CONFIG_FILES([swi/library/clp/Makefile])
|
AC_CONFIG_FILES([swi/library/clp/Makefile])
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ strings of wide characters:
|
|||||||
</li>
|
</li>
|
||||||
<li>YAP_Term YAP_NWideBufferToString(wchar_t \* _buf_, size_t _len_)
|
<li>YAP_Term YAP_NWideBufferToString(wchar_t \* _buf_, size_t _len_)
|
||||||
</li>
|
</li>
|
||||||
<li>YAP_Term YAP_BufferToAtomList(char \* _buf_)
|
<li>YAP_Term YAP_BufferToAtomList(char \* _buf_)
|
||||||
</li>
|
</li>
|
||||||
<li>YAP_Term YAP_NBufferToAtomList(char \* _buf_, size_t _len_)
|
<li>YAP_Term YAP_NBufferToAtomList(char \* _buf_, size_t _len_)
|
||||||
</li>
|
</li>
|
||||||
@ -787,7 +787,7 @@ The next one returns the length of a well-formed list _t_, or
|
|||||||
`-1` otherwise:
|
`-1` otherwise:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Int YAP_ListLength(YAP_Term t)
|
<li>Int YAP_ListLength(YAP_Term t)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -526,9 +526,10 @@ handle_system_error(Error, off, G) :-
|
|||||||
throw(error(system_error(Message),G)).
|
throw(error(system_error(Message),G)).
|
||||||
|
|
||||||
handle_system_error(Error, _Id, _Ignore, _G) :- var(Error), !.
|
handle_system_error(Error, _Id, _Ignore, _G) :- var(Error), !.
|
||||||
handle_system_error(Error, SIG, off, G) :- integer(Error), !,
|
handle_system_error(Error, _SIG, off, G) :- integer(Error), !,
|
||||||
error_message(Error, Message).
|
error_message(Error, Message),
|
||||||
handle_system_error(signal, SIG, off, G) :- atom(Error), !,
|
throw(error(system_error(Message),G)).
|
||||||
|
handle_system_error(signal, SIG, off, G) :- !,
|
||||||
throw(error(system_error(child_signal(SIG)),G)).
|
throw(error(system_error(child_signal(SIG)),G)).
|
||||||
handle_system_error(stopped, SIG, off, G) :-
|
handle_system_error(stopped, SIG, off, G) :-
|
||||||
throw(error(system_error(child_stopped(SIG)),G)).
|
throw(error(system_error(child_stopped(SIG)),G)).
|
||||||
|
@ -543,7 +543,7 @@ get_file_name(term_t n, char **namep, char *tmp, int flags)
|
|||||||
{ fid_t fid;
|
{ fid_t fid;
|
||||||
|
|
||||||
if ( (fid = PL_open_foreign_frame()) )
|
if ( (fid = PL_open_foreign_frame()) )
|
||||||
{ predicate_t pred = PL_predicate("absolute_file_name", 3, "system");
|
{ predicate_t pred = PL_predicate("absolute_file_name", 3, "prolog");
|
||||||
term_t av = PL_new_term_refs(3);
|
term_t av = PL_new_term_refs(3);
|
||||||
term_t options = PL_copy_term_ref(av+2);
|
term_t options = PL_copy_term_ref(av+2);
|
||||||
int rc = TRUE;
|
int rc = TRUE;
|
||||||
@ -634,12 +634,11 @@ PL_get_file_name(term_t n, char **namep, int flags)
|
|||||||
|
|
||||||
if ( (rc=get_file_name(n, &name, buf, flags)) )
|
if ( (rc=get_file_name(n, &name, buf, flags)) )
|
||||||
{ if ( (flags & PL_FILE_OSPATH) )
|
{ if ( (flags & PL_FILE_OSPATH) )
|
||||||
{ if ( !(name = OsPath(name, ospath)) )
|
{ if ( !(name = OsPath(name, ospath)) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*namep = buffer_string(name, BUF_RING);
|
*namep = buffer_string(name, BUF_RING);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1215,7 +1215,7 @@ initPrologFlags(void)
|
|||||||
setPrologFlag("toplevel_var_size", FT_INTEGER, 1000);
|
setPrologFlag("toplevel_var_size", FT_INTEGER, 1000);
|
||||||
setPrologFlag("toplevel_print_anon", FT_BOOL, TRUE, 0);
|
setPrologFlag("toplevel_print_anon", FT_BOOL, TRUE, 0);
|
||||||
setPrologFlag("toplevel_prompt", FT_ATOM, "~m~d~l~! ?- ");
|
setPrologFlag("toplevel_prompt", FT_ATOM, "~m~d~l~! ?- ");
|
||||||
setPrologFlag("file_name_variables", FT_BOOL, FALSE, PLFLAG_FILEVARS);
|
setPrologFlag("file_name_variables", FT_BOOL, TRUE, PLFLAG_FILEVARS);
|
||||||
setPrologFlag("fileerrors", FT_BOOL, TRUE, PLFLAG_FILEERRORS);
|
setPrologFlag("fileerrors", FT_BOOL, TRUE, PLFLAG_FILEERRORS);
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
setPrologFlag("unix", FT_BOOL|FF_READONLY, TRUE, 0);
|
setPrologFlag("unix", FT_BOOL|FF_READONLY, TRUE, 0);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% $Date: 2011-11-28 14:41:26 +0100 (Mon, 28 Nov 2011) $
|
% $Date: 2011-11-28 14:41:26 +0100 (Mon, 28 Nov 2011) $
|
||||||
% $Revision: 6764 $
|
% $Revision: 6764 $
|
||||||
%
|
%
|
||||||
% This file is part of ProbLog
|
% This file is part of ProbLog
|
||||||
@ -412,24 +412,17 @@ logger_start_timer(Name) :-
|
|||||||
(
|
(
|
||||||
statistics(walltime,[StartTime,_]),
|
statistics(walltime,[StartTime,_]),
|
||||||
bb_put(Key,StartTime)
|
bb_put(Key,StartTime)
|
||||||
);(
|
)
|
||||||
bb_get(Key,_)
|
;
|
||||||
|
(
|
||||||
|
bb_get(Key,_)
|
||||||
->
|
->
|
||||||
(
|
format(user_error, 'logger_start_timer, timer ~a is already started~n', [Name])
|
||||||
write('logger_start_timer, timer '),
|
;
|
||||||
write(Name),
|
format(user_error, 'logger_start_timer, timer ~a is not defined~n', [Name])
|
||||||
write(' is already started'),
|
)
|
||||||
nl,
|
),
|
||||||
fail
|
!.
|
||||||
);(
|
|
||||||
write('logger_start_timer, timer '),
|
|
||||||
write(Name),
|
|
||||||
write(' is not defined'),
|
|
||||||
nl,
|
|
||||||
fail
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),!.
|
|
||||||
|
|
||||||
|
|
||||||
logger_stop_timer(Name) :-
|
logger_stop_timer(Name) :-
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
|
|
||||||
|
|
||||||
% load library modules
|
% load library modules
|
||||||
:- use_module(library(system), [exec/3, file_exists/1,wait/2]).
|
:- use_module(library(system), [exec/3, file_exists/1,wait/2, md5/3]).
|
||||||
:- use_module(library(lists), [memberchk/2]).
|
:- use_module(library(lists), [memberchk/2]).
|
||||||
:- yap_flag(arithmetic_exceptions, false).
|
:- yap_flag(arithmetic_exceptions, false).
|
||||||
|
|
||||||
@ -292,57 +292,27 @@ concat_path_with_filename(Path, File_Name, Result):-
|
|||||||
%========================================================================
|
%========================================================================
|
||||||
|
|
||||||
calc_md5(Filename,MD5):-
|
calc_md5(Filename,MD5):-
|
||||||
catch(calc_md5_intern(Filename,'md5sum',MD5),_,fail),
|
catch(calc_md5_intern(Filename,MD5),_,fail),
|
||||||
!.
|
|
||||||
calc_md5(Filename,MD5):-
|
|
||||||
catch(calc_md5_intern(Filename,'md5 -r',MD5),_,fail),
|
|
||||||
% used in Mac OS
|
|
||||||
% the -r makes the output conform with md5sum
|
|
||||||
!.
|
!.
|
||||||
calc_md5(Filename,MD5):-
|
calc_md5(Filename,MD5):-
|
||||||
throw(md5error(calc_md5(Filename,MD5))).
|
throw(md5error(calc_md5(Filename,MD5))).
|
||||||
|
|
||||||
calc_md5_intern(Filename,Command,MD5) :-
|
calc_md5_intern(Filename,MD5) :-
|
||||||
( file_exists(Filename) -> true ; throw(md5_file(Filename)) ),
|
( file_exists(Filename) -> true ; throw(md5_file(Filename)) ),
|
||||||
|
file_to_codes(Filename, S, []),
|
||||||
|
md5( S, MD5, [] ),
|
||||||
|
format('~s => ~s~n', [S,MD5]).
|
||||||
|
|
||||||
atomic_concat([Command,' "',Filename,'"'],Call),
|
file_to_codes( F, Codes, LF ) :-
|
||||||
% execute the md5 command
|
open(F, read, S),
|
||||||
exec(Call,[null,pipe(S),null],PID),
|
get_codes( S, Codes, LF).
|
||||||
bb_put(calc_md5_temp,End-End), % use difference list
|
|
||||||
bb_put(calc_md5_temp2,0),
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
get_codes(S, [C|L], LF) :-
|
||||||
( % read 32 Bytes from stdout of process
|
get_code(S, C),
|
||||||
repeat,
|
C \= -1,
|
||||||
get_byte(S,C),
|
|
||||||
|
|
||||||
(
|
|
||||||
C== -1
|
|
||||||
->
|
|
||||||
(
|
|
||||||
close(S),
|
|
||||||
wait(PID,_Status),
|
|
||||||
throw(md5error('premature end of output stream, please check os.yap calc_md5/2'))
|
|
||||||
);
|
|
||||||
true
|
|
||||||
),
|
|
||||||
|
|
||||||
bb_get(calc_md5_temp,List-[C|NewEnd]),
|
|
||||||
bb_put(calc_md5_temp,List-NewEnd),
|
|
||||||
bb_get(calc_md5_temp2,OldLength),
|
|
||||||
NewLength is OldLength+1,
|
|
||||||
bb_put(calc_md5_temp2,NewLength),
|
|
||||||
NewLength=32
|
|
||||||
),
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
!,
|
!,
|
||||||
|
get_codes(S, L, LF).
|
||||||
close(S),
|
get_codes(_, LF, LF).
|
||||||
wait(PID,_Status),
|
|
||||||
bb_delete(calc_md5_temp, FinalList-[]),
|
|
||||||
bb_delete(calc_md5_temp2,_),
|
|
||||||
atom_codes(MD5,FinalList).
|
|
||||||
|
|
||||||
|
|
||||||
%========================================================================
|
%========================================================================
|
||||||
%=
|
%=
|
||||||
@ -364,5 +334,5 @@ path_grouping(PathSep) :-
|
|||||||
|
|
||||||
path_separator('\\') :-
|
path_separator('\\') :-
|
||||||
current_prolog_flag( windows, true ).
|
current_prolog_flag( windows, true ).
|
||||||
path_separator('/').
|
path_separator('/').
|
||||||
|
|
@ -470,6 +470,7 @@ init_learning :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% build BDD script for every example
|
% build BDD script for every example
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
once(init_queries),
|
once(init_queries),
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -659,7 +660,7 @@ init_queries :-
|
|||||||
%=
|
%=
|
||||||
%========================================================================
|
%========================================================================
|
||||||
|
|
||||||
init_one_query(QueryID,_Query_Type) :-
|
init_one_query(QueryID,_Query_Type) :- trace,
|
||||||
create_known_values_file_name(QueryID,File_Name),
|
create_known_values_file_name(QueryID,File_Name),
|
||||||
file_exists(File_Name),
|
file_exists(File_Name),
|
||||||
!,
|
!,
|
||||||
@ -888,19 +889,16 @@ update_query(QueryID,ClusterID ,Method,Command,PID,Output_File_Name) :-
|
|||||||
create_bdd_output_file_name(QueryID,ClusterID,Iteration,Output_File_Name),
|
create_bdd_output_file_name(QueryID,ClusterID,Iteration,Output_File_Name),
|
||||||
create_bdd_file_name(QueryID,ClusterID,BDD_File_Name),
|
create_bdd_file_name(QueryID,ClusterID,BDD_File_Name),
|
||||||
|
|
||||||
problog_dir(PD),
|
convert_filename_to_problog_path('problogbdd_lfi',Absolute_Name),
|
||||||
concat_path_with_filename(PD,'problogbdd_lfi',Absolute_Name),
|
|
||||||
|
|
||||||
atomic_concat([Absolute_Name,
|
atomic_concat([Absolute_Name,
|
||||||
' -i "', Input_File_Name, '"',
|
' -i "', Input_File_Name, '"',
|
||||||
' -l "', BDD_File_Name, '"',
|
' -l "', BDD_File_Name, '"',
|
||||||
' -m ',Method,
|
' -m ', Method,
|
||||||
' -id ', QueryID,
|
' -id ', QueryID],Command),
|
||||||
' > "',
|
open( Output_File_Name, write, Stream ),
|
||||||
Output_File_Name,
|
exec(Command,[std, Stream ,std],PID),
|
||||||
'"'],Command),
|
close( Stream ).
|
||||||
|
|
||||||
exec(Command,[std,std,std],PID).
|
|
||||||
|
|
||||||
update_query_wait(QueryID,_ClusterID,Count,Symbol,Command,PID,OutputFilename,BDD_Probability) :-
|
update_query_wait(QueryID,_ClusterID,Count,Symbol,Command,PID,OutputFilename,BDD_Probability) :-
|
||||||
wait(PID,Error),
|
wait(PID,Error),
|
||||||
@ -983,7 +981,7 @@ my_reset_static_array(Name) :-
|
|||||||
(
|
(
|
||||||
Type==int
|
Type==int
|
||||||
->
|
->
|
||||||
forall(between(0,LastPos,Pos), update_array(Name,Pos,0))
|
forall(between(0,LastPos,Pos), update_array(Name,Pos,0))
|
||||||
;
|
;
|
||||||
Type==float
|
Type==float
|
||||||
->
|
->
|
||||||
|
@ -113,7 +113,7 @@ mkdir -p packages/bdd
|
|||||||
|
|
||||||
if test "$PKG_BDDLIB" != ""; then
|
if test "$PKG_BDDLIB" != ""; then
|
||||||
AC_CONFIG_FILES([packages/bdd/Makefile])
|
AC_CONFIG_FILES([packages/bdd/Makefile])
|
||||||
AC_CONFIG_FILES([packages/bdd/Makefile/config.h])
|
AC_CONFIG_FILES([packages/bdd/cudd_config.h])
|
||||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile])
|
AC_CONFIG_FILES([packages/ProbLog/simplecudd/Makefile])
|
||||||
AC_CONFIG_FILES([packages/ProbLog/simplecudd_lfi/Makefile])
|
AC_CONFIG_FILES([packages/ProbLog/simplecudd_lfi/Makefile])
|
||||||
fi
|
fi
|
||||||
|
@ -90,7 +90,10 @@ once/1.
|
|||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
once(G) :- '$execute'(G), !.
|
once(G) :-
|
||||||
|
strip_module(G, M, C),
|
||||||
|
'$meta_call'(C, M),
|
||||||
|
!.
|
||||||
|
|
||||||
/** @pred forall(: _Cond_,: _Action_)
|
/** @pred forall(: _Cond_,: _Action_)
|
||||||
|
|
||||||
|
@ -697,7 +697,7 @@ be lost.
|
|||||||
open('CONIN$', read, _S, [alias(debugger_input),bom(false)]).
|
open('CONIN$', read, _S, [alias(debugger_input),bom(false)]).
|
||||||
|
|
||||||
|
|
||||||
% last argument to do_spy says that we are at the end of a context. It
|
% last argument to do_spy says that we are at the end of a context. It
|
||||||
% is required to know whether we are controlled by the debugger.
|
% is required to know whether we are controlled by the debugger.
|
||||||
%'$do_spy'(V, M, CP, Flag) :-
|
%'$do_spy'(V, M, CP, Flag) :-
|
||||||
% writeln('$do_spy'(V, M, CP, Flag)), fail.
|
% writeln('$do_spy'(V, M, CP, Flag)), fail.
|
||||||
@ -889,7 +889,8 @@ be lost.
|
|||||||
'$spycall'(G, M, _, _) :-
|
'$spycall'(G, M, _, _) :-
|
||||||
nb_getval('$debug_jump',true),
|
nb_getval('$debug_jump',true),
|
||||||
!,
|
!,
|
||||||
'$execute_nonstop'(G,M).
|
( '$is_metapredicate'(G, M) -> '$meta_expansion'(G,M,M,M,G1,[]) ; G = G1 ),
|
||||||
|
'$execute_nonstop'(G1,M).
|
||||||
'$spycall'(G, M, _, _) :-
|
'$spycall'(G, M, _, _) :-
|
||||||
(
|
(
|
||||||
'$system_predicate'(G,M)
|
'$system_predicate'(G,M)
|
||||||
|
Reference in New Issue
Block a user