Roberto Bagnara | 1 Sep 22:01

Maximum number of foreign predicates?


Hi there,

I am experiencing a problem with YAP 5.1.3 that could be explained
if there is a maximum number of foreign predicates that can be
declared with YAP_UserCPredicate().  At the 1132th invocation
of  YAP_UserCPredicate() I get:

% Restoring file /usr/local/lib/Yap/startup
YAP version Yap-5.1.3
%
%
% YAP OOOPS: tried to access illegal address 0x20!!!!.
%
%
2398KB of Code Space (0x8800000--0x8a57820)
9KB of Global Stack (0x8a5c000--0x8a5e740)
2KB of Local Stack (0x8be76c8--0x8be8000)
0KB of Trail (0x8be8008--0x8be80d0)
Performed 0 garbage collections
Running code at clause 1 of prolog:load_foreign_files/3
Continuation is at clause 1 of prolog:load_foreign_files/3
   clause 1 of prolog:load_foreign_files/3
   clause 2 of prolog:$do_yes_no/2
   clause 6 of prolog:$process_directive/3
   clause 6 of prolog:$execute_command/4
      indexing code of prolog:$catch/3 (*)
   clause 1 of prolog:$system_catch/4
   clause 1 of prolog:$loop/2
   clause 1 of prolog:$do_lf/9
(Continue reading)

Isaac Gouy | 26 Aug 22:26

How to force a YAP program to quit?

I've been having problems forcing YAP programs to quit using SIGKILL on
Linux - that just seemed to create 2GB of garbage output before
exhausting the disk allocation ... Action (h for help): Action (h for
help): Action (h for help) ...

What approach do you recommend for programmatically forcing YAP
programs to quit? (YAP programs that are not being run interactively.)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Isaac Gouy | 26 Aug 22:18

Re: fyi Computer Language Benchmarks Game

> Please do tell me if you try more benchmarks.

Glendon Holst converted a number of programs to YAP

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=yap

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
johnnyc | 13 Aug 21:50

64bit Vista

I'm running a 64bit version of Vista. I've been running the 32bit binaries and they seem fine but I've noticed a small issue when I call Yap using the -L flag. Basically I get a number of pipe ('|') characters output. For example, if I have a file as follows: file.pl: :- initialization(main). m(a). main:-setof(A,m(A),List),write(List),nl. and i run: yap -L file.pl the output i get is: | | | | [a] Is this an issue with my OS (I don't get this under Linux)? Are there any Yap binaries available for 64bit windows? The actual prolog results seem fine and the pipes appear on cerr rather than cout I think. Many thanks jc

View this message in context: 64bit Vista
Sent from the Yap Prolog mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users
Prossegger Markus | 1 Aug 09:55

Error while redirecting standard out...

Hi everyone,

I am trying to develop an application (in .net) using YAP as a dynamic
rule-base-solver. It was quite easy to implement this using files for
the exchange of information but as the next step I am interested to get
the Prolog result via the standardout (which seems to be standarderror
in YAP?). So I implemented the YAP process in .net and redirected the
standarderror. It works for the startup messages and the consulting
messages but not for queries like the following examples:

writeAnything:-write('abc'). --> here I get only "?-yes" but not the
"abc"
writeAnything(X):-X='abc'. --> here I get nothing...

What I am doing wrong?

With greetings
Markus

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Michael H. Coen | 30 Jul 19:59

Emacs mode?

Hi everyone,

I'm a new user of Yap and have heard great things about it and its
developer.

I was surprised that I couldn't find a yap-mode for emacs, which is my
preferred development environment.  So, I was wondering if anyone has
modified ediprolog.el (for SWI) so that it's usable with yap or knows of
some other alternative.  (Running yap through emacs in shell-mode isn't
really much fun. :)

Many thanks,
Mike

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Eric Raunig | 27 Jul 21:09

Compiling Prolog (.pl) programs as a standalone application

Looking through your users guide -the process to create a standalone application "Hello World" for example -seems very cryptic.

Is this even possible?


helloworld.pl follows:
------
:-write('hello world').
------


Thank you for your help.

Sincerely,

Eric Raunig
Phoenix, AZ United States.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users
Will Benton | 29 Jul 00:28

YAPor and tabling

Is or-parallelism compatible with tabling?  If so, what configure  
options should I use to enable it?

(Merely combining "--enable-or-parallelism" with "--enable-tabling"  
results in linker errors and some warnings that lead me to believe  
that the two options are incompatible.)

thanks,
wb

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keri Harris | 27 Jul 08:38

[BUG] syntax error(s) in config.in.h

A vanilla compile on an x86_64 Linux box is producing:

In file included from ./console/yap.c:19:
../config.h:127: error: expected identifier or '(' before '/' token
In file included from ./include/YapInterface.h:29,
                 from ./console/yap.c:20:
../include/yap_structs.h:36: error: expected '=', ',', ';', 'asm' 
or '__attribute__' before 'YAP_Term'
<snip 100s of errors>
make: *** [arrays.o] Error 1
make: *** [absmi.o] Error 1

This is ultimately caused by an error in config.h.in:

#undef   FFVAX   		/* manual */
<snip>
#define  FAFloat double		/* manual */

The autoconf manual indicates that nothing should appear after the autoheader 
symbol. [1]

The attached patch moves the offending comments to preceding lines.

Keri

[1] 
http://www.gnu.org/software/autoconf/manual/html_node/Header-Templates.html#Header-Templates
Attachment (yap-config.h.in.patch): text/x-diff, 624 bytes
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users
Keri Harris | 27 Jul 08:13

[PATCH] split up --enable-myddas configure option

Currently the Yap configure script automatically checks for *both* MySQL and 
ODBC libraries when --enable-myddas is selected. This raises two issues:

1) A system may have both MySQL and ODBC libraries installed but we may only 
want Yap MYDDAS support for one of them.

2) On source-based Linux distributions like Gentoo Linux it can lead to 
inconsistent installs - two installations of Yap, both configured 
with --enable-myddas, can result in different library dependencies.

The attached patch splits --enable-myddas into --enable-myddas-mysql 
and --enable-myddas-odbc to allow finer-grained selection.

Keri
Attachment (yap-myddas.patch): text/x-diff, 3802 bytes
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users
Keri Harris | 5 Jul 06:48

[BUG] CHR install doesn't work with DESTDIR

The Yap CHR install doesn't play nice with DESTDIR. If there is an older 
version of yap installed (say yap-5.1.2) and we want to use DESTDIR to 
install yap-5.1.3 outside the standard install location (say into a staging 
area) then the CHR compile is likely to fail since YAPSHAREDIR still points 
to the old libraries. This can result in a variety of errors:

on linux-ppc (old version 5.1.2; new version 5.1.3):

make[1]: Entering directory 
`/var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr'
.../../yap ../../startup -f -l chr_swi_bootstrap.yap \
                      -g "chr_compile_step1
('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt." \
                      -z 'halt(1).'
make[1]: *** [chr_translate_bootstrap1.pl] Segmentation fault

Even if there is *no* previous installation, then using DESTDIR will cause yap 
to fail to find the required libraries:

make[1]: Entering directory 
`/var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr'
.../../yap ../../startup -f -l chr_swi_bootstrap.yap \
                      -g "chr_compile_step1
('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt." \
                      -z 'halt(1).'
% Restoring file /var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/startup
YAP version Yap-5.1.3
     ERROR!!  at 
file /var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr/chr_swi_bootstrap.yap, 
near line 6.
     PERMISSION ERROR- use_module(library(swi)): cannot read from library(swi)

The attached patch fixes this for me.

Keri
Attachment (yap-5.1.3-chr.patch): text/x-diff, 1502 bytes
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Gmane