../configure --prefix /opt/gupu/yap-6.3 --with-gmp --enable-clpbn-bp=false
g1:/opt/gupu/yap-src/Build> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/gupu/yap ../
SICStus | YAP | SWI | |
---|---|---|---|
1 | 0.040 | 0.052 | 0.694 |
2 | 0.200 | 0.272 | 0.809 |
3 | 36.290 | 24.493 | 5.560 |
?- catch(when((nonvar(X),murks),true),error(E,_),true). freeze(X,when(murks,user:true)).Expected:
E =
domain_error(when_condition,(nonvar(_A),murks))
This is particularly necessary to ensure that new conditions are
properly handled.
?- between(0,inf,X). X = 0 ? ; X = 1 ?Expected:
type_error(integer,inf)
.
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ ./yap -f YAP 6.3.4 (x86_64-linux): Sun May 31 21:45:13 CEST 2015 ?- X = 1. X = 1. ?- dif(X,Y). dif(X,Y). ?- dif(X-Y,1-2). dif(X-Y,1-2). ?- dif(X-Y,1-2), X = Y. Bus error (core dumped) ulrich@p0:/opt/gupu/src/yap-6.3/narch$
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ echo `date` `git pull && git reset --hard` Fri Feb 13 18:12:25 CET 2015 Already up-to-date. HEAD is now at 071bb36 fix alignment
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ echo `date` `git pull && git reset --hard` Mon Feb 9 23:16:22 CET 2015 Already up-to-date. HEAD is now at 888a58b script improvements
============== packages/myddas make[1]: Entering directory `/opt/gupu/src/yap-6.3/narch/packages/myddas' gcc -c -DCOROUTINING=1 -DRATIONAL_TREES=1 -DTABLING=1 -DDEPTH_LIMIT=1 -DMYDDAS_ODBC -shared -fPIC -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DTABLING=1 -DDEPTH_LIMIT=1 -DMYDDAS_ODBC -I../../../packages/myddas -I../.. -I../../../packages/myddas/../../include -I../../../packages/myddas/../../H -I../../../packages/myddas/../../OPTYap -I../../../packages/myddas/../../os ../../../packages/myddas/myddas_util.c -o myddas_util.o ../../../packages/myddas/myddas_util.c:44:1: warning: no previous prototype for ‘myddas_util_connection_type’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c: In function ‘myddas_util_connection_type’: ../../../packages/myddas/myddas_util.c:47:5: warning: implicit declaration of function ‘myddas_util_search_connection’ [-Wimplicit-function-declaration] ../../../packages/myddas/myddas_util.c:47:5: warning: initialization makes pointer from integer without a cast [enabled by default] ../../../packages/myddas/myddas_util.c: At top level: ../../../packages/myddas/myddas_util.c:60:1: warning: no previous prototype for ‘myddas_util_search_predicate’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:77:1: warning: no previous prototype for ‘myddas_util_add_predicate’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c: In function ‘myddas_util_add_predicate’: ../../../packages/myddas/myddas_util.c:81:5: warning: initialization makes pointer from integer without a cast [enabled by default] ../../../packages/myddas/myddas_util.c:84:5: warning: implicit declaration of function ‘myddas_init_initialize_predicate’ [-Wimplicit-function-declaration] ../../../packages/myddas/myddas_util.c:84:5: warning: initialization makes pointer from integer without a cast [enabled by default] ../../../packages/myddas/myddas_util.c: At top level: ../../../packages/myddas/myddas_util.c:97:1: warning: no previous prototype for ‘myddas_util_delete_predicate’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:115:1: warning: no previous prototype for ‘myddas_util_delete_connection’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c: In function ‘myddas_util_delete_connection’: ../../../packages/myddas/myddas_util.c:117:38: warning: initialization makes pointer from integer without a cast [enabled by default] ../../../packages/myddas/myddas_util.c: At top level: ../../../packages/myddas/myddas_util.c:147:1: warning: no previous prototype for ‘myddas_util_search_connection’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:147:1: error: conflicting types for ‘myddas_util_search_connection’ ../../../packages/myddas/myddas_util.c:47:5: note: previous implicit declaration of ‘myddas_util_search_connection’ was here ../../../packages/myddas/myddas_util.c:164:1: warning: no previous prototype for ‘myddas_util_add_connection’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c: In function ‘myddas_util_add_connection’: ../../../packages/myddas/myddas_util.c:174:3: warning: implicit declaration of function ‘myddas_init_initialize_connection’ [-Wimplicit-function-declaration] ../../../packages/myddas/myddas_util.c:174:8: warning: assignment makes pointer from integer without a cast [enabled by default] ../../../packages/myddas/myddas_util.c: At top level: ../../../packages/myddas/myddas_util.c:191:1: warning: no previous prototype for ‘myddas_util_get_odbc_enviromment’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:204:1: warning: no previous prototype for ‘myddas_util_get_total_multi_queries_number’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:209:1: warning: no previous prototype for ‘myddas_util_set_total_multi_queries_number’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:331:1: warning: no previous prototype for ‘get_myddas_top’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:339:1: warning: no previous prototype for ‘myddas_util_get_pred_next’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:345:1: warning: no previous prototype for ‘myddas_util_get_pred_arity’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:351:1: warning: no previous prototype for ‘myddas_util_get_pred_name’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:357:1: warning: no previous prototype for ‘myddas_util_get_pred_module’ [-Wmissing-prototypes] ../../../packages/myddas/myddas_util.c:363:1: warning: no previous prototype for ‘myddas_util_get_list_pred’ [-Wmissing-prototypes] make[1]: *** [myddas_util.o] Error 1 make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch/packages/myddas' make: *** [all] Error 1 ulrich@p0:/opt/gupu/src/yap-6.3/narch$
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ git reset --hard HEAD is now at ba978d8 just in time native code: now compiles by doing cmake; make. ulrich@p0:/opt/gupu/src/yap-6.3/narch$ make gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DTABLING=1 -DDEPTH_LIMIT=1 -DMYDDAS_ODBC -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"\" -I/usr/local/include -I. -I../H -I../include -I../os -I../OPTYap -I../BEAM -I../CXX ../C/absmi.c -o absmi.o ../C/absmi.c: In function ‘Yap_absmi’: ../C/absmi.c:1688:5: error: ‘Yap_ABSMI_ControlLabels’ undeclared (first use in this function) ../C/absmi.c:1688:5: note: each undeclared identifier is reported only once for each function it appears in ../C/absmi.c:1688:31: error: ‘control_labels’ undeclared (first use in this function) make: *** [absmi.o] Error 1
?- integer(10000000000000000000). false.
?- set_prolog_flag(double_quotes,string). true. ?- write_canonical("abc"). "abc"true.This is not canonical syntax, because "abc" might be read as chars or codes as well. To make strings a valid extension the canonical syntax would have to use backquoted strings see 6.4.7 Back quoted strings. Then,
set_prolog_flag(double_quotes, string)
would make sense
— as much as chars
or codes
.
?- number_chars(1.0e9,['1',.,'0','E','9']). false. ?- number_chars(1,['0','1']). false.?- number_chars(1,[a]). false. ?- catch(number_codes(N,0),error(E,_),true). E = type_error(string,0).
?- abs(X) #=< 7^7^7. *** glibc detected *** /usr/local/bin/yap: realloc(): invalid next size: 0x00000000008b6fa0 ***
?- current_predicate(abx/1). error at clause 2 of prolog:'$get_undefined_pred'/4 !! INSTANTIATION ERROR- functor/3: expected bound valueExpected: failure.
ulrich@p0:/opt/gupu/src/yap-6.3$ git describe --tags fatal: No names found, cannot describe anything.It used to work.
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ date&& git pull && git reset --hard Wed Jan 28 02:04:03 CET 2015 Already up-to-date. HEAD is now at 9f945c1 cmake
ulrich@p0:~/SO$ /opt/gupu/yap-6.3/bin/yap -f YAP 6.3.4 (x86_64-linux): Mon Jan 26 00:38:17 CET 2015 ?- X = 1. % % % YAP OOOPS: tried to access illegal address 0x7f44852a7c10!!!!. % % % % PC: meta-call % Continuation: prolog:catch/3 at clause 1 Active Choice-Points: $catch(_1048439,$history:fail,_1048404) yap_flag(readline,true) $history:save_history_line(X = 1) repeat $catch(_131086,user:$Error(_131086),_1048524) repeat Exiting ....
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ make make: *** No rule to make target `JIT/HPP/JIT.hpp', needed by `yap'. Stop."Fix" by manually editing the Makefile. It seems I have only llvm 3.0, but 3.5 would be required.
?- N is 2^64, length([], N). ERROR at clause 1 of prolog:length/2 !! TYPE ERROR- length/2: expected integer, got 18446744073709551616 Expected: failure.
?- X= 0x1000000000000000000000. X = 0.Expected:
X = 19342813113834066795298816
.
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ make gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DTABLING=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I/opt/gupu/yap-6.3/include -I. -I../H -I../include -I../os -I../OPTYap -I../BEAM ../C/sysbits.c -o sysbits.o ../C/sysbits.c: In function 'p_yap_paths': ../C/sysbits.c:2862:14: error: 'DESTDIR' undeclared (first use in this function) ../C/sysbits.c:2862:14: note: each undeclared identifier is reported only once for each function it appears in ../C/sysbits.c:2863:46: error: expected ')' before string constant ../C/sysbits.c:2864:46: error: expected ')' before string constant ../C/sysbits.c:2865:46: error: expected ')' before string constant
?- atom_codes(A,"'"). A = '\''.Above is fine, but:
?- writeq('\''). |: ERROR!! error(syntax_error(end_of_file_in_string),stream(user_input,2,0,73)) ERROR!! error(syntax_error(end_of_file_in_string),stream(user_input,2,0,73))Expected (without waiting):
'\''
. So YAP can write but
does not read a single quote.
?- X is 256^2^62. X = 1.Expected: Either the correct number or a
resource_error
.
A representation error is not OK.
ulrich@p0:/opt/gupu/src/yap-6.3$ date;git pull;git describe --tags;date Mon Feb 24 12:16:24 CET 2014 Already up-to-date. 6.3.2-1447-gb8ebc87 Mon Feb 24 12:16:25 CET 2014Expected: The current version is 6.3.4, so also git should know this
-
(1)^2
to - (1^2)
.
(see #43)
From -a^b
to - (a^b)
. So if the principal functor is a prefix minus
and the argument is an infix or postfix, always put
brackets. See 7.10.5. It's the only way to
implement this with low effort in Prolog directly. Otherwise an
extra state or difference is needed.
ulrich@p0:/opt/gupu/src/yap-6.3/narch$ date && git pull && git describe --tags Wed Feb 19 18:27:12 CET 2014 Already up-to-date. 6.3.2-1447-g1e8d70a
?- arg(1000000000000000000,s(_),_). false. ?- arg(10000000000000000000,s(_),_). ERROR!! TYPE ERROR- arg 1 of arg/3: expected integer, got 10000000000000000000
ulrich@p0:/opt/gupu/src/yap-6.3$ narch/yap -f YAP 6.3.4 (x86_64-linux): Wed Dec 11 16:30:35 CET 2013 MYDDAS version MYDDAS-0.9.1 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6.3/share/Yap/clpfd.pl... ERROR [ Thread 0 ] at clause 1 of prolog:'$$compile'/4 !! PERMISSION ERROR- in line 160, system predicate string/1: modifying static procedure string/1 % reconsulting /opt/gupu/yap-6.3/share/Yap/assoc.yap... % reconsulting /opt/gupu/yap-6.3/share/Yap/rbtrees.yap... % reconsulted /opt/gupu/yap-6.3/share/Yap/rbtrees.yap in module rbtrees, 24 msec 293712 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/assoc.yap in module assoc, 28 msec 335648 bytes % reconsulting /opt/gupu/yap-6.3/share/Yap/pairs.pl... % reconsulted /opt/gupu/yap-6.3/share/Yap/pairs.pl in module pairs, 0 msec 17904 bytes % Warning: [Thread 0 ] % Discontiguous definition of clpfd:goal_expansion/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attribute_goals/3. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attribute_goals/3. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attribute_goals/3. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attribute_goals/3. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attribute_goals/3. % Warning: [Thread 0 ] % Discontiguous definition of clpfd:attr_unify_hook/2. % reconsulted /opt/gupu/yap-6.3/share/Yap/clpfd.pl in module clpfd, 272 msec 2800624 bytes true.
Expected: instantiation_error, and type_error(list,[a|a])?- _=..[1|_]. ERROR!! TYPE ERROR- (=..)/2: expected atom, got 1?- a=..[a|a]. false.
?- call( (true->B=true;B=false) ). B = true. ?- (true->B=true;B=false). B = true ? ; B = false.Expected: same as with call/1.
?- term_variables([A],[A,B],[B]). true. ?- term_variables([A],[A,B],Vs). false.Expected:
Vs = [B]
.
for p in ../../../packages/swi-minisat2/examples/adder.pl ../../../packages/swi-minisat2/examples/pearl_examples.pl; do /usr/bin/install -c -m 644 $p /opt/gupu/yap-6.3/share/doc/Yap/packages/examples/minisat; done make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch/packages/swi-minisat2' (cd LGPL ; make install) make[1]: Entering directory `/opt/gupu/src/yap-6.3/narch/LGPL' make[1]: *** No rule to make target `../../LGPL/base64.pl', needed by `install'. Stop. make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch/LGPL' make: *** [install_copied_files] Error 2 ulrich@p0:/opt/gupu/src/yap-6.3/narch$ history|tail -4 515 history 516 make clean && make -j 2 517 make install 518 history|tail -4 ulrich@p0:/opt/gupu/src/yap-6.3/narch$ git describe --tags 6.3.2-723-gb88dcb8
?- write_term(A,[variable_names(['Leftmost'=A,'Middlemost'=A,'Rightmost'=A])]). false.Expected:
Leftmost
: Minerva, SWI, GNU, B.
ulrich@p0:/opt/gupu/src/yap-6.3$ git grep infite docs/yap.tex:Succeeds if there are loops in the term @var{T}, that is, it is an infite term.
g1:/opt/gupu/src/yap-6.3/narch> yap -f YAP 6.3.4 (x86_64-linux): Tue Jan 29 12:39:29 CET 2013 MYDDAS version MYDDAS-0.9.1 ?- write_term(This is Nice,[variable_names(['This'=This,'Nice'=Nice])]). This is Nice true ?- freeze(X,(nl,write(f(X)),nl)), write_term(X,[variable_names(['Iggs'=X])]). _D131992 f(Iggs) freeze(X,user: (nl,write(f(X)),nl))Expected: Write out only
Iggs
. Evidently, attributed
variables are not detected as variables and their bindings wake up the
constraint. It should not wake up the constraints. The motivation is
that handling attributed variables/constraints is extremely
implementation dependent - we would never get agreement on this. But
it is very simple for all implementations to just ignore constraints
for the time of writing. This is one step towards a portable toplevel.
g1:/opt/gupu/src/yap-6.3/narch> git describe --tags 6.3.2-696-gdbd4c7f g1:/opt/gupu/src/yap-6.3/narch> make gcc -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DMYDDAS_ODBC -DCOROUTINING=1 -DCUT_C=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I/opt/gupu/include -I. -I../H -I../include -I../os -I../OPTYap -I../BEAM -I../MYDDAS -rdynamic -L/opt/gupu/lib -L/opt/gupu/src/yap-6.3/narch -Wl,-R/opt/gupu/lib -Wl,-R,/opt/gupu/lib/Yap -o yap yap.o libYap.a -lodbc -lgmp -lreadline -lncurses -lresolv -lnss_dns -lnss_files -lcrypt -lstdc++ -lm -ldl -lnsl libYap.a(c_interface.o): In function `YAP_signal': /opt/gupu/src/yap-6.3/narch/../C/c_interface.c:3884: undefined reference to `Yap_signal' libYap.a(absmi.o): In function `Yap_absmi': /opt/gupu/src/yap-6.3/narch/../C/absmi.c:11451: undefined reference to `Yap_undo_signal' libYap.a(adtdefs.o): In function `LookupWideAtom': /opt/gupu/src/yap-6.3/narch/../C/adtdefs.c:275: undefined reference to `Yap_signal' libYap.a(adtdefs.o): In function `LookupAtom': /opt/gupu/src/yap-6.3/narch/../C/adtdefs.c:208: undefined reference to `Yap_signal' libYap.a(attvar.o): In function `AddToQueue': /opt/gupu/src/yap-6.3/narch/../C/attvar.c:50: undefined reference to `Yap_signal' libYap.a(attvar.o): In function `AddFailToQueue': /opt/gupu/src/yap-6.3/narch/../C/attvar.c:66: undefined reference to `Yap_signal' libYap.a(errors.o): In function `Yap_Error': /opt/gupu/src/yap-6.3/narch/../C/errors.c:492: undefined reference to `Yap_signal' libYap.a(exec.o):/opt/gupu/src/yap-6.3/narch/../C/exec.c:644: more undefined references to `Yap_signal' follow libYap.a(inlines.o): In function `p_dif': /opt/gupu/src/yap-6.3/narch/../C/inlines.c:430: undefined reference to `Yap_undo_signal' libYap.a(stdpreds.o): In function `Yap_InitCPreds': /opt/gupu/src/yap-6.3/narch/../C/stdpreds.c:4289: undefined reference to `Yap_InitSignalCPreds' libYap.a(sysbits.o): In function `HandleVTALRM': /opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1770: undefined reference to `Yap_signal' libYap.a(sysbits.o): In function `HandleALRM': /opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1752: undefined reference to `Yap_signal' libYap.a(sysbits.o): In function `InteractSIGINT': /opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1637: undefined reference to `Yap_signal' /opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1650: undefined reference to `Yap_signal' /opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1659: undefined reference to `Yap_signal' libYap.a(sysbits.o):/opt/gupu/src/yap-6.3/narch/../C/sysbits.c:1646: more undefined references to `Yap_signal' follow collect2: ld returned 1 exit status make: *** [yap] Error 1
?- 1000=I,time(( between(1,I,X), between(1,I,Y), X \== Y, false )).
?- 7^8^9>0. ERROR!! RESOURCE ERROR- not enough stackSWI handles this easily.
commit 237976cf309a0b706d4b0c2668126c639003d866 Author: Vítor Santos Costacyclic_term is **not** ISO ; the current documentation claims it to be ISO. I can only recommend to remove cyclic_term/1 altogether - it will only create less portable code. Every useless extension makes Prolog weaker.Date: Tue Oct 2 15:15:16 2012 +0100
?- length(1,L). ERROR!! TYPE ERROR- length(1,_131101): expected list, got 1Expected: Failure
YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- X = 0'\z. X = 122 ?- ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Mon Apr 16 02:37:12 CEST 2012 ?- X = 0'\z. X = -1Expected: Syntax error. There is not a single other system that produces -1. There is one system (Ciao) which produces 122. IF, SWI, B, GNU, SICStus, XSB all produce a syntax error.
This is probably one of Paulo Moura's suggestions. It does not make
sense. in_character_code
is an explicit type (8.1.2.)
and is defined as:
in_character_code
— a character code or the integer -1
So the -1 is mentioned explicitly and is therefore hardwired. This
was not even part of Quintus.
YAP 6.3.2 (i686-linux): Mon Apr 16 02:37:12 CEST 2012 ?- current_predicate(P), P = current_predicate/1. no ?- current_predicate(current_predicate/1). yesExpected: failure. SWI is wrong on this.
ulrich@gupu2:/opt/gupu/src/yap-6.3/narch$ git describe --tags 6.3.2-47-g051936c ulrich@gupu2:/opt/gupu/src/yap-6.3/narch$ make gcc -DBP_FREE -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I. -I../H -I../include -I../os -I../OPTYap -I../BEAM -I../MYDDAS -rdynamic -L/opt/gupu/src/yap-6.3/narch -Wl,-R/opt/gupu/yap-6.3/lib -Wl,-R,/opt/gupu/yap-6.3/lib/Yap -o yap yap.o libYap.a -lgmp -lresolv -lnss_dns -lnss_files -lcrypt -lstdc++ -lm -lncurses -lreadline -ldl -lnsl yap.o: In function `init_standard_system': /opt/gupu/src/yap-6.3/narch/../console/yap.c:92: undefined reference to `YAP_parse_yap_arguments' libYap.a(swi.o): In function `PL_initialise': /opt/gupu/src/yap-6.3/narch/../library/dialect/swi/fli/swi.c:2040: undefined reference to `YAP_parse_yap_arguments' collect2: ld returned 1 exit status make: *** [yap] Error 1The last version that did not have this problem was: 6.3.2-9-gb15c9f5. So the culprit is probably:
commit a9d1bd788e521d6c3a731893fea093cccffb1be8 Author: Vitor Santos CostaDate: Fri Jun 22 03:56:01 2012 -0500 improve SWI console
config.status: echo "running CONFIG_SHELL=/bin/bash /bin/bash ../configure " '--prefix' '/opt/gupu/yap-6.3' '--with-gmp' '--enable-clpbn-bp=0' $ac_configure_extra_args " --no-create --no-recursion" >&6 config.status: exec /bin/bash "../configure" '--prefix' '/opt/gupu/yap-6.3' '--with-gmp' '--enable-clpbn-bp=0' $ac_configure_extra_args --no-create --no-recursion
?- true ; true. yesExpected: Two answers by default. Otherwise you cannot easily detect accidental choice points.
?- g3:~/iso-prolog> /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (x86_64-linux): Thu Jun 21 14:55:50 CEST 2012 ?- X = 1 ; false. X = 1 ? ; X = 1 ? ; noExpected: highlighted answer should not be present.
g3:/opt/gupu/src/yap-6.3/narch-g3> git describe --tags 6.3.2-5-g7b6239c g3:/opt/gupu/src/yap-6.3/narch-g3> uname -a Linux g3 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux
?- append(Xs,Ys,[]). Xs = Ys = [] ? ; noExpected: Determinate. Same problem for
p(_). p(2).And
?- p(1), T = t. T = t ? ; noSWI is determinate for p/1 but not for append/3.
Why this is so relevant: When parsing with DCGs, many cases remain nondeterminate because of similar reasons. Think of:
seq([]) --> []. seq([E|Es]) --> [E], seq(Es). ?- phrase(seq(Es), []).
make[1]: Entering directory `/opt/gupu/src/yap-6.3/narch/library/tries' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch/library/tries' (cd packages/CLPBN/clpbn/bp ; make) make[1]: Entering directory `/opt/gupu/src/yap-6.3/narch/packages/CLPBN/clpbn/bp' g++ -c -std=c++0x -shared -fPIC -DBP_FREE -O3 -fomit-frame-pointer -Wall -D_YAP_NOT_INSTALLED_=1 -I../../../../../packages/CLPBN/clpbn/bp -I../../../.. -I../../../../../packages/CLPBN/clpbn/bp/../../../../include -g -O0 -Wextra ../../../../../packages/CLPBN/clpbn/bp/FactorGraph.cpp -o FactorGraph.o ../../../../../packages/CLPBN/clpbn/bp/FactorGraph.cpp: In member function 'void FactorGraph::readFromUaiFormat(const char*)': ../../../../../packages/CLPBN/clpbn/bp/FactorGraph.cpp:72: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. make[1]: *** [FactorGraph.o] Error 1 make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch/packages/CLPBN/clpbn/bp' make: *** [all] Error 2Solution: Please try
--enable-clpbn-bp=false
?- catch(number_chars(_,[]),error(syntax_error(_),_),true). ERROR!! SYNTAX ERROR at "", goal number_chars(_131506,[]): expected_number_syntaxExpected: Success due to caught error.
The format of a syntax error is: syntax_error(Atom)
and
nothing else! If you want to provide further information, you can put
it in the second argument of error/2.
?- use_module(library(lists)). % reconsulting /opt/gupu/yap-6.3/share/Yap/lists.yap... % reconsulting /opt/gupu/yap-6.3/share/Yap/error.pl... % reconsulted /opt/gupu/yap-6.3/share/Yap/error.pl in module error, 0 msec 25096 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/lists.yap in module lists, 4 msec 65720 bytes yes ?- member(X,[1]). X = 1 ? ; noExpected: Determinate.
BTW: Where is member/2 defined? I cannot find
it in lists.yap
.
?- use_module(library(clpfd)). yes ?- abs(X) #=< 7^7^7. ERROR at clause 3 of clpfd:cis_uminus/2 !! RESOURCE ERROR- not enough stack ?- 7^7^7 #> 0. yesSWI handles this easily on the same 32 bit machine.
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- catch(open('/etc/passwd',read,r),error(E,_),true). E = uninstantiation_error(r) ?- ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Thu Mar 22 23:29:16 CET 2012 ?- catch(open('/etc/passwd',read,r),error(E,_),true). unimplemented SWI error 18 E = instantiation_error
+phrase(_:[], S, S) :- !. +phrase(_:[H|T], S0, S) :- !, + lists:append([H|T], S, S0).and add
[](H,T,Xs0,Xs) :- '.'(H,T,Xs0,Xs).For the time #254 is open.
?- phrase(C,Xs). C = Xs = []Things like that slow down the entire process by months.
?- catch(call(.(H,T),Xs0),error(E,_),true). E = existence_error(procedure,[]/3) ?- catch(call(.(H,T),Xs0,Xs),error(E,_),true). E = existence_error(procedure,[]/4) ?- catch(call(.(H,T),Xs0,Xs,_),error(E,_),true). E = existence_error(procedure,[]/5)Expected:
'.'/3,4,5
in place of []/3,4,5
?- current_op(P,xfy,.). P = 999 ? ; noYAP and XSB are the only systems left...
?- catch(get_char(df),Pat,true). |: a Pat = error(type_error(character,df),context(get_char/1,_A))Expected: No reading, type
in_character
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Thu Mar 22 23:29:16 CET 2012 ?- [user]. % consulting user_output... | :- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6.3/share/Yap/clpfd.pl... % reconsulting /opt/gupu/yap-6.3/share/Yap/assoc.yap... % reconsulting /opt/gupu/yap-6.3/share/Yap/rbtrees.yap... % reconsulted /opt/gupu/yap-6.3/share/Yap/rbtrees.yap in module rbtrees, 12 msec 141368 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/assoc.yap in module assoc, 16 msec 160944 bytes % reconsulting /opt/gupu/yap-6.3/share/Yap/pairs.pl... % reconsulted /opt/gupu/yap-6.3/share/Yap/pairs.pl in module pairs, 4 msec 9160 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/clpfd.pl in module clpfd, 176 msec 1379016 bytes | | n_factorial(0, 1). | n_factorial(N, F) :- N #> 0, N1 #= N - 1, F #= N * F1, n_factorial(N1, F1). | % consulted user_output in module user, 184 msec 1403504 bytes yes ?- X #> Y. Y#=<X+-1 ?- n_factorial(N,0). ^CAction (h for help): a ?- X #> Y. noSo after ^C clpfd fails
lrich@gupu2:/opt/gupu/src/yap-6.3/narch$ make check gcc -c -DBP_FREE -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -DCUT_C=1 -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DTABLING=1 -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I. -I../H -I../include -I../os -I../OPTYap -I../BEAM -I../MYDDAS ../os/libtai/check.c -o check.o gcc -rdynamic -L/opt/gupu/src/yap-6.3/narch -Wl,-R/opt/gupu/yap-6.3/lib -Wl,-R,/opt/gupu/yap-6.3/lib/Yap check.o -o check check.o: In function `main': /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:27: undefined reference to `leapsecs_init' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:31: undefined reference to `caltime_scan' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:34: undefined reference to `caltime_tai' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:35: undefined reference to `caltime_utc' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:36: undefined reference to `tai_pack' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:37: undefined reference to `tai_unpack' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:38: undefined reference to `tai_sub' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:45: undefined reference to `caltime_fmt' /opt/gupu/src/yap-6.3/narch/../os/libtai/check.c:46: undefined reference to `caltime_fmt' collect2: ld returned 1 exit status make: *** [check] Error 1 rm check.o
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Thu Mar 22 23:29:16 CET 2012 ?- sort([1,2],X). no ?- sort(X,L). ERROR!! INSTANTIATION ERROR- sort(0,_131501): expected bound value ?- sort([],L). nonoWhat is happening here?
?- catch((L=[1|L],sort(L,K)),error(E,_),true). E = resource_error(stack) ?- L=[1|L], sort([],L). noExpected:
type_error(list,[1,1,1,1|**])
Patch already sent. Waiting for further action.
?- keysort(X,[]). noExpected:
instantiation_error
For keysort, input and output must be of same lenght.
There are much too many pseudo-escape sequences in YAP - they behave everywhere differently.
- control escape sequences:
\a \b \r \f \t \n \v
- same meaning as in C (ISO/IEC 9899)
- meta escape sequences:
\\ \' \" \`
- meaning the character literally
- continuation escape sequence
\
newline- meaning the empty word (in quoted, double quoted and back quoted tokens)
- octal escape sequence starting with
\
decimal digit- hexadecimal escape sequence starting with
\x
?- number_chars(2,[_|1]) ; a =.. [t|1]. no
?- use_module(library(error)). % reconsulting /opt/gupu/yap-6.3/share/Yap/error.pl... % reconsulting /opt/gupu/yap-6.3/share/Yap/lists.yap... % reconsulted /opt/gupu/yap-6.3/share/Yap/lists.yap in module lists, 4 msec 35472 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/error.pl in module error, 8 msec 65664 bytes yes ?- must_be(list,Xs). ERROR!! EXISTENCE ERROR- procedure $skip_list/3 is undefined, called from context prolog:$command/4 Goal was error:$skip_list(_131512,_131513,_131514) ?- ulrich@gupu2:~/iso-prolog$ ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Tue Mar 20 20:24:32 CET 2012 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6.3/share/Yap/clpfd.pl... % reconsulting /opt/gupu/yap-6.3/share/Yap/assoc.yap... % reconsulting /opt/gupu/yap-6.3/share/Yap/rbtrees.yap... % reconsulted /opt/gupu/yap-6.3/share/Yap/rbtrees.yap in module rbtrees, 16 msec 141384 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/assoc.yap in module assoc, 20 msec 160968 bytes % reconsulting /opt/gupu/yap-6.3/share/Yap/pairs.pl... % reconsulted /opt/gupu/yap-6.3/share/Yap/pairs.pl in module pairs, 0 msec 9152 bytes % reconsulted /opt/gupu/yap-6.3/share/Yap/clpfd.pl in module clpfd, 180 msec 1383088 bytes yes ?- sum([1],#=,S). S = 1 ?- sum([X,Y],#=,S). X+Y#=S ?- sum(Xs,#=,S). ERROR!! EXISTENCE ERROR- procedure $skip_list/3 is undefined, called from context prolog:$query/2 Goal was error:$skip_list(_131512,_131513,_131514)Expected: instantiation_error.
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- writeq({a}). {a}yes ?- ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Wed Mar 14 14:16:44 CET 2012 ?- writeq({a}). {}(a)yesExpected:
{a}
. Nitpick: This is a thing where the
standard (by ommision) prescribes {}(a)
but this is
definitely an error, since 6.3.6.1 uses it as an example. It should
be handled per analogiam ('.')/2.
YAP 6.3.2 (i686-linux): Wed Mar 14 14:16:44 CET 2012 ?- writeq(-(-1)). --1yesExpected:
- -1
?- writeq(-(-)). -(-)yesExpected:
- (-)
?- writeq(-(:-)). -(:-)yesExpected:
- (:-)
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Wed Mar 14 14:16:44 CET 2012 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6.3/share/Yap/clpfd.pl... ERROR!! (/opt/gupu/yap-6.3/share/Yap/error.pl:166). EXISTENCE ERROR- procedure variables_within_term/3 is undefined, called from context prolog:$full_clause_optimisation/4 Goal was terms:variables_within_term([_187728,_187730,_187732],(must_be(integer,_187730),type_error(rational,_187732)),_187727) ERROR!! (/opt/gupu/yap-6.3/share/Yap/maplist.yap:249). EXISTENCE ERROR- procedure variables_within_term/3 is undefined, called from context prolog:$full_clause_optimisation/4 Goal was terms:variables_within_term([_195058,_195060,_195062,_195064,_195066,_195068,_195070,_195072],sumnodes_body(_195062,_195064,_195077,_195068,_195060,_195072),_195057)
?- freeze(X, false). freeze('$VAR'('X'),user:false)This is a perfect opportunity to introduce a write-option
variable_names/1
!
See #220. See also #171.
ulrich@gupu2:/opt/gupu/src/yap-6.3/narch$ make install_info make info; \ /usr/bin/install -c yap.info* /opt/gupu/yap-6.3/share/info; \ if test -e /opt/gupu/yap-6.3/share/info/emacs.bz2; then \ bzip2 --quiet --force /opt/gupu/yap-6.3/share/info/yap.info*; \ else \ if test -e /opt/gupu/yap-6.3/share/info/emacs.gz; then \ gzip --quiet --force /opt/gupu/yap-6.3/share/info/yap.info*; \ fi \ fi; \ /usr/sbin/install-info --quiet --section "Programming Languages" yap.info /opt/gupu/yap-6.3/share/info/dir; \ cd ../LGPL/pillow/doc ; \ /usr/bin/install -c pillow_doc.info /opt/gupu/yap-6.3/share/info; \ if test -e /opt/gupu/yap-6.3/share/info/emacs.bz2; then \ bzip2 --quiet --force /opt/gupu/yap-6.3/share/info/pillow_doc.info; \ else \ if test -e /opt/gupu/yap-6.3/share/info/emacs.gz; then \ gzip --quiet --force /opt/gupu/yap-6.3/share/info/pillow_doc.info; \ fi \ fi; \ /usr/sbin/install-info --quiet --section "Programming Languages" --entry="`cat pillow_doc.infoindex`" --info-dir=/opt/gupu/yap-6.3/share/info pillow_doc.info make[1]: Entering directory `/opt/gupu/src/yap-6.3/narch' make[1]: Nothing to be done for `info'. make[1]: Leaving directory `/opt/gupu/src/yap-6.3/narch' /usr/bin/install: target `/opt/gupu/yap-6.3/share/info' is not a directory install-info: warning: don't call programs like install-info with an absolute path, install-info: warning: /usr/sbin/install-info provided by dpkg is deprecated and will go away soon; install-info: warning: its replacement lives in /usr/bin/. This is not dpkg install-info anymore, but GNU install-info See the man page for ginstall-info for command line arguments install-info: Not a directory for /opt/gupu/yap-6.3/share/info/dir install-info: warning: don't call programs like install-info with an absolute path, install-info: warning: /usr/sbin/install-info provided by dpkg is deprecated and will go away soon; install-info: warning: its replacement lives in /usr/bin/. This is not dpkg install-info anymore, but GNU install-info See the man page for ginstall-info for command line arguments install-info: Not a directory for /opt/gupu/yap-6.3/share/info/dir make: *** [install_info] Error 1 ulrich@gupu2:/opt/gupu/src/yap-6.3/narch$ mkdir /opt/gupu/yap-6.3/share/info
?- char_code(C,0),writeq(C). ''C = ''You have two possibilities here: Either write C = '\0\' or issue a representation_error(character_code). SWI and SICStus 4 write '\000\' and '\x0\'. IF, B, GNU an error. Proceed as you like. (#225)
?- writeq(-(-1)).Expected: - -1.-(-1)yes
Here is a hopefully simple way how to deal with this. What you need is
a flag that the last thing written was - as a prefix operator. If
this is the case a nonnegative number (with no -) must be written in
round brackets.
So -(1^2)
is written as - (1)^2
.
Another way to write this would be - (1^2)
.
?- writeq(-(2^3)). -2^3yesExpected: - (1)^2 or - (1^2).
?- L = _B, length(L,2). L = [_A,_B]Expected:
L = [_A, _C]
or similar.
?- X is 1'+'1. ERROR!! TYPE ERROR- atom 1 for arithmetic expression: expected evaluable term, got 1(#130)
?- write_canonical('$VAR'(1)). Byes(#145
ulrich@gupu2:~/lftp/yap-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.2 (i686-linux): Tue Mar 6 15:46:19 CET 2012 ?- [fastunification]. % consulting /home/tour/yap-prolog/fastunification.pl... % consulted /home/tour/yap-prolog/fastunification.pl in module user, 0 msec 12824 bytes yes ?- test(A). A = 2^18-8 ? ; % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % % % PC: user:t/1 at clause 1 % Continuation: user:test/1 at clause 1 % 4608KB of Global Stack (0xb68b8008--0xb6d38154) % 0KB of Local Stack (0xb6e21e10--0xb6e22008) % 0KB of Trail (0xb6e2200c--0xb6e220ac) % Performed 7 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$$_length1/3 (512KB--0KB) % user:test/1 at clause 1 % prolog:$query/2 at clause 3 % prolog:$command/4 at clause 2 % prolog:$enter_top_level/0 at clause 5 % prolog:$catch/3 (512KB--0KB) % prolog:$system_catch/4 at clause 1 % meta-call Exiting ....
?- [user]. % consulting user_output... | intertwine([], [], []). | intertwine([E|Es], Fs, [E|Gs]) :- intertwine(Es, Fs, Gs). | intertwine(Es, [F|Fs], [F|Gs]) :- intertwine(Es, Fs, Gs). | % consulted user_output in module user, 4 msec 7136 bytes yes ?- intertwine([], [], Xs). Xs = [] ? ; noExpected: No choice point. Jekejeke is currently the only system avoiding that choice point.
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- findall(t,fail,1). ERROR!! TYPE ERROR- findall(t,user:fail,1): expected list, got 1 ?- halt. % YAP execution halted ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.1 (i686-linux): Mon Nov 14 12:58:39 CET 2011 ?- findall(t,fail,1). no ?-This is so odd, because in the source code you do the checking...
?- L=[_|L],is_list(L). loopsExpected: failure (that's what '$skip_list'/3 is about).
partial_list_or_list(Xs0) :- '$skip_list'(_, Xs0,Xs), ( Xs == [] -> true ; var(Xs) ).This could be used to check the validity of arguments rapidly. E.g. for #198, term_variables/2
?- X/* /*/=7. |: ERROR!! error(syntax_error(end_of_file_in_block_comment),stream(user_input,19,1,442))Expected:
X = 7
?- X = (:-). X = :-Expected:
X = (:-)
writeq('\033\'). '\033'yesexpected:
'\033\'
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- writeq((*)=(*)). (*)=(*)yes ?- halt. % YAP execution halted ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.1 (i686-linux): Mon Nov 14 12:58:39 CET 2011 ?- writeq((*)=(*)). * = *yes ?- halt. % YAP execution halted
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.1 (i686-linux): Sat May 28 18:49:06 CEST 2011 ?- writeq('\n'). '\n'yes ?- halt. % YAP execution halted ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.1 (i686-linux): Mon Nov 14 12:58:39 CET 2011 ?- writeq('\n'). ' 'yes
?- open('/dev/null',read,X), ground(X), atom(X). X = <stream>(0x83c6b18)
7.10.2.1 reads:
A standard-conforming program shall make no assumptions
about the form of the stream-term, except that:It is implementation dependent whether or not the pro-
- a) It is a ground term.
- b) It is not an atom.
- c) It uniquely identifies a particular stream during the
time that the stream is open.
cessor uses the same stream-term to represent different
source/sinks at different times.
'$VAR'
. The standard defines '$VAR'(X)
only for the non-negative integers. All other terms must be printed
out literally with the $VAR
around. SWI, YAP, SICStus, B, XSB do
something nonconforming. And they all do it differently. And it
cannot be fixed at all in
the presence of constraints. That's why this variable_names/1
option
is so important!
This is how Minerva does it:
?- Opts = [variable_names(_)],read_term(X,Opts), write_term(X,Opts). f(This is Nice). f(This is Nice) Opts = [variable_names(['This' = _1735,'Nice' = _1809])] X = f(_1735 is _1809)
And this is how Jekejeke does it:
?- Opts = [variable_names(_)],read_term(X,Opts), write_term(X,Opts). f(This is Nice). f(This is Nice)Opts = [variable_names(['This' = _E, 'Nice' = _F])], X = f(_E is _F)
And this is how GNU does it:
GNU Prolog 1.4.1 By Daniel Diaz Copyright (C) 1999-2012 Daniel Diaz | ?- Opts = [variable_names(_)],read_term(X,Opts), write_term(X,Opts). f(This is Nice). f(This is Nice) Opts = [variable_names(['This'=A,'Nice'=B])] X = f(A is B)
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6.3/bin/yap -f none YAP 6.3.1 (i686-linux): Mon Nov 14 12:58:39 CET 2011 ?- length(L,L). ^CAction (h for help): a no ?- length(L,L). ^CAction (h for help): a Illegal instruction
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.0 (i686-linux): Sun Apr 3 22:28:54 CEST 2011 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulting /opt/gupu/yap-6/share/Yap/hacks.yap... % reconsulted /opt/gupu/yap-6/share/Yap/hacks.yap in module yap_hacks, 0 msec 4096 bytes % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 7136 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulting /opt/gupu/yap-6/share/Yap/assoc.yap... % reconsulting /opt/gupu/yap-6/share/Yap/rbtrees.yap... % reconsulted /opt/gupu/yap-6/share/Yap/rbtrees.yap in module rbtrees, 12 msec 138376 bytes % reconsulted /opt/gupu/yap-6/share/Yap/assoc.yap in module assoc, 20 msec 156944 bytes % reconsulting /opt/gupu/yap-6/share/Yap/pairs.pl... % reconsulted /opt/gupu/yap-6/share/Yap/pairs.pl in module pairs, 0 msec 8928 bytes % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 180 msec 1411792 bytes % reconsulting /opt/gupu/yap-6/share/Yap/lambda.pl... % reconsulted /opt/gupu/yap-6/share/Yap/lambda.pl in module lambda, 0 msec 20232 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/uwnutil.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/uwnutil.pl in module uwnutil, 0 msec 18728 bytes % reconsulted /home/ulrich/.yaprc in module user, 180 msec 1487848 bytes ?- statistics. memory (total) 5521404 bytes program space 4096000 bytes: 2770360 in use, 1325640 free 0 max stack space 1228800 bytes: 525532 in use, 703268 free global stack: 525140 in use, 527356 max local stack: 392 in use, 3732 max trail stack 196604 bytes: 36 in use, 196568 free 0.000 sec. for 0 code, 0 stack, and 0 trail space overflows 0.000 sec. for 0 garbage collections which collected 0 bytes 0.000 sec. for 0 atom garbage collections which collected 0 bytes 0.184 sec. runtime 0.184 sec. cputime 0.004 sec. systime 6.717 sec. elapsed time yes ?- length(Cs,I),maplist(\C^member(C,".1e-+ "),Cs), catch(number_chars(N,Cs),error(syntax_error(E),_),false),I=8. Cs = [49,46,49,49,49,49,49,49], I = 8, N = 1.111111 ? yes ?- statistics. memory (total) 22036476 bytes program space 20611072 bytes: 13176496 in use, 7434576 free 0 max stack space 1228800 bytes: 525532 in use, 703268 free global stack: 525140 in use, 530580 max local stack: 392 in use, 3732 max trail stack 196604 bytes: 36 in use, 196568 free 0.004 sec. for 6 code, 0 stack, and 0 trail space overflows 0.000 sec. for 0 garbage collections which collected 0 bytes 0.032 sec. for 3 atom garbage collections which collected 3570134 bytes 7.944 sec. runtime 7.948 sec. cputime 0.020 sec. systime 40.116 sec. elapsed time yes
?- X is 0 div 0. ERROR!! ZERO DIVISOR ERROR- X is div 0This just looks strange.
(Writing this in C would be even better, but I fail to understand the C-code conventions in YAP). With the help of this '$skip_list'/3, setof/3 would be terminating for'$skip_list'(N, Xs0,Xs) :- ( nonvar(Xs0), Xs0 = [_|Xs1] -> '$skip_list_b'(Xs0,Xs1,Xs, Xs0, 1,0,N) ; N = 0, Xs0 = Xs ). '$skip_list_b'(Xs0,Xs1,Xs, S1, P0,La0, N) :- ( P0 == La0 -> P1 is P0<<1, La1 = 1, S2 = Xs0 ; P1 = P0, La1 is La0 + 1, S2 = S1 ), ( nonvar(Xs1), Xs1 = [_|Xs2], \+ prolog:'$eq'(Xs1,S2) -> '$skip_list_b'(Xs1,Xs2,Xs, S2, P1,La1, N) ; N is P1+La1-1, Xs1 = Xs ).
L=[t|L],setof(t,true,L).
by using:
'$partial_list_or_list'(Xs0) :- '$skip_list'(_, Xs0,Xs), ( Xs == [] -> true ; var(Xs) ).
'.'(a,[])
. Thus, list syntax is disabled. IF,
SWI, B, GNU, SICStus, Ciao do it that way. If you want
to write a term that can be read back regardless of operator
declarations but with []-syntax, simply switch off the operators.
?- writeq(-(1)). -1Expected:
- (1)
if prefix operator present. Otherwise
-(1)
. That is a bit strange, but if an operator is a
prefix operator then this has to be shown by writeq/1.
ulrich@gupu2:/opt/gupu/src/yap-6$ date ; git pull ; date Thu Jan 6 11:47:14 CET 2011 yap.dcc.fc.up.pt[0: 193.136.27.114]: errno=Connection timed out fatal: unable to connect a socket (Connection timed out) Thu Jan 6 11:50:24 CET 2011
?- set_prolog_flag(strict_iso, on). yes ?- X is 1.0E1. SYNTAX ERROR at user, near line 4: X is [] <==== HERE ====> 11.Expected: X = 10.0. The E is valid in strict mode. But it is not a good idea to have a strict mode flag - except that mode would realise 5.1e completely. (I did send a patch on this, but since patches get commented out, I better concentrate on reporting.)
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.0 (i686-linux): Fri Oct 29 15:47:45 CEST 2010 ?- current_prolog_flag(unknown,V). V = fail ?Expected:
error
?- length(_,I),X is acos(0.9 ** I), number_chars(X,Chrs), number_chars(Y,Chrs), X \== Y. Chrs = ['0','.','4','5','1','0','2','7'], I = 1, X = 0.451026811796262, Y = 0.451027 ?Expected: Infinite loop.
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.0 (i686-linux): Fri Oct 29 15:47:45 CEST 2010 ?- repeat, catch(atom_to_term(')',T,Vs),error(syntax_error(_),_),fail). ERROR at clause 1 of prolog:atom_to_term/3 !! RESOURCE ERROR- could not find a free streamExpected: Infinite loop.
?- write_canonical('/*'). /*yes ?- writeq('/*'). /*yesExpected: quoting.
History: Patch was included, but later removed by:
commit 907d10128d7e6ff26f86a3f0e4bf0919e629a84f Author: Paulo Moura <pmoura@logtalk.org> Date: Tue Nov 23 00:12:41 2010 +0000 Commented out buggy patch for supporting quote atoms starting with /* as it breaks write_canonical/1.
?- catch(read(X),error(E,_),true). |: 1 1. E = syntax_error(syntax_error(read(_A),between(21,22,5),'\n <====HERE====> \n',[number(1)-21,number(1)-22],1,22,user)) ? yes ?-The argument of syntax_error must be an atom. Further information can be provided in the second argument of error/2.
'$check_list_for_bags'(V, _) :- var(V), !. '$check_list_for_bags'([], _) :- !. '$check_list_for_bags'([_|B], T) :- !, '$check_list_for_bags'(B,T). '$check_list_for_bags'(S, T) :- '$do_error'(type_error(list,S),T).Should use '$skip_list'/3 (which is not yet present in YAP).
?- catch(setof(t,fail,[t|2]),error(E,_),true). E = type_error(list,2) ? yes ?- catch(findall(t,fail,[t|2]),error(E,_),true). E = type_error(list,2) ? ;Expected: [t|2].
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP 6.2.0 (i686-linux): Fri Oct 29 15:47:45 CEST 2010 ?- write_canonical(f(-1)). f(-1)yes ?- op(0,fy,-). yes ?- write_canonical(f(-1)). SYNTAX ERROR at user, near line 3: write_canonical( f( - <==== HERE ====> 1 ) ).Expected: same as above.
-rw-r--r-- 1 ulrich ulrich 595 2010-11-04 14:34 0001-Change-to-fy-DTC2.patch
?- X = 1. X = 1 ? ; noExpected: no interactive question - there is no choicepoint open! Most users will not enter the ; and thus will miss cases where things go astray. Take
length(L,N), N = 0.
?- term_variables(Vars, term(X)). noExpected
type_error(list,term(XC))
. This is a very
frequent beginner error. Of course most beginners are quite ashamed to
concede it. And: Well, maybe not complete beginners (they will not
use it), but lets say - oh well - they are still beginners. Also
?- Xs = [a|Xs], term_variables(T, Xs). noshould produce a type_error(list,[a|...]). Easy with the help of
'$skip_list'/3
.
'$skip_list'(Skipped, Xs0, Xs)
succeeds,
if Xs
unifies with the rest of Xs0
which
skips Skipped
elements. Either use Floyd or
even Brent
?- X*Y = * * * . X = Y = * ? yesExpected: syntax error. If a name is used not as an operator it must be bracketed. Again a source of much chagrin. IF, GNU and h do this right.
?- [:- -x] = [(:- -x)]. noExpected: syntax error. This is the source of many problems. As long as systems do not enforce this, users get hit one-by-one. Their common conclusion is that Prolog is cursed and they give up. (In the meantime SWI rejects this in ISO mode, but since this is not the default, nobody uses it.).
?- X = (*) * (*) . X = * *(*) ?Expected:
X = (*)*(*) ?BTW: GNU, h, Minerva, SWI , do this right.
number/atom_chars/codes(Number,Chars) :- ( nonvar(Number), \+ number(Number) -> throw(error(type_error(number, Number),_)) ; true ), scan_chars_to_string(Chars, String), % produces *only* type and representation errors % but not instantiation errors ( var(String) -> ( var(Number) -> throw(error(instantiation_error,_)) ; number_to_chars(Number,Chars) ) ; parse_string_into_number(String, Numberx), % produces syntax errors Numberx = Number ).A few cases are still open.
?- op(10,fx,[[a]]). % % % YAP OOOPS: tried to access illegal address 0x4f1046a7!!!!. % %
?- 7^7^7 < 7^7^7+1. noExpected: success.
ulrich@gupu2:/opt/gupu/src/yap-6/narch$ /opt/gupu/yap-6/bin/yap -f % Restoring file /opt/gupu/src/yap-6/narch/startup.yss YAP 6.0.7 (i686-linux): Sat Sep 4 22:33:20 CEST 2010 ?- [user]. % consulting user_input... | p1 :- ( var(X), X=!, X, fail ; true ). | | p2 :- call(( var(X), X=!, X, fail ; true )). | % consulted user_input in module user, 0 msec 5240 bytes yes ?- p1. yes ?- p2. noExpected yes in both cases.
?- op(1,fx,','). yesExpected: permission_error(modify, operator, ',')
There are more restrictions, see the other new errors in DTC2
?- catch(X is-1**1.5,error(E,_),true). X = (nan) ?Expected:
E = evaluation_error(undefined)
?- number_chars(1,[1]). SYNTAX ERROR at "#x0001;", goal number_chars(1,[1]): expected_number_syntax
?- Xs=[a|Xs],atom_chars(A,Xs).Loops and eats memory. Expected:
type_error(list,[a| ...])
.
?- current_op(Pri,Fix,xor).Expected: Failure. It is really better not to define this as an operator. Every name declared as operator makes Prolog syntax more unstable for two reasons: The precedence is not intuitive, so extra round brackets are needed anyway. Extra brackets are needed for a term like [xor-a]. I.e. [(xor)-a].Fix = yfx, Pri = 400 ? ; no
?- catch(X is acos(2),error(E,_),true). E = domain_error(out_of_range,2) ?Expected: evaluation_error(undefined). Same for asin/1. If you want to transmit more information, you would need to add this in the second argument of error/2.
?- X is xor(2,3). ERROR!! TYPE ERROR- functor xor/2 for arithmetic expression: expected evaluable term, got 2 xor 3/2
?- X is -1 div 2. X = 0 ? yes ?- X is floor(-1/2). X = -1 ? ; no ?- X is truncate(-1/2). X = 0 ? ; no(div)/2 shall use the same rounding function as (mod)/2 does and that is floor/1 and not truncate/1 (as (//)/2 and (rem)/2 do).
?- X is -1 mod 3. X = 2 ? ; no ?- X is -1 rem 3. X = -1 ? yes ?- current_prolog_flag(integer_rounding_function,X). X = down ? ; no ?-Expected X = toward_zero.
(mod)/2
is correct.
And (rem)/2
behaves differently (and correctly too!). If
the Prolog flag
integer_rounding_function
(7.11.1.4)
is down
, the Integer division rounding function (9.1.3.1)
called rndI(x) is equal to ⌊x⌋ and
that would means that (rem)/2
should be defined in exactly the
same way as (mod)/2
is defined.
In other words: integer_rounding_function
with
value down simply does not make sense as it makes
(rem)/2 and (mod)/2 the same function, as well as (//)/2 and (div)/2.
Don't ask, why it is here. It was there even in the first draft (N92
of 1992). All systems I know of, implement (//)/2 like toward_zero/2.
?- catch(X is foo-77,Pat,true). Pat = error(type_error(evaluable,foo),['atom foo for arithmetic expression'|local_sp(268636712,268789140,[],[])]) ? yesExpected:
Pat = error(type_error(evaluable,foo/0), ...
?- X is 7^7^7. 2343 ? 1751580402966282378932933502849310357073612870132 yes ?- X is 7^7^7. ... 32343 ? 20286961175158040296628237893293350284931035707361287013 yesExpected
... X = 3759...0132343.
?- catch(open(f,read,x),Pat, true). Pat = error(type_error(variable,x),[open(f,read,x)|local_sp(open(f,read,x),268788916,[],[])]) ? ; noExpected:
error(uninstantiation_error(x), ...)
permission_error(create,
operator, Op)
for
Op == '[]'
Op == '{}'
Op == ('|'), Fix \== xfx, Fix \== xfy, Fix \== yfx
thus no infix.
Op == ('|'), Priority < 1001
?- freeze(X, false). freeze(X,user:false) ? ; no ?- \ freeze(X, false). true ? ; no
?- X = s(X), setof(t,X=X,Ts). ((loops))Expected: Ts = [t].
?- setof(t,findall(t,true,[t],[]),[t]). true.YAP:
?- setof(t,findall(t,true,[t],[]),[t]). no
?- call(((C=!;C=true), C)). C = !.
ulrich@gupu2:~/iso-prolog$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version 6.0.4 ?- op(100,xfx,[[]]). % % % YAP OOOPS: tried to access illegal address 0x22101ae4!!!!. % % 1132KB of Code Space (0x10000000--0x1011b210) % % PC: prolog:$op2/3 at clause 2 % Continuation: prolog:$opl/4 at clause 2 % 512KB of Global Stack (0x1012e000--0x101ae0dc) % 0KB of Local Stack (0x101f5e5c--0x101f6000) % 0KB of Trail (0x101f6004--0x101f601c) % Performed 0 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$opl/4 at clause 2 % prolog:$do_yes_no/2 at clause 2 % prolog:$yes_no/2 at clause 1 % prolog:$command/4 at clause 2 % prolog:$enter_top_level/0 at clause 6 % prolog:$catch/3 (512KB--0KB) % prolog:$system_catch/4 at clause 1 % meta-call Exiting ....
?- op(10,xfy,'|'). yes ?- X = [a|b|c]. X = [a '|' b '|' c] ? yes ?- X = [a|b]. X = [a '|' b] ?Expected: List syntax must never be affected by operator declarations. Thus [a|b] is always the same regardless of declarations for '|', a, b!
[user] ?- exception_handler(arg(a,f(1),_), error(type_error(_,_),_), fail).Permitting an arbitrary goal. Not clear what the context of exception/3 is, but that might make it more general...
?- X is 7^7^7. ERROR!! RESOURCE ERROR- not enough stack ?-This works in SWI out-of-the-box.
?- setup_call_catcher_cleanup(true,repeat, C,write(c(C))), throw(xx). c(fail) ERROR!!
ulrich@gupu2:/opt/gupu/src/yap-6/narch$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/src/yap-6/narch/startup.yss YAP version 6.0.0 ?- setup_call_cleanup(true, X=true,X). ERROR!! PERMISSION ERROR- use_module(ypp): cannot read from ypp
ulrich@gupu2:/opt/gupu/src/yap-6/narch$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/src/yap-6/narch/startup.yss YAP version 6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulting /opt/gupu/yap-6/share/Yap/hacks.yap... % reconsulted /opt/gupu/yap-6/share/Yap/hacks.yap in module yap_hacks, 0 msec 4080 bytes % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 7216 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 108 msec 830888 bytes % reconsulting /home/ulrich/ftp/Prolog-inedit/lambda.pl... ERROR!! (/home/ulrich/ftp/Prolog-inedit/lambda.pl:96). PERMISSION ERROR- in line 96, system predicate ^/3: modifying static procedure (^)/3 ERROR!! (/home/ulrich/ftp/Prolog-inedit/lambda.pl:98). PERMISSION ERROR- in line 98, system predicate ^/4: modifying static procedure (^)/4 % reconsulted /home/ulrich/ftp/Prolog-inedit/lambda.pl in module lambda, 4 msec 22304 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/uwnutil.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/uwnutil.pl in module uwnutil, 0 msec 17888 bytes % reconsulted /home/ulrich/.yaprc in module user, 112 msec 900264 bytes ?- write_canonical((1;2|3;4)). '|'(;(1,2),;(3,4))yes ?- maplist(1,Xs,Ys,Zs). Xs = Ys = Zs = [] ? ; ERROR at clause 1 of prolog:call/4 !! TYPE ERROR- call/1: expected callable goal, got maplist:user:1 ?- maplist(1,Xs,Ys,Zs). Xs = Ys = Zs = [] ? yes ?- setup_call_cleanup(true, X=true,X). ERROR!! INSTANTIATION ERROR- setup_call_catcher_cleanup(user:true,user:(_131279=true),_131270,user:_131279): expected bound value ?- setup_call_cleanup(true, (X=1;X=2), write(a)), setup_call_cleanup(true,(Y=1;Y=2),write(b)), !. X = Y = 1 ? ; no ?- setup_call_cleanup(true, (X=1;X=2), write(a)), setup_call_cleanup(true,(Y=1;Y=2),write(b)), !. X = Y = 1 ? ; no ?- ulrich@gupu2:/opt/gupu/src/yap-6/narch$Expected: The cleanups should write.
?- current_op(Pri,Fix, '|'). Fix = xfy, Pri = 1105 ? ; no ?- current_op(Pri,Fix, ;). Fix = xfy, Pri = 1100 ? ; no ?- write_canonical((1;2|3;4)). ;(1,'|'(2,;(3,4)))yesExpected:
'|'(;(1,2),;(3,4)).
?- setup_call_cleanup(S=1,(G=2;G=3,throw(x)),write(S+G)). G = 2, S = 1 ? ; 1+_1312781+_131278 ERROR!! UNHANDLED EXCEPTION - message x unknownExpected: only one +
?- setup_call_cleanup(true, X=true,X). X = true ?Expected: Instantiation error prior to calling Goal.
?- setup_call_cleanup(true, (X=1;X=2), write(a)), setup_call_cleanup(true,(Y=1;Y=2),write(b)), !. abX = Y = 1 ?According to current draft, it should be
ba
- but this
might be a case which is currently overspecified.
ulrich@gupu2:/opt/gupu/src/yap-6/narch$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/src/yap-6/narch/startup.yss YAP version 6.0.0 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 108 msec 828720 bytes yes ?- X in 1..2, p(X). ERROR!! EXISTENCE ERROR- procedure p/1 is undefined, called from context prolog:$enter_top_level/0 Goal was user:p(_D195) ?- current_op(Pri,Fix,'|'). Fix = xfy, Pri = 1100, _A in 1..2 ?That problem was already present some time ago...
?- current_op(Pri,Fix,'|'). Fix = xfy, Pri = 1105, _A in 1..2, _B in 1..2 ?
?- setup_call_cleanup(true, (X=1;X=2), write(a)), setup_call_cleanup(true,(Y=1;Y=2),write(b)), throw(x). b ERROR!! UNHANDLED EXCEPTION - message x unknownExpected: output ba then error x. See 7.8.11.1 c
c) The
cleanup handler is called exactly once; no later than upon failure
of G
. Earlier moments are ...
And also d for the exact order:
Several cleanup goals triggered simultaneously are executed in reversed order of installation.
?- X = (+) + (+) . X = (+)+ + ?This is invalid Prolog text. Expected:
(+)
. It's ok to
be permissive when reading text, but when writing terms, the standard
should be obeyed to guarantee portability of generated text between
different
systems. Change
in SWI.
?- current_op(Pri,Fix,'|'). Fix = xfy, Pri = 1100 ? ; noExpected:
?- current_op(Pri,Fix,'|'). Pri = 1105, Fix = xfy ; false.This makes CHR and other commit-like uses of '|' possible. Usual uses of | in DCGs should not be affected by it. See for context information. In general SWI is much too permissive in syntax. But
ulrich@gupu2:/opt/gupu/src/yap-6/narch$ /opt/gupu/yap-6/bin/yap -f none % Restoring file /opt/gupu/src/yap-6/narch/startup.yss YAP version 6.0.0 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 96 msec 830528 bytes yes ?- X in 1..2, p(X). % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 2244KB of Code Space (0x10000000--0x102311f0) % % PC: prolog:print_message/2 at clause 3 % Continuation: prolog:$LoopError/2 at clause 2 % 4352KB of Global Stack (0x1031e2e8--0x1075e36c) % -1698452KB of Local Stack (0x107622e8--0xa8cbd000) % 0KB of Trail (0xa8cbd004--0xa8cbd044) % Performed 1 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$LoopError/2 at clause 2 % prolog:$LoopError/2 at clause 2 % meta-call Exiting .... ulrich@gupu2:/opt/gupu/src/yap-6/narch$
?- open('/dev/null',read,S,[eof_action(error)]), stream_property(S,eof_action(Action)), get_code(S, C1), get_code(S,C2). Action = eof_code, C1 = C2 = -1, S =H '$stream'(3) ? yes
?- subsumes(X, f(X)). X = f(f(**)) ? ; ?- subsumes(g(X), g(f(X))). X = f(f(**)) ? yesAccording to Pasadena resolution this should fail! SICStus 3 succeeds for the first but fails for the second. SWI fails for both (as specified).
-rw-r--r-- 1 ulrich ulrich 885 2009-10-04 00:00 0001-typo.patch.sent -rw-r--r-- 1 ulrich ulrich 850 2009-10-04 00:00 0002-Doc-Corrected-ISO-status.patch.sent -rw-r--r-- 1 ulrich ulrich 983 2009-10-04 00:49 0003-Doc-ISO-status-added.patch.sent
?- setup_call_cleanup(true,throw(x),1). ERROR!! UNHANDLED EXCEPTION - message x unknown ?- 1. ERROR!! TYPE ERROR- meta_call((?-1)): expected callable goal, got 1 ?-Expected: A type error callable prior to calling the Goal.
g3:/opt/gupu/src/yap-6/arch> git describe && yap-6 -f none Yap-6.0.0.0-266-g40ea33c % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 ?- setup_call_cleanup(true, (X=1;X=2), write(a)), setup_call_cleanup(true,(Y=1;Y=2),write(b)), throw(x). % % % YAP OOOPS: tried to access illegal address 0x10!!!!. % % 2056KB of Code Space (0x2000000--0x22021b0) % % PC: prolog:$clean_call/2 at clause 1 % Continuation: prolog:$execute_frozen_goals/1 at clause 2 % 1024KB of Global Stack (0x225c000--0x235c180) % 0KB of Local Stack (0x23ebd78--0x23ec000) % 0KB of Trail (0x23ec008--0x23ec148) % Performed 0 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$execute_frozen_goals/1 at clause 2 % prolog:$execute_frozen_goals/1 at clause 2 % prolog:$wake_up_goal/2 at clause 1 % prolog:$handle_throw/3 (1024KB--0KB) % prolog:$query/2 at clause 4 Exiting .... g3> uname -a Linux g3 2.6.18perfctr #1 SMP Fri May 4 16:10:13 CEST 2007 x86_64 GNU/LinuxStill here: 2009-09-17 Yap-6.0.0.0-279-g8bde2a0
g3:~> yap-6 -f none -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- setup_call_cleanup((X=1;X=2),true,true). X = 1 ? ; X = 2 ? ; no
?- [user]. | ax :- ( b -> c ; d -> e ; f ). | yes % debug ?- listing(ax). ax :- ( b -> c ; ( d -> e ) ; f ). yesSWI makes
ax :- ( b -> c ; d -> e ; f ).I understand you have a different convention, but the inner parentheses are superfluous.
/home/ulrich/lftp/yap-prolog $ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- [item138]. % consulting /home/tour/yap-prolog/item138.pl... % consulted /home/tour/yap-prolog/item138.pl in module user, 0 msec 1472 bytes yes ?- trace. % Trace mode on. yes % trace ?- \1^2. (1) call:\1^2 ? (2) call:copy_term_nat(1^2,_131193) ? (2) exit:copy_term_nat(1^2,1^2) ? (3) call:no_hat_call(user:1^2) ? (4) call:write(user:1^2) ? user:1^2 (4) exit:write(user:1^2) ? (5) call:nl ? (5) exit:nl ? (6) call:throw(error(representation_error(lambda_parameters),_131661)) ? ERROR!! error(representation_error(lambda_parameters),'') (6) exception:throw(error(representation_error(lambda_parameters),_131661)) ? (3) redo:no_hat_call(user:1^2) ? (3) fail:no_hat_call(user:1^2) ? (1) redo:\1^2 ? (1) fail:\1^2 ? no % trace ?- | notrace. (1) call:notrace ? % Debug mode off. (1) exit:notrace ? yes % debug ?- \1^2. (1) call:\1^2 ? a % YAP execution aborted ?- notrace. % Debug mode off. yes ?- \1^2. user:user:1^2 user:user:1^2Claim to be fixed - too difficult to do now
(5) exit: lambda:nl ? (6) call: lambda:lambda:1^2=_131589:_131590 ? (6) exit: lambda:lambda:1^2=lambda:1^2 ?
?- copy_term_nat(Bigterm^Extra,Bigterm^Copia).
I.e. an
ideal copy_term does not only copy fast and sharingly, but also would
read the second argument in order to detect identity.
The traditional approach copies cleverly into a free variable, but
performs the remaining as naive unification.
?- [ulrich@gupu item133]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0it should read:
YAP version Yap-6.0.0.0-160-ga22f66a
[ulrich@gupu item133]$ pl -f none Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.7.10) Copyright (c) 1990-2009 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). ?- use_module(nihil). % library(error) compiled into error 0.01 sec, 10,060 bytes % library(apply) compiled into apply 0.01 sec, 16,400 bytes % nihil compiled into nihil 0.01 sec, 17,120 bytes true. ?- % halt [ulrich@gupu item133]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- use_module(nihil). % reconsulting /home/tour/yap-prolog/item133/nihil.pl... % reconsulting /opt/gupu/yap-6/share/Yap/apply.yap... % reconsulting /opt/gupu/yap-6/share/Yap/apply_macros.yap... % reconsulting /opt/gupu/yap-6/share/Yap/maplist.yap... % reconsulting /opt/gupu/yap-6/share/Yap/error.pl... % reconsulting /opt/gupu/yap-6/share/Yap/lists.yap... % reconsulted /opt/gupu/yap-6/share/Yap/lists.yap in module lists, 10 msec 15552 bytes % reconsulted /opt/gupu/yap-6/share/Yap/error.pl in module error, 20 msec 32656 bytes % reconsulted /opt/gupu/yap-6/share/Yap/maplist.yap in module maplist, 40 msec 49968 bytes % reconsulting /opt/gupu/yap-6/share/Yap/expand_macros.yap... % reconsulting /opt/gupu/yap-6/share/Yap/charsio.yap... % reconsulted /opt/gupu/yap-6/share/Yap/charsio.yap in module charsio, 10 msec 5904 bytes % reconsulting /opt/gupu/yap-6/share/Yap/occurs.yap... % reconsulting /opt/gupu/yap-6/share/Yap/arg.yap... % reconsulted /opt/gupu/yap-6/share/Yap/arg.yap in module arg, 10 msec 2584 bytes % reconsulted /opt/gupu/yap-6/share/Yap/occurs.yap in module occurs, 10 msec 6792 bytes % reconsulted /opt/gupu/yap-6/share/Yap/expand_macros.yap in module expand_macros, 50 msec 61688 bytes % reconsulted /opt/gupu/yap-6/share/Yap/apply_macros.yap in module apply_macros, 90 msec 122704 bytes ERROR!! (/opt/gupu/yap-6/share/Yap/apply.yap:32). DOMAIN ERROR- reexport(library(apply_macros),[maplist/3,include/3,exclude/3,partition/4,partition/5]): maplist/3 not a valid element for module_reexport_predicates % reconsulted /opt/gupu/yap-6/share/Yap/apply.yap in module apply, 90 msec 134048 bytes % reconsulted /home/tour/yap-prolog/item133/nihil.pl in module nihil, 90 msec 135032 bytes yes ?-This problem must be recent. A version of 2009-05-04 does not have this problem. (unfortunatly binaries do not have a better banner...)
[ulrich@gupu item133]$ make **** 2vitor: first, the difference between the inputs: diff inputa.txt inputb.txt 2a3,4 > maplist(_+_, Xs). > make: [diff] Error 1 (ignored) **** 2vitor: now, the good input yap-6 -f none < inputa.txt % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/tour/yap-prolog/item133/clpfd.pl... % reconsulted /home/tour/yap-prolog/item133/clpfd.pl in module clpfd, 180 msec 337216 bytes yes % reconsulting /home/tour/yap-prolog/item133/uwnutil.pl... % reconsulted /home/tour/yap-prolog/item133/uwnutil.pl in module uwnutil, 0 msec 1904 bytes yes Xs = [] ? Xs = [_A], dif(_A,X) ? yes **** 2vitor: and now the bad input, there is only one additional line yap-6 -f none < inputb.txt % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/tour/yap-prolog/item133/clpfd.pl... % reconsulted /home/tour/yap-prolog/item133/clpfd.pl in module clpfd, 190 msec 337216 bytes yes % reconsulting /home/tour/yap-prolog/item133/uwnutil.pl... % reconsulted /home/tour/yap-prolog/item133/uwnutil.pl in module uwnutil, 0 msec 1904 bytes yes Xs = [] ? yes Xs = [] ? ERROR!! EXISTENCE ERROR- procedure dif/3 is undefined, called from context prolog:$command/4 Goal was user:dif(_131452,_131453,_131453)
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- set_prolog_flag(unknown,error). yes ?- maplist(=(X),Xs). ERROR!! EXISTENCE ERROR- procedure maplist/2 is undefined, called from context prolog:$enter_top_level/0 Goal was user:maplist(=(_131211),_131209) ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 410 msec 815432 bytes yes ?- maplist(=(X),Xs). Xs = [] ?
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- current_op(A,xfx,cis_lt). no ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 400 msec 815880 bytes yes ?- current_op(A,xfx,cis_lt). A = 700 ? yes ?-Expected: Also the last goal should fail.
647 /tmp/gupu/src/git-1.6.3.2/git clone git://yap.dcc.fc.up.pt/yap-6 648 cd yap-6/ 649 ls 650 mkdir t100 651 mkdir t1000 652 cd t1000 653 ../configure --prefix /tmp/gupu/yap-6 --with-gmp --enable-couroutining 654 gmake 655 gmake -j40 656 gmake 657 history bash-3.00$ gmake gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../packages/MYDDAS ../C/exec.c -o exec.o ../C/exec.c: In function 'clean_trail': ../C/exec.c:1498: error: 'HBREG' undeclared (first use in this function) ../C/exec.c:1498: error: (Each undeclared identifier is reported only once ../C/exec.c:1498: error: for each function it appears in.) gmake: *** [exec.o] Error 1
?- length(_,N),time_out((between(1,100,_),open('/dev/null',read,S),call_cleanup(true,close(S)),false),100,F), time_out((between(1,100),fail),10,FX). Action (h for help): a Action (h for help): a ERROR!! INSTANTIATION ERROR- close(_128): expected bound valueBut also:
?- length(_,N),time_out((between(1,100,_),open('/dev/null',read,S),call_cleanup(true,close(S)),false),100,F), time_out((between(1,100),fail),10,FX). Action (h for help): a % ERROR WITHIN ERROR: tried to access illegal address 0x4200!!!! 186.480u 43.230s 4:16.04 89.7% 0+0k 0+0io 477pf+0w
?- length(_,N),time_out((between(1,100,_),open('/dev/null',read,S),call_cleanup(true,close(S)),false),100,F), time_out((between(1,100),fail),10,FX). Action (h for help): a % % % YAP OOOPS: tried to access illegal address 0x8!!!!. % % 1972KB of Code Space (0x2000000--0x21ed1e0) % % PC: prolog:$execute_woken_system_goal/1 at clause 1 % Continuation: prolog:$execute_woken_system_goal/1 at clause 1 % 518KB of Global Stack (0x221e000--0x229f848) % 1KB of Local Stack (0x22e5b00--0x22e6000) % 0KB of Trail (0x22e6004--0x22e60d4) % Performed 0 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % Exiting ....
:-
on_signal('prolog:gc', _, pio:my_gc).
( echo 'use_module(library(clpfd)).';echo 'load_foreign_files([plstream], [], initIO).' )| yap-6 -f Segmentation faulton gupu and g3
Prolog text | YAP | SWI | SICStus |
Default operators | |||
---|---|---|---|
(a|b). | '|'(a,b). | '|'(a,b). | ;(a,b). |
f(a|b). | error | f('|'(a,b)). | error |
f(a|b,c). | error | f('|'(a,b),c). | error |
f((a|b)). | f('|'(a,b)). | f('|'(a,b)). | f(;(a,b)) |
f(|). | error | f('|'). | error |
f((|)). | error | f('|'). | error |
'|'. | '|'. | '|'. | '|'. |
[|]. | error | ['|']. | error |
[a|b|c]. | error | [a|'|'(b,c)]. | error |
[a|b,c]. | error | [a|','(b,c)]. | error |
(1;2|3;4). | ;(1,'|'(2,;(3,4))). | '|'(;(1, 2), ;(3, 4)). | ;(1,;(2,;(3,4))). |
current_op(A,xfy,'|'). | A = 1100. | A = 1105. | no |
current_op(A,xfy,;). | A = 1100. | A = 1100. | A = 1100. |
With op(0,xfy,'|'), op(1100,fx,'|'), op(0,xfy,;), op(1100,fx,;). | |||
|1. | error | '|'(1). | error |
'|'1. | '|'(1). | '|'(1). | '|'(1). |
||. | error | '|'('|'). | error |
;1. | ;(1). | ;(1). | ;(1). |
;;. | ;(;). | ;(;). | ;(;). |
?- call_cleanup(length(L,N),C). L = [], N = 0In SICStus 3 there is:
| ?- call_cleanup(length(L,N),C). ! Instantiation error in argument 2 of call_cleanup/2 ! goal: call_cleanup(user:length(_79,_80),user:_77)On the other hand:
| ?- call_cleanup(length(L,N),(C,C)). L = [], N = 0 ?The motivation for the instantiation error is: We will get the instantiation error every time determinacy cannot be detected (i.e. every time in an imperfect implementation). It is therefore safer to issue the error in advance. There are cases where this is too eager, but those cases will always depend on the effectiveness to remove choice points. It will thus depend on an implementation dependent feature never discussed in 13211-1. (i.e., there is the notion of choicepoint which is sometimes created and sometimes not, but there is no provision for a mechanism for implicit removal - as performed by indexing) E.g.
?- call_cleanup(C = true, C). C = true ? ; noOn a less efficient, but otherwise completely complying implementation this would be executed as
?- call_cleanup(( C = true ; false ), C). C = true ? ; ERROR at clause 1 of prolog:'$clean_call'/2 !! INSTANTIATION ERROR- call/1: expected bound valueClearly, such problems are difficult to locate - if they only occur at the end.
:- meta_predicate p/1.Should produce a warning. (The warning can only be caused by
p
- after all this could be a
meta_predicate declaration for a predicate (/)/2.
...System predicates belong to the module @code{primitives}...
[ulrich@gupu ~]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulting /opt/gupu/yap-6/share/Yap/hacks.yap... % reconsulted /opt/gupu/yap-6/share/Yap/hacks.yap in module yap_hacks, 0 msec 4080 bytes % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 7104 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 410 msec 816824 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/pio.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/pio.pl in module pio, 10 msec 23048 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/item80.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/item80.pl in module user, 0 msec 7792 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/timeout_granularity.pl... % Warning: (/home/ulrich/ftp/yap-prolog/library/timeout_granularity.pl:15). % Singleton variable I in user:run/0, clause 1. % reconsulted /home/ulrich/ftp/yap-prolog/library/timeout_granularity.pl in module user, 0 msec 6208 bytes % reconsulted /home/ulrich/.yaprc in module user, 430 msec 892208 bytes ?- fac(N,F), fac(M,F), N > 7. F = 40320, M = N = 8 ? ; F = 362880, M = N = 9 ? ; F = 3628800, M = N = 10 ? ; F = 39916800, M = N = 11 ? ; F = 479001600, M = N = 12 ? ; F = 6227020800, M = N = 13 ? ; Action (h for help): a % % % YAP OOOPS: tried to access illegal address 0x8!!!!. % % 9004KB of Code Space (0x2000000--0x28cb1d0) % % PC: clpfd:fd_get/3 at clause 1 % Continuation: clpfd:fd_get/3 at clause 1 % 3228KB of Global Stack (0x31ef000--0x3516038) % 1KB of Local Stack (0x3ab6b44--0x3ab7000) % 11375KB of Trail (0x3ab7004--0x45d2c08) % Performed 1031 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % Exiting .... 1001.580u 0.680s 43:06.73 38.7% 0+0k 0+0io 504pf+0w [ulrich@gupu ~]$
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../packages/MYDDAS -I../include ../library/yap2swi/yap2swi.c -o yap2swi.o ../library/yap2swi/yap2swi.c:945: warning: no previous prototype for âOsErrorâ ../library/yap2swi/yap2swi.c: In function âPL_eval_expression_to_int_64_exâ: ../library/yap2swi/yap2swi.c:2222: error: invalid storage class for function âSWI_ctimeâ ../library/yap2swi/yap2swi.c:2222: warning: no previous prototype for âSWI_ctimeâ ../library/yap2swi/yap2swi.c:2247: error: static declaration of âYap_swi_installâ follows non-static declaration ../library/yap2swi/yap2swi.c:2243: error: previous declaration of âYap_swi_installâ was here ../library/yap2swi/yap2swi.c:2249: error: expected declaration or statement at end of input make: *** [yap2swi.o] Error 1 g3:/opt/gupu/src/yap-6/arch> history ... 95 12:15 make clean 96 12:15 history 97 12:15 ../configure --prefix /opt/gupu/yap-6 --with-gmp --enable-couroutining && make clean && make depend && cd packages/PLStream && make depend 98 12:16 cd ../.. 99 12:16 make 100 12:17 history
[ulrich@gupu library]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- freeze(X,false),throw(ex(X)). ERROR!! UNHANDLED EXCEPTION - message ex(_D1) unknown ?- true. freeze(_A,user:false) ?It is essential that the exception contains a variable with frozen goals.
g3:/opt/gupu/src/yap-6/arch> yap-6 -f Segmentation fault(I confused the options with SICStus, indeed. But still this does not make a good impression)
[ulrich@gupu docs]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- use_module(library(timeout)). % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulting /opt/gupu/yap-6/share/Yap/hacks.yap... % reconsulted /opt/gupu/yap-6/share/Yap/hacks.yap in module yap_hacks, 10 msec 2768 bytes % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 10 msec 4904 bytes yes ?- time_out((repeat,fail),100,R). Virtual time alarm [ulrich@gupu docs](same on gupu, g3)
The i.d.b. is implemented as a set of terms, accessed by keys that...is unreadable. And I don't know how to correct that.
?- call_cleanup(between(1,2,I),between(10,11,K)). I = 1, freeze(_A,user:'$clean_call'(_B,user:between(10,11,K))) ?
[ulrich@gupu library]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- abc Action (h for help): ap): % YAP execution abortedFor reproduction: I type abc RETURN C-c a RETURN
?- swi_open(a,read,S),swi_close(S),swi_close(S). noexistence error expected according to 13211-1:8.11.6.3f
../configure --prefix /opt/gupu/yap-6 --with-gmp --enable-couroutining && make clean && make depend && cd packages/PLStream && make depend
?- swi_open(a,read,S),swi_stream_property(S, position(P)),swi_close(S),swi_set_stream_position(S,P). LOOPSExpected: Some nice error. Preferably an existence error existence_error(stream, S_or_a) per analogiam 13211-1:8.11.3.3c.
?- setup_call_cleanup(true, (writeln(hic),freeze(X,writeln(nunc(X))),X=true), writeln(finis(X))). hic finis(_D4) nunc(true) X = true ?Expected: nunc before finis:
hic nunc(true) finis(true)
[ulrich@gupu yap-prolog]$ yap-6 -g 'write(now),nl,time_out(true,12345,R),write(ende),nl,halt.' % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2336 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 380 msec 817144 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/pio.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/pio.pl in module pio, 0 msec 23464 bytes % reconsulted /home/ulrich/.yaprc in module user, 400 msec 868776 bytes now ERROR!! EXISTENCE ERROR- procedure virtual_alarm/3 is undefined, called from context prolog:$call/4 Goal was yap_hacks:virtual_alarm([12|345000],throw(time_out),_111)
[ulrich@gupu yap-prolog]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2336 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 400 msec 817168 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/pio.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/pio.pl in module pio, 10 msec 23472 bytes % reconsulted /home/ulrich/.yaprc in module user, 420 msec 868824 bytes ?- swi_open(a,read,S),swi_read_pending_input(S,"a",""),swi_at_end_of_stream(S), swi_stream_property(S, position(Pos)),swi_set_stream_position(S, Pos). yap-6: ../../../packages/PLStream/pl-file.c:3520: pl_stream_property_va: Assertion `0' failed. Abort (core dumped)Simpler reproduction:
?- swi_open(a,read,S),swi_stream_property(S, position(Pos)). yap-6: ../../../packages/PLStream/pl-file.c:3520: pl_stream_property_va: Assertion `0' failed. Abort (core dumped)
[ulrich@gupu yap-prolog]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 10 msec 2168 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 360 msec 817144 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/pio.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/pio.pl in module pio, 10 msec 23472 bytes % reconsulted /home/ulrich/.yaprc in module user, 380 msec 855480 bytes ?- load_foreign_files([plstream], [], initIO). yes ?- swi_open(a,read,S),swi_read_pending_input(S,"a",""),swi_read_pending_input(S,Xs0,Xs). yap-6: error while loading shared libraries: /opt/gupu/yap-6/lib/Yap/plstream.so: undefined symbol: S__checkpasteeofExpected Xs0 = Xs.
[ulrich@gupu yap-prolog]$ echo -n a > a [ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- load_foreign_files([plstream], [], initIO). yes ?- swi_open(a,read,S),swi_read_pending_input(S,"a",""). % % % YAP OOOPS in USER C-CODE: tried to access illegal address 0x613!!!!. % % 1436KB of Code Space (0x2000000--0x21671d0) % % PC: meta-call % Continuation: prolog:$query/2 at clause 4 % 512KB of Global Stack (0x217f000--0x21ff0f0) % 0KB of Local Stack (0x225fe80--0x2260000) % 0KB of Trail (0x2260004--0x2260048) % Performed 1 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$query/2 at clause 4 % prolog:$query/2 at clause 4 % prolog:$command/4 at clause 2 % prolog:$enter_top_level/0 at clause 6 % prolog:$catch/3 (512KB--0KB) % prolog:$system_catch/4 at clause 1 % meta-call
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- swi_open(a,read,S),swi_read_pending_input(S,"a",""). no ?- load_foreign_files([plstream], [], initIO). yes ?- swi_open(a,read,S),swi_read_pending_input(S,"a",""). yap-6: error while loading shared libraries: /opt/gupu/yap-6/lib/Yap/plstream.so: undefined symbol: allocList [ulrich@gupu yap-prolog]$
[ulrich@gupu arch]$ make (cd packages/PLStream; make) make[1]: Entering directory `/opt/gupu/src/yap-6/arch/packages/PLStream' gcc -c -DBP_FREE -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -I../../../packages/PLStream -I../.. -I../../../packages/PLStream/../../include -I../../../packages/PLStream/uxnt -shared -fPIC ../../../packages/PLStream/pl-os.c -o pl-os.o ../../../packages/PLStream/pl-os.c:284: conflicting types for `PL_clock_wait_ticks' ../../../packages/PLStream/pl-incl.h:551: previous declaration of `PL_clock_wait_ticks' ../../../packages/PLStream/pl-os.c: In function `System': ../../../packages/PLStream/pl-os.c:2207: warning: function declaration isn't a prototype ../../../packages/PLStream/pl-os.c:2208: warning: function declaration isn't a prototype make[1]: *** [pl-os.o] Error 1 make[1]: Leaving directory `/opt/gupu/src/yap-6/arch/packages/PLStream' make: *** [all] Error 2 [ulrich@gupu arch]$ git describe Yap-6.0.0.0-93-g28f593f [ulrich@gupu arch]$
[ulrich@gupu ~]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- load_foreign_files([plstream], [], initIO). yes ?- open('/etc/passwd',read,S),swi_set_stream(S, buffer_size(10)). % % % YAP OOOPS in USER C-CODE: tried to access illegal address 0x1f!!!!.I admit, this is partially my error. (I should use swi_open/3). But you should detect this somehow.
?- catch(swi_open(A,B,C),Pat,true). Pat = error(instantiation_error,context(_A,_B)) ? yes
[ulrich@gupu ~]$ strace yap-6 -f -g 'use_module(library(timeout)), write(now),nl,time_out(true,12345,R),write(ende),nl,halt.' ... write(1, "now\n", 4now ) = 4 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={12, 345000}}, {it_interval={0, 0}, it_value={0, 0}}) = 0 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={12, 350000}}) = 0 write(1, "ende\n", 5ende ) = 5While SICStus uses:
[ulrich@gupu ~]$ strace sicstus -f --goal 'use_module(library(timeout)), write(now),nl,time_out(true,12345,R),write(ende),nl,halt.' write(1, "now\n", 4now ) = 4 times({tms_utime=7, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 506157 rt_sigaction(SIGVTALRM, {0x400db8c0, [], 0x4000000}, {SIG_IGN}, 8) = 0 setitimer(ITIMER_VIRTUAL, {it_interval={0, 0}, it_value={12, 350000}}, NULL) = 0 setitimer(ITIMER_VIRTUAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={12, 360000}}) = 0 times({tms_utime=7, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 506157 write(1, "ende\n", 5ende ) = 5
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- load_foreign_files([plstream], [], initIO). PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 yes ?- swi_open(A,B,C). % % % YAP OOOPS in USER C-CODE: .Expected: Instantiation error.
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- load_foreign_files([plstream], [], initIO). PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 yes ?- swi_open('/dev/null',read,B), swi_stream_property(B,position(Pos)), swi_set_stream_position(B,Pos). HANGSExpected: success.
?- Goal = (garbage_collect, statistics, Goal), Goal.One line is strange:
62.880 sec. for 0 garbage collections which collected 26920 bytesThere, the 0 does not move.
?- [user]. | :- meta_predicate f(:). | f(1). | yesExected:
% Warning: (user_input:6). % Always failing clause due to meta argument 1 in user:f/1, clause 1.
consult.yap:55: '$do_error'(domain_error(unimplemented_option,Opt),Call).That does not make sense. representation_error would be better.
non_empty_listmessages.yap:315:domain_error(not_empty_list, Opt) --> !,
?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false.Sometimes when pressing C-c the prompt is not offered.
[ulrich@gupu docs]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulting /opt/gupu/yap-6/share/Yap/hacks.yap... % reconsulted /opt/gupu/yap-6/share/Yap/hacks.yap in module yap_hacks, 10 msec 4080 bytes % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 10 msec 7104 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 380 msec 816736 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/pio.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/pio.pl in module pio, 10 msec 23240 bytes % reconsulting /home/ulrich/ftp/yap-prolog/library/item80.pl... % reconsulted /home/ulrich/ftp/yap-prolog/library/item80.pl in module user, 0 msec 6200 bytes % reconsulted /home/ulrich/.yaprc in module user, 410 msec 883912 bytes ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false. Action (h for help): a ERROR!! EXISTENCE ERROR- procedure 3/0 is undefined, called from context prolog:$call/4 Goal was timeout:3 ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false. Action (h for help): a % YAP execution aborted ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false. Action (h for help): a ERROR!! UNHANDLED EXCEPTION - message xixi unknown ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false. Action (h for help): a % YAP execution aborted ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true), false. Action (h for help): a % YAP execution aborted
[mein_modul] ?- alarm(1000,spezialprozedur,X). X = 0 ? yes [mein_modul] ?- alarm(0, R,X). R = spezialprozedur, X = 0 ? ; no [mein_modul] ?- module(user). yes ?- alarm(0, R,X). no ?- module(mein_modul). yes [mein_modul] ?- alarm(0, R,X). R = spezialprozedur, X = 0 ?For this reason, setting and resetting should be separated! meta_predicate arguments only work intuitively as input arguments.
?- module(mein_modul). yes [mein_modul] ?- alarm(1000,spezialprozedur,_). yes [mein_modul] ?- on_signal(sig_alarm,A,true). A = mein_modul:mein_modul:spezialprozedur ? ; no [mein_modul]Expected:
A = mein_modul:spezialprozedur
g3:~> yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- between(1,inf,I),catch(forall(repeat, (alarm([0|100],throw(time_out),_),alarm(0,_,_))),time_out,(write(timeout(I)),nl)),fail. timeout(1) timeout(2) ... timeout(344) timeout(345) ERROR!! INSTANTIATION ERROR- call((user:user:_77:_78,user:true)): expected bound valueThis takes time! Don't give up. Run some other things in the background. I reproduce that with ~50% cpu for the process.
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- forall(repeat, (alarm([0|10000],throw(time_out),_),alarm(0,_,_))). ERROR!! UNHANDLED EXCEPTION - message time_out unknown ?- forall(repeat, (alarm([0|10000],throw(time_out),_),alarm(0,_,_))). ERROR!! INSTANTIATION ERROR- call((user:user:_33:_34,user:true)): expected bound value ?-
[ulrich@gupu yap-prolog]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2128 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 370 msec 821664 bytes % reconsulted /home/ulrich/.yaprc in module user, 370 msec 835128 bytes ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,76,_131290) timeout(2,920,_131290) timeout(3,231,_131290) timeout(4,697,_131290) timeout(5,1230,_131290) timeout(6,102,_131290) timeout(7,674,_131290) timeout(8,1138,_131290) timeout(9,315,_131290) timeout(10,789,_131290) timeout(11,456,_131290) timeout(12,908,_131290) timeout(13,332,_131290) timeout(14,883,_131290) timeout(15,557,_131290) timeout(16,229,_131290) timeout(17,54,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_150:_151,user:true)): expected bound value ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,251,_131290) timeout(2,463,_131290) timeout(3,463,_131290) timeout(4,1387,_131290) timeout(5,442,_131290) timeout(6,545,_131290) timeout(7,214,_131290) timeout(8,1096,_131290) timeout(9,332,_131290) timeout(10,793,_131290) timeout(11,450,_131290) timeout(12,689,_131290) timeout(13,1287,_131290) timeout(14,669,_131290) timeout(15,216,_131290) timeout(16,687,_131290) timeout(17,1489,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_311:_312,user:true)): expected bound value ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,444,_131290) timeout(2,692,_131290) timeout(3,191,_131290) timeout(4,223,_131290) timeout(5,1321,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_436:_437,user:true)): expected bound value ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,353,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_549:_550,user:true)): expected bound value ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,88,_131290) timeout(2,690,_131290) timeout(3,2936,_131290) timeout(4,213,_131290) timeout(5,2313,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_674:_675,user:true)): expected bound value ?- between(1,inf,I),catch(forall(between(1,inf,J), (alarm([0|100],throw(time_out(I,J)),_),alarm(0,_,_))),time_out(Ix,Jx),(write(timeout(Ix,Jx,_)),nl)),fail. timeout(1,97,_131290) timeout(2,462,_131290) timeout(3,1585,_131290) timeout(4,207,_131290) timeout(5,445,_131290) timeout(6,448,_131290) timeout(7,1221,_131290) timeout(8,215,_131290) timeout(9,438,_131290) timeout(10,1715,_131290) ERROR!! INSTANTIATION ERROR- call((user:user:_814:_815,user:true)): expected bound value ?-
?- repeat,time_out(true,10,R), false. ERROR!! INSTANTIATION ERROR- call((user:timeout:_143:_144,user:true)): expected bound value
?- time_out((length(L,N),length(L,N)),10,R), R \== success.
[ulrich@gupu arch]$ yap-6 % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 4544 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 400 msec 821544 bytes % reconsulted /home/ulrich/.yaprc in module user, 410 msec 837440 bytes ?- repeat,time_out(true,10,R), R \== success. true ? ; true ? ; true ? ; ; true ? ; true ? ; true ? ; true ? ; true ? ; true ? ; true ? ; true ? ; ERROR!! INSTANTIATION ERROR- call((user:timeout:_99:_100,user:true)): expected bound value ?-
[ulrich@gupu arch]$ yap-6 % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 3480 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 370 msec 821640 bytes % reconsulted /home/ulrich/.yaprc in module user, 370 msec 836400 bytes ?- repeat,catch(time_out(throw(xixi),100,R),xixi,true). true ? ; ERROR!! UNHANDLED EXCEPTION - message time_out unknown ?-
[ulrich@gupu yap-prolog]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 3616 bytes % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 380 msec 821584 bytes % reconsulted /home/ulrich/.yaprc in module user, 390 msec 836544 bytes ?- [user]. | fac(0, 1). fac(N, F) :- N #> 0, F #= F0*N, N1 #= N - 1, fac(N1, F0). | yes ?- fac(N,F), fac(M,F), N > 7. F = 40320, M = 1, N = 8 ? ; F = 362880, M = 1, N = 9 ? yes ?- fac(N,F), fac(M,F), N > 7. F = 40320, M = N = 8 ?
?- [user]. | fac(0, 1). fac(N, F) :- N #> 0, F #= F0*N, N1 #= N - 1, fac(N1, F0). | yes ?- fac(N,F), fac(M,F), N > 7. F = 40320, M = N = 8 ? ; F = 362880, M = N = 9 ? ; F = 3628800, M = N = 10 ? ; F = 39916800, M = 1, N = 11 ? ; 3692KB of Code Space (0x2000000--0x239b1d0) % % PC: prolog:get_attr/3 at clause 1 % Continuation: clpfd:trigger_prop/1 at clause 1 % 518KB of Global Stack (0x23cf000--0x2450988) % 1KB of Local Stack (0x28b0b34--0x28b1000) % 74KB of Trail (0x28b1004--0x28c3b64) % Performed 9 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % clpfd:trigger_prop/1 at clause 1 % clpfd:trigger_prop/1 at clause 1 % clpfd:trigger_props_/1 at clause 2 % clpfd:trigger_props/4 at clause 1 % clpfd:run_propagator/2 at clause 14 % clpfd:do_queue/0 at clause 1 % attributes:do_hook_attributes/2 at clause 2 % attributes:woken_att_do/2 at clause 1 % prolog:$execute_woken_system_goals/1 at clause 2 % prolog:$wake_up_goal/2 at clause 1 % clpfd:do_queue/0 at clause 1 % attributes:do_hook_attributes/2 at clause 2 % attributes:woken_att_do/2 at clause 1 % prolog:$execute_woken_system_goals/1 at clause 2 % prolog:$wake_up_goal/2 at clause 1 % user:fac/2 (517KB--0KB) % user:fac/2 (516KB--0KB) % prolog:$query/2 at clause 4 % prolog:$command/4 at clause 2 % prolog:$enter_top_level/0 at clause 6 % prolog:$catch/3 (512KB--0KB) % prolog:$system_catch/4 at clause 1 % meta-call ERROR!! RESOURCE ERROR- not enough stack
?- predicate_property(_,(meta_predicate call(:))). no ?- predicate_property(call(_),(meta_predicate call(:))). yesSuccess expected. I want to search for all meta_predicate s with
?- predicate_property(_, (meta_predicate Spec)).
?- read_from_chars("s(_, _, _, _, _, _, _)",Term). end of file found before end of term at charsio, near line 1: <==== HERE ====> s( _ , _ , _ , _ , _ , _ , _ ). ?-Why HERE? Why is a . shown? Why the linebreak? The name should be read_from_codes.
?- X=s(X), unify_with_occurs_check(X,Z). no ?- X=s(X), unify_with_occurs_check(X,X). noThis is highly problematic, as we can no longer assume that X = X succeeds always. By the same token, Freshvar = Term now sometimes fails. This essentially ruins all classical optimizations. See these WLPE-slides in Udine (I believe you did not attend it). It is nice that unify_with_occurs_check/2 always terminates in YAP, but it would be nicer if those properties would be obeyed as well. (Currently, SWI does not terminate always.)
?- open('/dev/null',read,B), stream_property(B,position(Pos)), set_stream_position(B,Pos). ERROR at clause 4 of prolog:set_stream_position/2 !! DOMAIN ERROR- set_stream_position/2: false is not a stream positionExpected: Pos should be a term to allow repositioning. (This seems to be related to your project to adopt SWI's I/O. How far is that?)
This is still highly experimental, and Jan made a lot of changes so I haven't been able to keep track. :- expects_dialect(swi). apologies You can just load the library :- load_foreign_files([plstream], [], initIO).
?- time_out(length(L,L),-1,R). R = time_out ? yesWhy does this take a second or so? A domain_error not_less_than_zero, or between(1,2147483646) would be most appropriate.
:- meta_predicate ^(?,0,?). ^(Xs, Goal, Xs) :- call(Goal). :- meta_predicate ^(?,1,?,?). ^(Xs0, Goal, Xs0, Xs) :- call(Goal, Xs).Examples:
?- phrase(([a],call(Ys0^Ys^(Ys0=Ys)),[o]),Xs0,Xs). Xs0 = [a,o|Xs], Ys = Ys0 = [o|Xs] ? ; no ?- phrase(([a],call(Ys0^(=(Ys0))),[o]),Xs0,Xs). Xs0 = [a,o|Xs], Ys0 = [o|Xs] ? ; no ?- phrase(([a],call(=),[o]),Xs0,Xs). Xs0 = [a,o|Xs] ? ; no
[ulrich@gupu yap-prolog]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 1968 bytes % reconsulted /home/ulrich/.yaprc in module user, 0 msec 4216 bytes ?- repeat,time_out(true,10,R), R \== success. R = time_out ? ; ERROR!! UNHANDLED EXCEPTION - message time_out unknownAnd on g3:
?- g3:/opt/gupu/src/yap-6/arch> yap-6 -f none % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 ?- use_module(library(timeout)). % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2960 bytes yes ?- repeat,time_out(true,10,R), R \== success. ERROR!! INSTANTIATION ERROR- call((user:timeout:_77:_78,user:true)): expected bound value
?- use_module(library(timeout)). % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2960 bytes yes ?- repeat,time_out(setup_call_cleanup((retractall(a),assert(a)),true,(findall(a,retract(a),As),As\=[a],write(As),nl)), 10, R), R \= success. [] R = time_out ? ; [] R = time_out ? ; ERROR!! UNHANDLED EXCEPTION - message time_out unknown
?- g3:/opt/gupu/src/yap-6/arch> yap-6 -f none % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 ?- predicate_property(call_cleanup(A,B),X). X = built_in ? yes ?- | call_cleanup(X=1,true). no
?- setup_call_cleanup(true,between(1,3,I),between(10,11,K)). I = 1, freeze(_A,user:'$clean_call'(user:between(10,11,K))) ? ; I = 2, freeze(_A,user:'$clean_call'(user:between(10,11,K))) ? ; I = 3, freeze(_A,user:'$clean_call'(user:between(10,11,K))) ? ; noSWI gives:
?- setup_call_cleanup(true,between(1,3,I),between(10,11,K)). I = 1 ; I = 2 ; I = 3, K = 10.
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- setup_call_cleanup(between(1,4,I),between(10,14,J),between(20,24,K)). I = 1, J = 10, freeze(_A,user:'$clean_call'(user:between(20,24,K))) ?Is it necessary to show that goal?
?- time(bleq(28)). % 33.030 CPU in 33.033 seconds ( 99% CPU) yesWhile SWI:
?- time(bleq(28)). % 66 inferences, 0.00 CPU in 0.00 seconds (0% CPU, Infinite Lips) true.
?- format_to_chars('x~d',[234],Xs0,Xs). Xs = [120,50,51,52|Xs0] ? yesThis is wrong. The convention is always in the other direction. Such that it can used within a DCG (now officially via call//1) SICStus 3 gives:
| ?- format_to_chars('x~d',[234],Xs0,Xs). Xs0 = [120,50,51,52|Xs] ? yes
[ulrich@gupu ~]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulting /opt/gupu/yap-6/share/Yap/timeout.yap... % reconsulted /opt/gupu/yap-6/share/Yap/timeout.yap in module timeout, 0 msec 2168 bytes % reconsulted /home/ulrich/.yaprc in module user, 0 msec 3816 bytes ?- time(time_out(length(L,L),1,R)). % 0.010 CPU in 0.007 seconds (142% CPU) R = time_out ? yes ?- time(time_out(length(L,L),1,R)). % 0.050 CPU in 0.060 seconds ( 83% CPU) R = time_out ? yes ?- time(time_out(length(L,L),1,R)). Abort (core dumped) [ulrich@gupu ~]$
?- catch((repeat,open('/dev/null',read,S),fail),Pat,true). Pat = error(system_error,['new stream not available for open/3'|local_sp(34070908,34070832,[],[])]) ?For ISO and SWI compatibility
8.11 Stream selection and control ... NOTE - Some of these built-in predicates may cause a Resource Error (7.12.2 h) because, for example, the program has opened too many streams, or a file or disk is full.
?- time_out(findall(f(L,N),length(L,N),_),1,R).
yap-6 -f none -g 'catch((between(0,3000,F),N is 1024*1024*F, M is N, garbage_collect,statistics,write(F=M),nl, catch((functor(_,f,M),fail),error(resource_error(_),_),fail)),Pat,true).'C-c it sometime and type statistics: Clearly, the "memory (total)" increases, but then never decreases.
?- put_attr(a,b,c). noI expect an error. But not a type error: Type errors can always be replaced by failure. This here should be a representation error (variable). Justification (for SWI, SICStus):
Type errors should be when we expect some concrete term of a certain type, but get a term of another type instead. A variable isn't such a term. Further, type errors indicate situations where otherwise a silent failure would happen. But it is easy to construct cases, where success happens in that very place.
[ulrich@gupu arch]$ yap-6 % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- call_cleanup(findall(a,repeat,_),write(cleanup)). Action (h for help): a no ?- call_cleanup(findall(a,repeat,_),write(cleanup)). Action (h for help): a no ?- call_cleanup(findall(a,repeat,_),write(cleanup)). Action (h for help): a cleanupcleanup% YAP execution aborted ?-Same with asserta
?- listing(a),retractall(a), call_cleanup(findall(a,repeat,_),asserta(a)). a. a. Action (h for help): a % YAP execution aborted ?- listing(a),retractall(a), call_cleanup(findall(a,repeat,_),asserta(a)). a. a.Expected: Exactly one fact, or message.
?- when(X,X). X = nonvar(_A), user:nonvar(_A) ?
?- write_canonical([a,b,c]). [a,b,c]yesThis is not conformant - but I like it, as it better reflects the intention behind: immunity against operator declarations. Actually it should be (with a space in the nil - don't ask why).
.(a,.(b,.(c,[ ])))Only Minerva and XSB print [a,b,c]. All other systems print '.'(a,...). Also, the description suggests '.'(a,...). For this reason it is definitely best to go with the flock. If someone wants a safe way to print with []-lists and {}, there is a clean way to do this: Turn off all operator declarations.
[ulrich@gupu yap-prolog]$ yap-6 -l item53.pl -g run % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 1084KB of Code Space (0x2000000--0x210f190) 4097KB of Global Stack (0x212e000--0x252e570) 0KB of Local Stack (0x25f5e9c--0x25f6000) 0KB of Trail (0x25f6004--0x25f6034) Performed 1 garbage collections Running code at meta-call Continuation is at clause 1 of prolog:once/1 indexing code of prolog:$handle_throw/3 (*) clause 1 of prolog:once/1 clause 3 of prolog:$startup_goals/0 (*) clause 1 of prolog:$init_system/0 clause 1 of prolog:$live/0 meta-call Exiting ....Old version now overshadowed:
Remark: by applying patch Made-length-steadfast-for, this problem vanishes...[ulrich@gupu arch]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/src/yap-6/arch/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- length(L,a). % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 1084KB of Code Space (0x2000000--0x210f190) 4096KB of Global Stack (0x212e000--0x252e338) 0KB of Local Stack (0x25f5e98--0x25f6000) 0KB of Trail (0x25f6004--0x25f6030) Performed 1 garbage collections Running code at meta-call Continuation is at clause 4 of prolog:$query/2 indexing code of prolog:$handle_throw/3 (*) clause 4 of prolog:$query/2 meta-call Exiting ....
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -l freezetest.pl -g run % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes memory (total) 6373372 bytes program space 1228800 bytes: 1106768 in use, 122032 free 0 max stack space 5013504 bytes: 4196020 in use, 817484 free global stack: 4195632 in use, 4196072 max local stack: 388 in use, 1344 max trail stack 131068 bytes: 48 in use, 131020 free 0.000 sec. for 0 code, 1 stack, and 0 trail space overflows 0.000 sec. for 1 garbage collections which collected 0 bytes 0.000 sec. for 0 atom garbage collections which collected 0 bytes 0.010 sec. runtime 0.010 sec. cputime 0.010 sec. systime 0.004 sec. elapsed time 10^5.0=100000 memory (total) 18075644 bytes program space 5758976 bytes: 3925520 in use, 1833456 free 0 max stack space 11931648 bytes: 5967856 in use, 5963792 free global stack: 5967436 in use, 7057032 max local stack: 420 in use, 1344 max trail stack 385020 bytes: 131460 in use, 253560 free 0.320 sec. for 2 code, 4 stack, and 1 trail space overflows 0.730 sec. for 8 garbage collections which collected 9027776 bytes 0.000 sec. for 0 atom garbage collections which collected 0 bytes 2.930 sec. runtime 3.980 sec. cputime 0.070 sec. systime 4.231 sec. elapsed time ... 10^6.46239799789896=2900000 memory (total) 65712124 bytes program space 44244992 bytes: 17098256 in use, 27146736 free 0 max stack space 20320256 bytes: 4269872 in use, 16050384 free global stack: 4269452 in use, 19073656 max local stack: 420 in use, 1344 max trail stack 1146876 bytes: 5684 in use, 1141192 free 3.110 sec. for 6 code, 5 stack, and 2 trail space overflows 10.140 sec. for 29 garbage collections which collected 313124532 bytes 0.000 sec. for 0 atom garbage collections which collected 0 bytes 355.850 sec. runtime 369.100 sec. cputime 0.830 sec. systime 378.945 sec. elapsed time % % % YAP OOOPS: tried to access illegal address 0x813cff8!!!!. % % 16768KB of Code Space (0x2000000--0x3060190) Current hole: 0x803d000--0x813d000 8413KB of Global Stack (0xa2e3000--0xab1a76c) 0KB of Local Stack (0xb643e78--0xb644000) 319KB of Trail (0xb644004--0xb693fd8) Performed 29 garbage collections Running code at clause 2 of prolog:$update_att/2 Continuation is at clause 2 of user:recfreeze/1 clause 2 of user:recfreeze/1 clause 1 of prolog:once/1 clause 2 of prolog:$do_yes_no/2 clause 1 of prolog:$yes_no/2 (*) indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 clause 3 of prolog:$startup_goals/0 (*) clause 1 of prolog:$init_system/0 clause 1 of prolog:$live/0 meta-call Exiting .... 375.320u 1.080s 6:26.00 97.5% 0+0k 0+0io 397pf+0w
[ulrich@gupu ~]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- [user]. | :- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 740 msec 825576 bytes | fac(0, 1). fac(N, F) :- N #> 0, F #= F0*N, N1 #= N - 1, fac(N1, F0). | yes ?- fac(N,F), N > 9, fac(M,F). Action (h for help): a % YAP execution aborted ?- N = 10, fac(N,F), N > 9, fac(M,F). % % % YAP OOOPS: tried to access illegal address 0x2e0200dc!!!!. % % 8180KB of Code Space (0x2000000--0x27fd190) 4097KB of Global Stack (0x3210000--0x3610740) 0KB of Local Stack (0x4570c8c--0x4571000) 0KB of Trail (0x4571004--0x45711b8) Performed 43 garbage collections Running code at clause 1 of prolog:get_attr/3 Continuation is at clause 1 of clpfd:put_terminating/3 clause 1 of clpfd:put_terminating/3 clause 1 of clpfd:put_terminating/3 clause 14 of clpfd:run_propagator/2 clause 1 of clpfd:do_queue/0 clause 1 of clpfd:clpfd_equal/2 clause 2 of user:fac/2 indexing code of user:fac/2 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call Exiting .... 66.170u 0.240s 2:07.23 52.1% 0+0k 0+0io 487pf+0w
[ulrich@gupu ~]$ yap-6 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 710 msec 825560 bytes yes ?- [user]. | fac(0, 1). | fac(N, F) :- N #> 0, F #= F0*N, N1 #= N - 1, fac(N1, F0). | yes ?- fac(N,3628800). ?- time(fac(N,3628800)). % 122.940 CPU in 128.592 seconds ( 95% CPU) (takes very long)In SWI this requires only % 5,774,839 inferences, 9.42 CPU in 9.53 seconds (99% CPU, 613040 Lips)
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- [fastunification]. % consulting /home/tour/yap-prolog/fastunification.pl... % consulted /home/tour/yap-prolog/fastunification.pl in module user, 0 msec 2192 bytes yes ?- test(A). A = 2^18-440 ? ; A = 2^19-1270 ? ; A = 2^20-4850 ? ; A = 2^21-18640 ? ; A = 2^22-74530 ?A local variable-term unification should be performed in constant time! Somewhere in C/unify.c:OCUnify the test is missing.
[ulrich@gupu ~]$ yap-6 -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- T=call_cleanup(T,T),T. 1084KB of Code Space (0x2000000--0x210f190) 4147KB of Global Stack (0x212e000--0x253ad8c) 45KB of Local Stack (0x2604990--0x2610000) 13KB of Trail (0x2610004--0x2613558) Performed 1 garbage collections Running code at clause 2 of prolog:$update_att/2 Continuation is at clause 1 of prolog:$call_cleanup/3 clause 1 of prolog:$call_cleanup/3 indexing code of prolog:$catch/3 (*) clause 1 of prolog:catch/3 clause 1 of prolog:$call_cleanup/3 indexing code of prolog:$catch/3 (*) ... indefinitelyYap-6.0.0.0-2-g13b9098:
% prolog:$call_cleanup/3 at clause 1 % prolog:$catch/3 (1048KB--27KB) % prolog:catch/3 at clause 1 Action (h for help): a % ERROR WITHIN ERROR: abort from console g3:/opt/gupu/src/yap-6/arch>Expected: resource errors
?- X=1+X, Y is X. Segmentation fault (core dumped)
?- X = (a:-b). X = a:-b ? yes ?- X = (1 = 1). X = 1=1 ? ;Answer must be a valid Prolog term. Maybe consider in general a harmonization of SWI and YAP toplevel? SWI isn't perfect too: it lacks the "Vienna branch" since more than a year.
[ulrich@gupu ~]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 10 msec 216 bytes ?- length(_,N),catch(X is 1<<(1<<N),error(resource_error(_),_), fail),fail. % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 4156KB of Code Space (0x2000000--0x240f190) 6156KB of Global Stack (0x25c0000--0x2bc33b8) 0KB of Local Stack (0x2f20dd8--0x2f21000) 0KB of Trail (0x2f21004--0x2f2109c) Performed 4 garbage collections Running code at clause 1 of prolog:throw/1 Continuation is at clause 3 of prolog:$call/4 clause 3 of prolog:$call/4 indexing code of prolog:$$_length1/3 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call Exiting .... 6.180u 1.620s 0:20.88 37.3% 0+0k 0+0io 440pf+0w
?- between(1,10000,N), write(call(N)),nl, catch(length(L,L),Pat,true), write(N:Pat),nl,false. call(1) 1:error(resource_error(stack),Database crashed against stacks) call(2) LOOPSAnd on g3:
g3:~> yap-6 -f none -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- between(1,10000,N), write(call(N)),nl, catch(length(L,L),Pat,true), write(N:Pat),nl,false. call(1) % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 2888KB of Code Space (0x2000000--0x22d21a0) % % PC: meta-call % Continuation: prolog:catch/3 at clause 1 % 4842KB of Global Stack (0x232d000--0x27e7a08) % 1KB of Local Stack (0x280eb20--0x280f000) % 0KB of Trail (0x280f008--0x280f0a0) % Performed 1 garbage collections % All Active Calls and % Goals With Alternatives Open (Global In Use--Local In Use) % % prolog:$handle_throw/3 (4842KB--1KB) % prolog:catch/3 at clause 1 % prolog:$call/4 at clause 3 % prolog:$between/3 (1024KB--0KB) % prolog:$query/2 at clause 4 % prolog:$command/4 at clause 2 % prolog:$enter_top_level/0 at clause 6 % prolog:$catch/3 (1024KB--0KB) % prolog:$system_catch/4 at clause 1 % meta-call Exiting ....
?- [ulrich@gupu ~]$ /opt/gupu/yap-6/bin/yap -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- between(1,10000,N), catch(length(L,L),Pat,true), write(N:Pat),nl,false. 2752KB of Code Space (0x2000000--0x22b0190) 4686KB of Global Stack (0x22cf000--0x2762938) 0KB of Local Stack (0x27b0d90--0x27b1000) 0KB of Trail (0x27b1004--0x27b105c) Performed 2 garbage collections Running code at clause 2 of prolog:$$_length1/3 Continuation is at clause 1 of prolog:catch/3 indexing code of prolog:$catch/3 (*) clause 1 of prolog:catch/3 clause 3 of prolog:$call/4 indexing code of prolog:between/3 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call 1:error(out_of_stack_error,Database crashed against stacks) 2752KB of Code Space (0x2000000--0x22b0190) 4686KB of Global Stack (0x22cf000--0x2762b84) 0KB of Local Stack (0x27b0d90--0x27b1000) 0KB of Trail (0x27b1004--0x27b1050) Performed 3 garbage collections Running code at clause 2 of prolog:$$_length1/3 Continuation is at clause 1 of prolog:catch/3 indexing code of prolog:$catch/3 (*) clause 1 of prolog:catch/3 clause 3 of prolog:$call/4 indexing code of prolog:between/3 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call 2752KB of Code Space (0x2000000--0x22b0190) 4096KB of Global Stack (0x22cf000--0x26cf170) 0KB of Local Stack (0x27b0d54--0x27b1000) 0KB of Trail (0x27b1004--0x27b1048) Performed 4 garbage collections Running code at clause 1 of prolog:catch_ball/2 Continuation is at clause 2 of prolog:$handle_throw/3 clause 2 of prolog:$handle_throw/3 (*) clause 2 of prolog:$handle_throw/3 clause 3 of prolog:$call/4 indexing code of prolog:between/3 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call ERROR!! OUT OF STACK SPACE ERROR- Database crashed against stacks ?-Expected:
1:error(resource_error(Qua),QuidQuid) 2:error(resource_error(Qua),QuidQuid) ...
?- [ulrich@gupu ~]$ yap-6 -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- catch(length(L,L),Pat,true). 2752KB of Code Space (0x2000000--0x22b0190) 4686KB of Global Stack (0x22cf000--0x27629f8) 0KB of Local Stack (0x27b0e50--0x27b1000) 0KB of Trail (0x27b1004--0x27b1058) Performed 2 garbage collections Running code at clause 2 of prolog:$$_length1/3 Continuation is at clause 1 of prolog:catch/3 indexing code of prolog:$catch/3 (*) clause 1 of prolog:catch/3 clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call Pat = error(out_of_stack_error,'Database crashed against stacks') ?Expected:
Pat = error(resource_error(Something), Further_Information)
?- freeze(X,false), copy_term(X,X,Goals). Goals = [user:false], user:false ? ;Calling Goals here would result in failure, but we need freeze(X,false) instead.
?- freeze(X,false), freeze(X,true),copy_term(X,X,Goals). Goals = prolog:freeze(X,user:true),prolog:freeze(X,user:false), freeze(X,user:true), freeze(X,user:false) ? yesThis is not compatible with SWI. Please reconsider using ands instead of a clean list! Expected: Goals = [prolog:freeze(X,user:true),prolog:freeze(X,user:false)],
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -G5000 % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- length(L,L). Action (h for help): s no ?--G5000 seems to be the minimum. -G4000 produces a fatal error. However this still loops. Also, statistics do not work.
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -G10m % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- N is 1024*1024*50, functor(F,f,N),false. noSee #42
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -G 100m Terminatedloops, while -G 90m works.
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes ?- N is 1024*1024*50*4,functor(F,f,N),false. ERROR!! TYPE ERROR- functor/3: expected integer, got 209715200 ?-
ERROR at clause 4 of prolog:open/3 !! SYSTEM ERROR- new stream not available for open/3 ?- use_module(library(clpfd)). ERROR!! PERMISSION ERROR- use_module(user:library(clpfd)): cannot read from library(clpfd) ?- use_module(library(clpfd)).It would be nice to get a clearer error message here.
?- catch(call_cleanup((repeat,fail),true),x,fail). Action (h for help): a no
?- repeat, catch(call_cleanup(functor(F,f,10000000),throw(x)),x,fail). Action (h for help): a ?- cblam(C),C, fail. Action (h for help): a cblam(true). cblam(call_cleanup(C,C)) :- cblam(C).2009-06-03 14:24:51 (CEST Wed): Sometimes C-c needs another C-c to get a prompt.
?- call_cleanup(findall(a,repeat,_),write(cleanup)). % % % YAP OOOPS: tried to access illegal address 0x7fff53c!!!!. % % 2688KB of Code Space (0x2000000--0x22a0190) Current hole: 0x7cdd000--0x815d000 95489KB of Global Stack (0x22bf000--0x7fff548) 1KB of Local Stack (0xdf609a0--0xdf61000) 0KB of Trail (0xdf61004--0xdf61084) Performed 3 garbage collections % % % YAP OOOPS: tried to access illegal address 0x7fff548!!!!.
?- M = a, M:c:(X=1). M = a, X = 1 ? ; no ?- M:c:(X=1). noBy simply removing a binding we cannot obtain failure! An instantiation error would be acceptable - or something pending if you insist.
?- length(Xs,3), Xs ins 1..3. Xs = [_A,_B,_C] ? ; noExpected:
_A in 1..3
etc.
make[1]: Leaving directory `/a4tmp/gupu/src/yap-6/arch/library/matrix' (cd packages/PLStream; make) make[1]: Entering directory `/a4tmp/gupu/src/yap-6/arch/packages/PLStream' make[1]: *** No rule to make target `pl-buffer.o', needed by `plstream.so'. Stop. make[1]: Leaving directory `/a4tmp/gupu/src/yap-6/arch/packages/PLStream' make: *** [all] Error 2 a4:/opt/gupu/src/yap-6/arch> ls -l config.status -rwxr-xr-x 1 ulrich prolog 39388 May 2 20:50 config.status
?- freeze(X,X). ERROR at clause 1 of prolog:'$clean_call'/1 !! INSTANTIATION ERROR- call/1: expected bound value
?- X is 2^ -1. X = 2 ? yesShould yield most probably an evaluation_error(Something). (In SWI, this yields a float value.) Please note that some negative exponents do make sense!
?- E in -8..8, (E^E)^E#=E^E^E, labeling([],[E]). ERROR!! TYPE ERROR- : expected integer, got -1.0 ?-
:- use_module(library(clpfd))
:[ulrich@gupu yap-prolog]$ cat item26.pl :- use_module(library(clpfd)). [ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -l item26.pl % Restoring file /opt/gupu/yap-6/lib/Yap/startup YAP version Yap-6.0.0 PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2Happens on g3 (~ Debian 4.0, 64 bit) and gupu (very old Redhat 7.1).
[ulrich@gupu yap-prolog]$ /opt/gupu/yap-6/bin/yap -l item26.pl % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes % reconsulting /home/ulrich/.yaprc... % reconsulted /home/ulrich/.yaprc in module user, 0 msec 216 bytes % reconsulting /home/ulrich/.yaprc...
?- a4:~/ftp/yap-prolog> /opt/gupu/yap-6/bin/yap -l item26.pl % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 (LOOPING)
?- 2#=C^D,D= -1, C=2. C = 2, D = -1 ? ;Should fail. Rather due to particular implementation. (i3a#278)
?- X = 1\/3. X = 1'\\/'3 ?Expected: Same term as input.
?- phrase(("a"|"b"),Xs). ERROR!! EXISTENCE ERROR- procedure |/4 is undefined, called from context prolog:$enter_top_level/0 Goal was user:|([97],[98],_1048619,[])2009-05-18: still missing, but now anser is just no This is for SWI compatibility.
?- time_out(length(_,N),100,R). N = 0, R = success ? ; noThis should produce (as in SICStus):
| ?- time_out(length(_,N),100,R). N = 0, R = success ? ; N = 1, R = success ? ; N = 2, R = success ?Further,
time_out(length(_,N),1000,R), R \== success.
should never succeed (provided 1000 is large enough).
?- length(_,N),time_out(call_cleanup((repeat,false),true),100,F). F = success, N = 0 ?(Now loops!)
?- length(_,N),time_out((repeat,open('/dev/null',read,S),call_cleanup(true,close(S)),false),100,F), N mod 10=:=0. F = time_out, N = 0 ? ; F = time_out, N = 10 ? ; F = time_out, N = 20 ? ; F = time_out, N = 30 ? ; F = success, N = 40, S = '$stream'(29) ?It is an impossibility that above time_out produces a success. Still this happens somehow.
?- length(_,N),time_out((repeat,open('/dev/null',read,S),call_cleanup(true,close(S)),false),100,F), N mod 10=:=0. F = time_out, N = 0 ? ; F = time_out, N = 10 ? ; F = time_out, N = 20 ? ; F = time_out, N = 30 ? ; F = time_out, N = 40 ? ; F = time_out, N = 50 ? ; F = time_out, N = 60 ? ; F = time_out, N = 70 ? ; F = time_out, N = 80 ? ; F = time_out, N = 90 ? ; F = time_out, N = 100 ? ; ERROR at clause 4 of prolog:open/3 !! SYSTEM ERROR- new stream not available for open/3Moved to #60.
[ulrich@gupu yap-6]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup YAP version Yap-6.0.0 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 680 msec 824960 bytes yes ?- E in -8..8, (E^E)^E#=E^E^E, labeling([],[E]). E = -1 ? ; E = 1 ? ; E = 2 ? ; % % % YAP OOOPS: tried to access illegal address (nil)!!!!. % % 1904KB of Code Space (0x2000000--0x21dc190) 4114KB of Global Stack (0x221e000--0x2622a24) 0KB of Local Stack (0x26e3c48--0x26e4000) 2KB of Trail (0x26e4004--0x26e4a18) Performed 1 garbage collections Running code at clause 1 of attributes:woken_att_do/2 Continuation is at clause 1 of attributes:woken_att_do/2 clause 1 of attributes:woken_att_do/2 clause 2 of prolog:$execute_woken_system_goals/1 clause 1 of prolog:$wake_up_goal/2 indexing code of prolog:$handle_throw/3 (*) clause 20 of clpfd:run_propagator/2 meta-call Exiting ....Expected: false/no, as in SWI.
?- X is 13^1150000000. Segmentation faultOn 64-bit
X is 235^2^61.
The problem is that the overflow happens effectively in the word to represent the size. Sometimes looping, or even havoc effects possible (with small effort). This problem has nothing to do with YAP or SWI. It is a general problem that requires a joint effort. Something for the Prolog commons?
?- X is 13^1150000000. % % % YAP OOOPS: tried to access illegal address 0x5c73626f!!!!. % % 1080KB of Code Space (0x2000000--0x210e190) 4096KB of Global Stack (0x212e000--0x252e0d8) 0KB of Local Stack (0x25f5e9c--0x25f6000) 0KB of Trail (0x25f6004--0x25f6018) Performed 1 garbage collections Running code at meta-call Continuation is at clause 4 of prolog:$query/2 clause 4 of prolog:$query/2 clause 2 of prolog:$command/4 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call Exiting .... 35.590u 0.740s 0:42.91 84.6% 0+0k 0+0io 430pf+0w
?- X is 235^2^61. gmp: overflow in mpz type Aborted (core dumped)
?- X is 7^7^7. X = ?Expected:
?- X is 7^7^7. X = 375...Now Yap-6.0.0.0-8-g2020a19 on 64 bit, on 32 bit the same with 7^7^6
[ulrich@gupu yap-prolog]$ yap-6 -f none % Restoring file /opt/gupu/yap-6/lib/Yap/startup.yss YAP version Yap-6.0.0 ?- (true;true), X is 7^7^6. X = 0 ? ; X = 869580...
g3> /opt/gupu/Yap-5.1.2/bin/yap % Restoring file /opt/gupu/Yap-5.1.2/lib/Yap/startup YAP version Yap-5.1.2 ?- length(_,N),functor(F,f,N),catch(F,_,write('caught ')),write(N),nl,false. % % % YAP OOOPS: tried to access illegal address 0x61e000!!!!. % % 5733KB of Code Space (0x8800000--0x8d997a0) 430KB of Global Stack (0x8dd4000--0x8e3f998) 1KB of Local Stack (0x8f5fb18--0x8f60000) 0KB of Trail (0x8f60008--0x8f60080) Performed 0 garbage collections Running code at clause 1 of prolog:catch/3 Continuation is at clause 1 of prolog:catch/3 indexing code of prolog:$catch/3 (*) clause 1 of prolog:catch/3 clause 13 of prolog:$call/4 clause 3 of prolog:$call/4 indexing code of prolog:$$_length1/3 (*) clause 4 of prolog:$query/2 clause 2 of prolog:$command/3 clause 6 of prolog:$enter_top_level/0 indexing code of prolog:$catch/3 (*) clause 1 of prolog:$system_catch/4 meta-call Exiting ....
?- catch(X is 1 << 400000000,Pat,true). Pat = error(evaluation_error(int_overflow),['is/2'|local_sp(142752004,142893492,[],[])]) ? yesC.f. 7.1.2 NOTES 1
When bounded is false, expressions with an integer value
will not have a value int_overflow, but might produce a resource
error (7.12, 7.12.2 h) because of exhaustion of resources.
[ulrich@gupu yap]$ git describe fatal: cannot describe '720c9a6b611f712220be553e32c224a3902af06d' [ulrich@gupu yap]$ cd ../pl-57x/ [ulrich@gupu pl-57x]$ git describe V5.7.8-15-gc8a094b
Biggest change is a more concrete description of term_variables/2 and some ISO corrections.
g1:~/ftp/yap-prolog> /opt/gupu/yap/bin/yap % Restoring file /opt/gupu/yap/lib/Yap/startup YAP version Yap-5.1.4 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap/share/Yap/clpfd.pl... ... % Warning: at file /opt/gupu/yap/share/Yap/swi.yap, near line 42. % Importing private predicate terms:term_variables/2 to swi. % Warning: at file /opt/gupu/yap/share/Yap/swi.yap, near line 42. % Importing private predicate terms:term_variables/3 to swi. ERROR!! at file /opt/gupu/yap/share/Yap/swi.yap, near line 115. PERMISSION ERROR- in line 115, system predicate term_variables/2: modifying static procedure term_variables/2 ERROR!! at file /opt/gupu/yap/share/Yap/swi.yap, near line 118. PERMISSION ERROR- in line 118, system predicate term_variables/3: modifying static procedure term_variables/3 % reconsulted /opt/gupu/yap/share/Yap/swi.yap in module swi, 12 msec 464128 bytes % reconsulting /opt/gupu/yap/share/Yap/gensym.yap... % reconsulted /opt/gupu/yap/share/Yap/gensym.yap in module gensym, 0 msec 5504 bytes ERROR!! at file /opt/gupu/yap/share/Yap/clpfd.pl, near line 3526. PERMISSION ERROR- consult: modifying static procedure lists:numlist/3 % reconsulted /opt/gupu/yap/share/Yap/clpfd.pl in module clpfd, 32 msec 1281568 bytes yesNow:
[ulrich@gupu yap-6]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup YAP version Yap-6.0.0 ?- use_module(library(clpfd)). % reconsulting /opt/gupu/yap-6/share/Yap/clpfd.pl... PL_register_foreign_in_module called with non-implemented flag 24 when creating predicate (null):swi_stream_property/2 % reconsulted /opt/gupu/yap-6/share/Yap/clpfd.pl in module clpfd, 710 msec 824960 bytes yes
../configure --prefix /opt/gupu/yap-6 --with-gmp --enable-couroutining
?- numlist(1,1,[_,_|_]).
loops. Failure expected.
?- catch(length(L,L),Pat,true). Pat = error(resource_error(stack), global).I tried to limit datasize and limit -h datasize all under Debian. But I failed. It seems you are allocating the memory manually via mmap. For every requested memory, the /dev/zero device is opended, mmapped, and closed. This leads to a quite arbitrary inefficient memory layout (see /proc/${PROCID}/maps), which makes the TLB crawl. This, you will only notice on a machine with many processes running. And you can only measure it via total throughput! All the OS's statistics have difficulties taking into account the TLB... The best would be to have one map for the user data. I.e. the heap segment. Then, the OS can do the best it knows, whatever that is. Alternatively, use mremap.
g1:/opt/gupu/src/yap/docs> make info makeinfo yap.tex yap.tex:8701: Unknown command `geq'. yap.tex:8701: Misplaced {. yap.tex:8701: Misplaced }. makeinfo: Removing output file `/opt/gupu/src/yap/docs/yap.info' due to errors; use --force to preserve. make: *** [yap.info] Error 1 g1:/opt/gupu/src/yap/docs> makeinfo --version makeinfo (GNU texinfo) 4.8 Copyright (C) 2004 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. g1:/opt/gupu/src/yap/docs>
gcc -c -DBP_FREE -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/exec.c -o exec.o ../C/exec.c: In function `p_clean_ifcp': ../C/exec.c:1812: parse error before `pt0' ../C/exec.c:1814: `pt0' undeclared (first use in this function) ../C/exec.c:1814: (Each undeclared identifier is reported only once ../C/exec.c:1814: for each function it appears in.) make: *** [exec.o] Error 1 100.290u 4.750s 1:45.44 99.6% 0+0k 0+0io 29776pf+0w [ulrich@gupu arch]$ gcc --version 2.96 [ulrich@gupu arch]$ uname -a Linux gupu.complang.tuwien.ac.at 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown [ulrich@gupu arch]$ cat /etc/issue Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.2-2 on an i686 [ulrich@gupu arch]$ history 1 20:42 cd /opt/gupu/src/yap 2 20:42 mkdir /opt/gupu/src/yap 3 20:42 cd /opt/gupu/src/yap 4 20:42 ls 5 20:42 cvs -d :pserver:anonymous@yap.cvs.sf.net:/cvsroot/yap login 6 20:43 cvs -z3 -d:pserver:yap.anonymous@yap.cvs.sf.net:/cvsroot/yap co . 7 20:43 mkdir arch 8 20:43 cd arch 9 20:43 ../configure --prefix /opt/gupu/yap --with-gmp --enable-couroutining 10 21:59 ../configure --prefix /opt/gupu/yap --with-gmp --enable-couroutining 11 22:02 make 12 22:07 gcc --version 13 22:07 uname -a 14 22:08 cat /etc/issue 15 22:08 history
?- abs(X)#< 10000000, X#>Y,Y#>X. Action (h for help): a % YAP execution aborted. ?- abs(X)#< 10000000, X#>Y,Y#>X. no ?- X#>Y,Y#>X. no ?- X#>Y. no ?- X#>1. no ?- 2#>1. no ?-
g1:/opt/gupu/src/yap> /opt/gupu/yap/bin/yap % Restoring file /opt/gupu/yap/lib/Yap/startup YAP version Yap-5.1.4 ?- X is 2^2. X = 4.0 ? yesShould be an integer. ** is exponentiation producing floats (9.3.1). ^ is not yet defined. But it makes sense to make this a function to the integers. (I thought you agreed on this some time ago, but probably my memory is failing).
Compatibility: SWI produces integers with ^ for two integer arguments (but it produces them also for **).
setup_call_cleanup(Setup, Call, Cleanup) :- Setup, call_cleanup(Call, Cleanup).The difference to call_cleanup/2 is that setup_call_cleanup/3 is able to provide provisions for handling interrupts/timeouts and other asynchronous signals during Setup in a more robust fashion. Consider:
file_term(File, Term) :- setup_call_cleanup( open(File, read, Stream), ( repeat, read(Stream, Term), ( Term == end_of_file -> ! ; true ) ), close(Stream)).The idea is to read the file term-by-term. At the end, or when the caller is satisfied, the stream is closed. But what happens, if there is an interrupt immediately after the goal open/3? The cleanup handler might not be installed at that very moment - and the Stream is never closed thereby using system resources.
Most uses of call_cleanup/2 are better handled by setup_call_cleanup/3. In many applications it is not a big problem, if something leaves some files open in case of errors, but in some like servers it is a big problem.
?- call_cleanup(throw(goal_exception),throw(cleanup_exception)). ERROR!! [Thread 0 ] cleanup_exception
Rationale: The exception of the Goal is most probably more important, as it is the first to happen. The exception of Cleanup might be a consequence of the first exception. It is therefore more robust to pass goal_exception and not cleanup_exception further to the top. Consider a file-system overflow: In this situation it is best to get the very first exception/error than any of the followups. (This is in contrast to Common Lisp's unwind-protect. However, Common Lisp's catch and throw is much more powerful than ISO Prolog's. Yet, as default-behaviour it is quite controversial.)
(Compatibility: Currently SWI, but not SICStus.)
New problem:YAP version Yap-5.1.4 ?- call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x). ERROR!! [Thread 0 ] x
[ulrich@gupu yap-6]$ /opt/gupu/yap-6/bin/yap % Restoring file /opt/gupu/yap-6/lib/Yap/startup YAP version Yap-6.0.0 ?- call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x). cleanup(_1048612,_1048622) [ulrich@gupu yap-6]$Expected:
?- call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x). cleanup(_1055,_1070) ERROR!! [Thread 0 ] xI.e., the cleanup should be executed, even in this situation. All bindings of X and Y should have been undone already.
(Compatibility: SICStus, partially SWI (which incorrectly shows bindings))
Further problem:
?- catch((call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x)),Pat,(write(got(Pat)),nl)). cleanup(_1048612,_1048622)So the exception is not caught.
?- call_cleanup((catch((call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x)),Pat,(write(got(Pat)),nl))),throw(throwing-the-cleanupper)). ?- call_cleanup((catch((call_cleanup((X=1;X=2),(write(cleanup(X,Y)),nl)),Y=bound,throw(x)),Pat,(write(got(Pat)),nl))),(write(i-am-the-cleanupper),nl)). ?- catch((call_cleanup((X=1;X=2),true),throw(x)),Pat,true),false. Pat = x ? ; ?- call_cleanup(call_cleanup((X=1;X=2),true),Det=est).
![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | 0001-Correct-dir-formatting-for-Info-including-special-ch.patch | 2009-05-02 18:41 | 1.2K | |
![]() | 0001-Minor-doc-changes-Item-13.patch | 2009-03-26 03:02 | 22K | |
![]() | 0001-Old-gcc-adaptations-for-yap-6.patch | 2009-04-29 01:54 | 4.1K | |
![]() | 0002-Further-changes-for-old-GCC.patch | 2009-04-28 16:42 | 2.4K | |
![]() | Item.html | 2023-12-23 10:04 | 53K | |
![]() | YAP-HEADER.html | 2023-12-23 10:08 | 200K | |
![]() | a | 2009-06-02 02:45 | 1 | |
![]() | blam.pl | 2009-05-20 00:58 | 466 | |
![]() | blam.xwam | 2009-05-20 01:09 | 970 | |
![]() | fastunification-2.pl | 2009-05-18 03:02 | 332 | |
![]() | fastunification.pl | 2009-05-14 16:44 | 332 | |
![]() | freezetest.pl | 2007-07-13 13:51 | 214 | |
![]() | git/ | 2012-07-28 13:43 | - | |
![]() | item9-maps.txt | 2009-03-24 00:04 | 12K | |
![]() | item13.patch.txt | 2009-03-24 21:18 | 21K | |
![]() | item26.pl | 2009-05-02 02:56 | 31 | |
![]() | item30/ | 2009-05-02 21:43 | - | |
![]() | item32.html | 2009-05-04 18:10 | 39K | |
![]() | item49.pl | 2009-05-15 15:52 | 329 | |
![]() | item53.pl | 2009-05-18 02:17 | 16 | |
![]() | item115.txt | 2009-06-04 00:40 | 1.9K | |
![]() | item116.html | 2009-06-04 03:45 | 3.3K | |
![]() | item120/ | 2009-06-09 00:41 | - | |
![]() | item130.html | 2009-06-17 06:57 | 17K | |
![]() | item133.tar | 2009-06-14 04:21 | 10K | |
![]() | item133/ | 2009-06-14 04:24 | - | |
![]() | item138.pl | 2009-06-18 05:51 | 361 | |
![]() | item296.txt | 2015-01-26 01:01 | 461 | |
![]() | lcotest.pl | 2009-05-25 22:53 | 48K | |
![]() | library/ | 2016-02-27 23:47 | - | |
![]() | maps.1 | 2009-03-24 00:04 | 11K | |
![]() | maps.3 | 2009-03-24 00:19 | 0 | |
![]() | perfcomp_yap.pl | 2015-07-03 15:49 | 1.2K | |
![]() | timeouts_in_yap.txt | 2009-06-04 00:29 | 4.0K | |
![]() | yaplog.txt | 2009-07-10 17:02 | 2.3K | |